[Xorg-driver-geode] Update -- The RandR-"unable to set rotation" issue in AMD Geode LX platform

Cui, Hunk Hunk.Cui at amd.com
Thu Jun 17 03:00:26 PDT 2010


Hi, Mitch,

1. As mentioned about the RandR-"unable to set rotation" issue, in our xf86-video-geode driver, all of memories are allocated by GeodeAllocOffscreen, the exa offscreen memory is part of the memorySize. And the rotation data is not in memorySize, it is allocated after memorySize.

2. Communion with Maarten Maathuis (from Xorg-devel).
In exaAllocOffscreen, rotateddata has to be allocated between memoryBase and memorySize.
In GeodeAllocOffscreen, rotateddata is not in memorySize, it is allocated after memorySize.

This is exactly the reason why exa doesn't recognize it.
	
I modify the code and upload a diff patch for tests, now the update methods have been test in Ubuntu desktop. (rotate right) 

I have repeatedly tested this method in Xserver 1.7, but in Xserver 1.8, still have some problem, so I will go to research the reason.
 	
Welcome everyone test the code.

--- /driver/xf86-video-geode-2.11.8.ogig/src/lx_display.c	2010-06-10 19:11:02.000000000 +0800
+++ /driver/xf86-video-geode-2.11.8/src/lx_display.c	2010-06-17 19:58:39.000000000 +0800
@@ -338,10 +338,14 @@
     int i;
 
     assert(size == 256);
-
+    /* We need the Gamma Correction for video - fading operation, 
+     * the values address should plus for every cycle 
+     */
     for (i = 0; i < 256; i++) {
-	unsigned int val = (*red << 8) | *green | (*blue >> 8);
-
+	(*red) &= 0xff00;
+	(*green) &= 0xff00;
+	(*blue) &= 0xff00;
+	unsigned int val = (*(red++) << 8) | *(green++) | (*(blue++) >> 8);
 	df_set_video_palette_entry(i, val);
     }
 
@@ -378,6 +382,7 @@
 	return NULL;
     }
 
+    pGeode->pExa->memorySize += lx_crtc->rotate_mem->size; //Hunk add
     memset(pGeode->FBBase + lx_crtc->rotate_mem->offset, 0, size);
     return pGeode->FBBase + lx_crtc->rotate_mem->offset;
 }
@@ -417,6 +422,7 @@
     if (data) {
 	gp_wait_until_idle();
 	GeodeFreeOffscreen(pGeode, lx_crtc->rotate_mem);
+	pGeode->pExa->memorySize -= lx_crtc->rotate_mem->size; //Hunk add
 	lx_crtc->rotate_mem = NULL;
     }
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-driver-geode/attachments/20100617/9ec2209b/attachment.htm>


More information about the Xorg-driver-geode mailing list