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

Keith Packard xserver-commit at pdx.freedesktop.org
Sun Jun 27 17:48:53 PDT 2004


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  <keithp at keithp.com>

	* 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;




More information about the xserver-commit mailing list