Subject: Re: XF86 wsfb driver and wscons ioctl
To: None <tech-x11@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-x11
Date: 03/07/2005 21:45:04
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.

> Otherwise it looks good.

Okay, then I'll check how much files are affected by this change.
(Ummm, newsmips has its own NEWSMIPS_WSDISPLAYIO_GINFO ioctl for stride...)

> Is WSDISPLAYIO_GETCMAP sufficent for determining the size of the
> colormap (the need to size the red, green, and blue arrays before
> calling GETCMAP is what I'm noticing here).

Current struct wsdisplay_fbinfo has cmsize as wsdisplay(4) says:
>> 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?
---
Izumi Tsutsui