[Xorg-driver-geode] Update -- The RandR-"unable to setrotation" issue in AMD Geode LX platform
Cui, Hunk
Hunk.Cui at amd.com
Fri Jun 18 00:40:37 PDT 2010
Hi, Mitch,
In yesterday's update note, there is one place with connection to X server lost. I changed it and resend a new one to review.
To repeatedly cycle test, I have written a shell-script to test the rotate. Now it can properly rotate in Xserver 1.8 (Need add my gamma correction patch).
Because I have some confuse on memorysize, so I need some time to research and consider whether this approach is correct. I can not explain too specific. But it can solve your urgent rotate issue in temporary.
Any other latest update, I will inform.
Please see below change:
--- /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-18 14: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 += 1; //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 -= 1; //Hunk add
lx_crtc->rotate_mem = NULL;
}
}
Welcome everyone test the code.
I suggest you try:
Rotate left: xrandr --output OUTPUT --rotate left
Rotate right: xrandr --output OUTPUT --rotate right
Rotate normal: xrandr --output OUTPUT --rotate normal
where OUTPUT would be replaced by one of the outputs shown when you run `xrandr' without any options. You can use "xrandr -q" to know your OUTPUT name.
BTW: The Xrandr Guide: http://www.thinkwiki.org/wiki/Xorg_RandR_1.2#Note_for_Ubuntu_Gutsy_users
The `-o' options is a RandR 1.0/1.1 command and may exercise a different driver code path from the RandR 1.2 `--rotate' option. RandR 1.2 introduced per-output rotation which wasn't available in earlier versions. Consequently, `xrandr -o' is equivalent to rotating the entire desktop (composed of all the outputs) rather than just a specific output. Depending on the Geode driver's support for multiple outputs and which outputs are connected, using `xrandr -o' could confuse the driver.
Thanks,
Hunk Cui
-----Original Message-----
From: xorg-driver-geode-bounces+hunk.cui=amd.com at lists.x.org [mailto:xorg-driver-geode-bounces+hunk.cui=amd.com at lists.x.org] On Behalf Of Mitch Davis
Sent: Friday, June 18, 2010 3:26 PM
To: Cui, Hunk
Cc: xorg-driver-geode at lists.x.org; Huang, FrankR; Xie, Michael
Subject: Re: [Xorg-driver-geode] Update -- The RandR-"unable to setrotation" issue in AMD Geode LX platform
On Thu, Jun 17, 2010 at 10:50 PM, Mitch Davis
<mjd-xorg-driver-geode at afork.com> wrote:
> On Thu, Jun 17, 2010 at 8:00 PM, Cui, Hunk <Hunk.Cui at amd.com> wrote:
>>
>> 1. As mentioned about the RandR-"unable to set rotation" issue, in our
>
>> 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.
>
> Hi Hunk,
>
> Thank you for this. I am using 1.7.5, so I will definitely try it out tomorrow.
I have just tried it out with 1.7.5. I don't get the black screen,
but I don't get rotation either. I think maybe I'm doing it wrong.
Here is my xorg.conf file:
http://pastebin.com/PvgBGHDY
Here is my X log:
http://pastebin.com/DBAAwrZv
It has these errors:
(EE) GEODE(0): Couldn't allocate the shadow memory for rotation
(EE) GEODE(0): You need 0x300000 bytes, but only 0x0 bytes are available
Just to confirm, here is the patch I'm using:
http://pastebin.com/y1TinSXd
I have tried setting rotation using xrandr -o. xrandr -o 2 gives me this error:
$ xrandr -o 2
Failed to change the screen configuration!
xrandr -o 2 is ok.
$ xrandr -o 0
$
Can anyone make any suggestions please?
Thanks,
Mitch.
_______________________________________________
Xorg-driver-geode mailing list
Xorg-driver-geode at lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-geode
More information about the Xorg-driver-geode
mailing list