Subject: Re: Adding video mode info to struct wsscreen_descr
To: Bang Jun-Young <junyoung@mogua.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 07/09/2002 07:38:26
On Tue, Jul 09, 2002 at 07:21:37PM +0900, Bang Jun-Young wrote:

 > Some of you may know that I have been working on raster graphics
 > mode VGA driver and Mach64 framebuffer driver for some time. In order
 > to make video mode switching cleaner and simpler on those drivers,
 > I'd like to add a new member to struct wsscreen_descr. See below:

How about just a "void *modecookie" or something that points to an
object that is opaque to wscons itself?  Why does wscons need to know
about the dot clock, etc?  Only the VGA support routines need to know
about that.

 > 
 > diff -u -r1.22 wsdisplayvar.h
 > --- wsdisplayvar.h	2002/07/04 14:37:14	1.22
 > +++ wsdisplayvar.h	2002/07/09 10:05:09
 > @@ -86,6 +86,7 @@
 >  #define WSSCREEN_HILIT		4	/* can highlight (however) */
 >  #define WSSCREEN_BLINK		8	/* can blink */
 >  #define WSSCREEN_UNDERLINE	16	/* can underline */
 > +	struct video_modetiming *mode;
 >  };
 >  
 >  struct wsdisplay_font;
 > 
 > where struct video_modetiming is defined in dev/ic/vidmode.h (which's
 > not there yet) as follows:
 > 
 > struct video_modetiming {
 > 	int dot_clock;		/* Dot clock frequency in kHz. */
 > 	int hdisplay;		
 > 	int hsync_start;
 > 	int hsync_end;
 > 	int htotal;
 > 	int vdisplay;
 > 	int vsync_start;
 > 	int vsync_end;
 > 	int vtotal;
 > 	int flags;		/* Video mode flags; see below. */
 > };
 > 
 > This info is pretty much same as mode line info found in XF86Config.
 > And it is not needed in character-cell based display drivers, and
 > thus, can be simply ignored if it's not used.
 > 
 > Any comments?
 > 
 > Jun-Young
 > 
 > -- 
 > Bang Jun-Young <junyoung@mogua.com>

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>