xserver/hw/kdrive/fbdev fbdev.c,1.45,1.46

Keith Packard <xserver-commit-u7BhqnqprCWvj1b/[email protected]>
Newsgroups gmane.comp.freedesktop.xserver.cvs
Message-ID <[email protected]>
Committed by: keithp

Update of /cvs/xserver/xserver/hw/kdrive/fbdev
In directory pdx:/tmp/cvs-serv4032/hw/kdrive/fbdev

Modified Files:
	fbdev.c 
Log Message:
2004-06-27  Keith Packard  <[email protected]>

	* hw/kdrive/ati/ati.c: (ATICardInit), (ATISetOffscreen),
	(ATIScreenInit), (ATIRandRSetConfig), (ATIRandRInit),
	(ATIFinishInitScreen), (ATIEnable):
	* hw/kdrive/ati/ati.h:
	* hw/kdrive/ati/ati_cursor.c: (ATICursorInit):
	* hw/kdrive/ati/ati_draw.c: (RadeonSwitchTo2D), (RadeonSwitchTo3D),
	(ATIBlockHandler), (ATIWakeupHandler), (ATIDrawEnable),
	(ATIDrawDisable), (ATIDrawFini):
	Separate out off-screen allocation from Init.
	Fix Enable to update off-screen addresses.
	Wrap RandR to update off-screen addresses.
	
	* hw/kdrive/fbdev/fbdev.c: (fbdevMapFramebuffer):
	Set off_screen_base and memory_size fields correctly.


Index: fbdev.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/fbdev/fbdev.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- fbdev.c	28 May 2004 04:56:49 -0000	1.45
+++ fbdev.c	28 Jun 2004 00:48:51 -0000	1.46
@@ -333,14 +333,14 @@
     screen->width = priv->var.xres;
     screen->height = priv->var.yres;
     screen->memory_base = (CARD8 *) (priv->fb);
-    screen->memory_size = 0;
-    screen->off_screen_base = 0;
+    screen->memory_size = priv->fix.smem_len;
     
     if (scrpriv->shadow)
     {
 	if (!KdShadowFbAlloc (screen, 0, 
 			      scrpriv->randr & (RR_Rotate_90|RR_Rotate_270)))
 	    return FALSE;
+	screen->off_screen_base = screen->memory_size;
     }
     else
     {
@@ -348,6 +348,7 @@
         screen->fb[0].pixelStride = (priv->fix.line_length * 8 / 
     				 priv->var.bits_per_pixel);
         screen->fb[0].frameBuffer = (CARD8 *) (priv->fb);
+	screen->off_screen_base = screen->fb[0].byteStride * screen->height;
     }
     
     return TRUE;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.