NetBSD Problem Report #23399

Received: (qmail 17538 invoked by uid 605); 9 Nov 2003 18:48:45 -0000
Message-Id: <200311091848.NAA27830@Sparkle.Rodents.Montreal.QC.CA>
Date: Sun, 9 Nov 2003 13:48:42 -0500 (EST)
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: mouse@Rodents.Montreal.QC.CA
To: gnats-bugs@gnats.netbsd.org
Subject: [dM] improvements to ZX driver
X-Send-Pr-Version: 3.95

>Number:         23399
>Category:       port-sparc
>Synopsis:       sys/dev/sbus/zx* is unnecessarily sketchy
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 09 18:49:00 +0000 2003
>Closed-Date:    
>Last-Modified:  Sat Jan 30 18:56:19 +0000 2010
>Originator:     der Mouse
>Release:        -current as of 2003-11-09
>Organization:
	Dis-
>Environment:
	Any SPARC with a zx ("SUNW,leo")
>Description:
	sys/dev/sbus/zx* has a number of unknown things (search zxreg.h
	for UNK) and magic numbers (look at zx_reset's calls to
	zx_cross_loadwid, for example).  These need not be unknown; I
	have documentation on the leo that's detailed enough to explain
	them.
>How-To-Repeat:
	Look at the code.
>Fix:
	I have documentation enough to fix these.  Unfortunately it's
	in the form of HTML files; I have distilled them down into a
	text file, but the text file is intended for my own reference
	rather than as full documentation.

	The whole thing is up for anonymous ftp from
	sparkle.rodents.montreal.qc.ca:/mouse/docs/Sun/ZX/;
	notes/mouse-notes.txt is the aforementioned text file, with
	index.html being the root of the HTML docs.

	I spent a little while looking for where I got these HTML files
	from, but I found nothing answering that question.  (Googling
	for quotes finds no hits, for example.)

	Specifically:

	#define ZX_OFF_UNK2             0x00000000
	This is boot PROM space.

	#define ZX_OFF_UNK              0x00602000
	This is the video frame counter register.

	#define ZX_CROSS_TYPE_UNK       0x00001006
	This is an interrupt enable mask.

	#define ZX_CROSS_CSR_UNK        0x00000002
	#define ZX_CROSS_CSR_UNK2       0x00000001
	These are the WID LUT Transfer Command (UNK) and WID LUT
	Transfer Direction (UNK2) bits.

	zx_cross_wait is rather misnamed; it is wait-for-completion
	only for LUT transfers.

	The magic numbers in the cursor code are explained.  I also
	suspect there's a bug; I think 0x20<<j in zx_cursor_set should
	be 0x20*j, according to the doc.

	zx_cursor_color needs to do something analogous to
	zx_cross_wait().

	Most of the pad areas in the structs have things in them, but
	it would be way too lengthy to fill them all in here.

	LUT transfers do not use the recommended procedure of
	withdrawing a previous transfer request if present.  This
	mostly matters in that it may mean delaying some transfers by
	more vertical blanking intervals than necessary.  Since the
	delay is done by busy-waiting in the kernel, this is not good.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
>Release-Note:
>Audit-Trail:

From: christos@zoulas.com (Christos Zoulas)
To: mouse@Rodents.Montreal.QC.CA, gnats-bugs@gnats.netbsd.org
Cc:  
Subject: Re: port-sparc/23399: [dM]
Date: Sun, 9 Nov 2003 13:52:20 -0500

 On Nov 9,  1:48pm, mouse@Rodents.Montreal.QC.CA (der Mouse) wrote:
 -- Subject: port-sparc/23399: [dM]



 Do you want to send diffs that fix these problems?

 christos

State-Changed-From-To: open->feedback 
State-Changed-By: fair 
State-Changed-When: Mon Mar 29 01:44:59 UTC 2004 
State-Changed-Why:  

Mouse, could you send a diff, please? 


From: der Mouse <mouse@Rodents.Montreal.QC.CA>
To: fair@netbsd.org
Cc: gnats-bugs@gnats.netbsd.org, port-sparc-maintainer@netbsd.org
Subject: Re: port-sparc/23399
Date: Sun, 28 Mar 2004 23:06:08 -0500 (EST)

 > Synopsis: sys/dev/sbus/zx* is unnecessarily sketchy

 > Mouse, could you send a diff, please?

 At the moment, no, because I don't have any.  What little code I've
 actually written for the leo is for 1.4T and is very skeletal.

 I recognize this is relatively unhelpful, and I knew it when I
 submitted the PR; I sent it PR mostly to record that the documentation
 exists and where to find it, for anyone who does have the resources
 (time, inclination, skill) to pick it up and actually fix it.  That
 anyone may actually be me, someday, or it may not.  It is unlikely to
 be me in the near future (for values of "near" measured in weeks).

 If similar documentation is available elsewhere and is pointed to by a
 PR and I just missed it, or if you think such PRs are counterproductive
 to have sitting around, feel free to close out 23399.

 /~\ The ASCII				der Mouse
 \ / Ribbon Campaign
  X  Against HTML	       mouse@rodents.montreal.qc.ca
 / \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
State-Changed-From-To: feedback->open 
State-Changed-By: fair 
State-Changed-When: Sat Jun 5 23:35:50 UTC 2004 
State-Changed-Why:  

Feedback has been provided. 

State-Changed-From-To: open->feedback
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Sat, 23 Jan 2010 01:40:25 +0000
State-Changed-Why:
this driver has been majorly overhauled by macallan in the years since
this PR was logged.  i suspect it's now closed, but can you have a look?


From: der Mouse <mouse@Rodents-Montreal.ORG>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-sparc/23399 (sys/dev/sbus/zx* is unnecessarily sketchy)
Date: Mon, 25 Jan 2010 09:14:43 -0500 (EST)

 > this driver has been majorly overhauled by macallan in the years
 > since this PR was logged.  i suspect it's now closed, but can you
 > have a look?

 I think the best operational approximation for purposes of this PR is
 "no improvement".

 All the specific UNK #defines cited in the PR are still present - as
 UNKs - in zxreg.h,v 1.7, dated 2009-04-23.  (I _think_ that's the
 latest - I tried to have cvs to update my local copy, and think it did,
 but I'm not certain.  I do note it's substantially newer than 4.0.1's,
 which is the newest source tree I have unpacked at ready hand.)

 A quick look at the code (zx.c,v 1.35) makes me think whatever has been
 done didn't actually address any of these, probably just copying the
 relevant bits from the former driver - I suspect the overhaul was aimed
 at other things, not at addressing any part of this PR.

 In particular, zx_cross_wait is still called that, even though it is
 actually wait-for-completion only for WID and LUT transfers, and the
 cursor code is still full of magic numbers like 0x30 and 0x80 and 0x20
 (and the 0x20<<j is still there and I still think it's wrong, though
 I'm not as sure as I was when I wrote the PR that it should be 0x20*j).

 I didn't check out the rest of the things the PR mentions; I don't
 really have the leisure right now to get my head back around the zx -
 unfortunately, my note to the PR of 2004-03-28 still applies. :(

 /~\ The ASCII				  Mouse
 \ / Ribbon Campaign
  X  Against HTML		mouse@rodents-montreal.org
 / \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 30 Jan 2010 18:56:19 +0000
State-Changed-Why:
Code still sucks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.