Subject: Re: XF86 wsfb driver and wscons ioctl
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: tech-x11
Date: 03/07/2005 10:51:53
Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> writes:

> In article <mtuhdjosmxw.fsf@contents-vnder-pressvre.mit.edu>
> nathanw@wasabisystems.com wrote:
> 
> > > struct wsdisplay_fbinfo {
> > 
> > > 	u_int stride;	/* horizontal stride in bytes */
> > > 	u_int voff;	/* offset from the top of VRAM top to start of
> > > 			   visible area in vertical lines (strides) */
> > 
> > I think voff should be in units of bytes rather than units of
> > strides (I'm thinking of TGA with stride = width + 4; the video area
> > probably doesn't start at a multiple of 1028.
> 
> Hmm. I just thought it was consistent to use units of pixels
> for both hoff and voff, but if there is at least one device
> which has fractional offset less than stride, using bytes for voff
> isn't redundant.

I hadn't noticed that hoff is also in pixels. I don't know of devices
where that would need to be a fractional value, but again, I don't see
what the value is in having it in pixels instead of bytes (I'm not
sure I know of devices offhand with a non-zero hoff value at all).

> Current struct wsdisplay_fbinfo has cmsize as wsdisplay(4) says:

Oops, I missed that completely. That'll do nicely.

> >> cmsize indicates the number of color map entries accessible
> >> through WSDISPLAYIO_GETCMAP and WSDISPLAYIO_PUTCMAP.
> 
> Oh, cmsize should be zero if no CMAP ioctls are available?

That seems like a good interpretation.

        - Nathan