Subject: Adding video mode info to struct wsscreen_descr
To: None <tech-kern@netbsd.org>
From: Bang Jun-Young <junyoung@mogua.com>
List: tech-kern
Date: 07/09/2002 19:21:37
Hi,

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:

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>