Unable to set rotation on AMD Geode LX800

Bug #377929 reported by Julien Olivier
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
xserver-xorg-video-geode (Debian)
Fix Released
Unknown
xserver-xorg-video-geode (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-geode

On Gutsy, using xserver-xorg-video-amd driver, I could set my screen rotation by setting the "Rotate" option in xorg.conf. Since I installed Jaunty, the "Rotate" option doesn't have any effect anymore.

[lspci]
00:01.1 VGA compatible controller [0300]: Advanced Micro Devices [AMD] Geode LX Video [1022:2081]
     Subsystem: Advanced Micro Devices [AMD] Geode LX Video [1022:2081]

Revision history for this message
Julien Olivier (julo) wrote :

I forgot to say that in Jaunty I am now using the "geode" driver instead of the "amd" driver.

Revision history for this message
Bryce Harrington (bryce) wrote :

Hi julo,

Please attach the output of `lspci -vvnn`, and attach your /var/log/Xorg.0.log (and maybe Xorg.0.log.old) file from after reproducing this issue. If you've made any customizations to your /etc/X11/xorg.conf please attach that as well.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-xorglog
tags: added: needs-lspci-vvnn
Changed in xserver-xorg-video-geode (Ubuntu):
status: New → Incomplete
Revision history for this message
Julien Olivier (julo) wrote :
Revision history for this message
Julien Olivier (julo) wrote :
Revision history for this message
Julien Olivier (julo) wrote :
Revision history for this message
Julien Olivier (julo) wrote :

Here you are. Sorry for the delay.

Bryce Harrington (bryce)
description: updated
Bryce Harrington (bryce)
Changed in xserver-xorg-video-geode (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Unless I'm mistaken, this issue was reported as Debian bug #512020 (see link above) where a partial solution exists. Can you confirm whether your situation matches the above Debian bug?

Changed in xserver-xorg-video-geode (Debian):
status: Unknown → New
Bryce Harrington (bryce)
tags: added: jaunty
Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Julien, can the issue you reported still be reproduced using 2.11.6-3 from Lucid (or the Hardy backport from my PPA)?

Revision history for this message
Rigoberto Torres (rigo-torres) wrote :

Hi Guys, this is Rigo from Advanced Micro Devices. I looked at this rotation issue using Ubuntu 9.10 which comes with generic kernel 2.6.31-17 and Xserver 1.6.4. I am able to rotate the screen just fine with the default geode driver that comes with this distribution using Xrandr. I used command such as:
> xrandr -o left
> xrandr -o right
> xrandr -o inverted
> xrandr -o normal

Rotation is working just fine with 'xrandr'. One thing I noticed is that 'xorg.conf' has been removed from Ubuntu 9.10, so I could not test the original post of rotation problems with 'Xorg.conf'. Since 'Xorg.conf' will no longer be available in current and future releases of Ubuntu it does not make sense to go to an older version of Ubuntu and try to figure out how to rotate from 'Xorg.conf'. We had already been warned that 'xorg.conf' would be removed in the future releases and instead of trying to fix this issue on one particular Ubuntu version I propose finding out what the original post wanted to accomplish by rotating from 'xorg.conf' and find a work around that would work on all the Ubuntu Linux distributions. For Example if the intention was just to use 'xorg.conf' to rotate the display as the system booted then we can do this from some other script file as the system boots.

So, if the person who original posted this issue has not solved this rotation problem, I would like that person to update this issue and let us know what he/she is trying to accomplish so we can suggest a suitable work around to the deprecated 'xorg.conf' way.

Revision history for this message
Julien Olivier (julo) wrote :

Sorry Rigoberto but I don't have the hardware anymore, so I can't verify whether it works now. Feel free to close the bug if no one else suffers from this.

Revision history for this message
Rigoberto Torres (rigo-torres) wrote :

Hi Guys, as I said before rotation is working fine through 'xrandr' and 'xorg.conf' has been deprecated. So, I would like to close this issue, but I am new to this posting and I do not see how to close this issue. I only see the option to report new bug and list open bug, but no option to change status/priority or close issue. Can any one provide me with a little guide on how to close an issue.

Bryce Harrington (bryce)
tags: added: hardy
Revision history for this message
Hunk Cui (hunk-cui) wrote :

Hi, all,

As Rigo said about “unable to set rotation on AMD Geode LX800”, I used Ubuntu 9.10 which comes with generic kernel 2.6.31-17 and Xserver 1.6.4, geode-driver 2.11.6, I also able to rotate the screen just fine with the default geode driver that comes with this distribution using Xrandr. Rotation is working just fine with 'xrandr'. I used command such as:
> xrandr -o left
> xrandr -o right
> xrandr -o inverted
> xrandr -o normal

I gave a try with 1.7.1 server on rotation, Geode driver 2.11.7, In our platform, the <OUTPUT> name is "default",
(BTW: In general use $ xrandr -q to discover the appropriate output names for your configuration, the reference link: http://www.thinkwiki.org/wiki/Xorg_RandR_1.2)

When I tried: "xrandr --output default --rotate left". The screen turn to black.
Then tried: "xrandr --output default --rotate normal --auto". The screen return to normal.

Now we doubt it is a bug, because from 1.6.4 server to 1.7.1 server, the part of RandR have been updated and changed from source code.

Are there any other ideas?

Thanks,
Hunk Cui

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Hunk,

It appears that either the --rotate option is not well-supported in our Geode driver or that it has become deprecated. Either way, I think that this needs to be documented or, alternately, xrandr needs to loose its deprecated options to remove the confusion. I'm curious of what the xorg-devel mailing list would propose as the correct solution. Can you work with them on this?

Thanks!
Martin-Éric

Revision history for this message
Hunk Cui (hunk-cui) wrote :

Hi, Martin,

    Now I am work with this issue, I have trace the key error point, you can see my update in Xorg-driver-geode Mailing List(http://lists.x.org/archives/xorg-driver-geode) about the The RandR-"unable to setrotation" issue in AMD Geode LX platform.

About the RandR-"unable to set rotation" issue.
1. Before 08/2008, our Geode-LX always use exaAllocOffscreen, but for update to Randr 1.2, Jordan Crouse replace exaAllocOffscreen with GeodeAllocOffscreen.
The change: http://cgit.freedesktop.org/xorg/driver/xf86-video-geode/commit/?id=d681a844e448712a9a419d2a4dca81930d39a80a

2. 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.

3. 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.

You can turn to the Xorg-driver-geode Mailing List to focus the schedule.
Any other latest update, I will inform.

Thanks,
Hunk Cui

Revision history for this message
Hunk Cui (hunk-cui) wrote :

Hi, all

  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 the 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 use:

    Rotate left: xrandr --output OUTPUT --rotate left
    Rotate right: xrandr --output OUTPUT --rotate right
    Rotate inverted: xrandr --output OUTPUT --rotate inverted
    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

Revision history for this message
Hunk Cui (hunk-cui) wrote :

1. Redistribute the Graphic memory (include in MemorySize).
2. Prepare allocate the shadow buffer, normally do Rotate operation.
3. Classic exa is made on the assumption that all memory usable for gpu acceleration is a linear range between memoryBase and memorySize.
4. Before modify, the Rotate_mem after memorySize could belong to another device. This is the error key point.
5. Rotateeddata has to be allocated between memoryBase and memorySize.
6. Recommand normally working: Setup Graphic memory in BIOS >=14MB

tags: added: patch
Revision history for this message
Hunk Cui (hunk-cui) wrote :

The first patch is used for modify integrated palette RAM for gamma-correction of the data stream. Let Graphic data absolutely passes through the Gamma Correction RAM. Special for Screensaver Operation. It will improve the gamma operation.

The second patch is used for fix the Rotate operation (exaOffscreenAlloc method), Deled prepare allocate mechanism. Use exaOffscreenAlloc allocate the shadow buffer. Rotateeddata has to be allocate in offscreen memory range.
Graphic memory >=10Mb (In BIOS setup)
*Ubuntu Bugzilla #377929

Open the patch test.

Thanks,
Hunk Cui

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Pushed both patches submitted at https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-geode/+bug/377929/comments/17 into the upstream GIT tree.

Revision history for this message
Hunk Cui (hunk-cui) wrote :

Hi, Martin,
    Thanks for your working, also in xorg-driver-geode mailing list, have updated to http://lists.x.org/archives/xorg-driver-geode/2010-July/000850.html: [PATCH 2/2] Fix rotation with newer Xserver versions (exaOffscreenAlloc).

Thanks,
Hunk Cui

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Hunk, can you please confirm whether this patch is in 2.11.8-11 or not?

Revision history for this message
Hunk Cui (hunk-cui) wrote :

Hi, Martin,
    Yes, this patch have been commited to 2.11.8-11.

Thanks,
Hunk Cui

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

8a61ef8f9f6b9dac6804754572250e59d80bdf06 in Geode 2.11.9 solves this unless I'm mistaken?

Revision history for this message
Hunk Cui (hunk-cui) wrote :

Martin,
    Solved some part, it need to modify the icon and glyph disappear when inverted rotation and back to normal.

Hunk Cui

Revision history for this message
Hunk Cui (hunk-cui) wrote :

Hi, all,
 Some time ago, it has some side effects on this issue.
 Phenomenon: when go to inverted mode rotation and back to normal, and afterwards various icons are gone and many fonts are just three vertical lines, also weird white and blue horizontal lines instead of the black gradient open box panel.

 After search, it need to modify the rotation pitch value and use own wrapper to allocate a pixmap for wrapping a buffer object, it removes using scratch pixmaps for rotate.

 The update is on http://lists.x.org/archives/xorg-driver-geode/2010-September/001062.html, any feedback, please told me.

Thanks,
Hunk Cui

Revision history for this message
Hunk Cui (hunk-cui) wrote :

Hi, all,
 Inverted rotation issue (icon and glyph missing and desktop Corruption phenomenon), it was tested by Frank and Mitch, also I have made a lot of testing (e g: change the Graphic memory in BIOS, long time to do the inverted rotation and then click the icon/button, change the display resolution, open the website, the Patch has supported x-server 1.6/1.7/1.8/1.9, running on ubuntu 10.04 and Fedora 12 platform etc), the feedback is well.
 About this patch, since the scratch pixmap header will be re-used after allocation, we need to clear its buffer object attachment when we stop using it, otherwise a later user will use a bogus buffer object. In addition, the pitch values also need to recalculate in lx_crtc_mode_set function, it is a line size, otherwise, the desktop will occur corruption.
 The commit is on http://cgit.freedesktop.org/xorg/driver/xf86-video-geode/commit/?id=74e28b83d5b725a134aad264771a7c9a4d0e38df , any feedback, please told me.
 It is focus on Ubuntu Bugzilla #377929 & Debian Bugzilla #512020.

Thanks,
Hunk Cui

Revision history for this message
Artur Rona (ari-tczew) wrote :

xserver-xorg-video-geode (2.11.9-4) unstable; urgency=low

  * Merged patch from upstream GIT to fix rotation (Closes: #512020).
  * Also fixes LP #377929.
 -- Martin-Eric Racine <email address hidden> Sun, 26 Sep 2010 13:54:02 +0300

Changed in xserver-xorg-video-geode (Ubuntu):
status: Confirmed → Fix Released
Changed in xserver-xorg-video-geode (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.