The RandR-"unable to set rotation" issue in AMD Geode LX platform

Cui, Hunk Hunk.Cui at amd.com
Wed Jun 2 04:15:24 PDT 2010


Hi, Alex,

	I have been established three Xorg environments, only use the XRandR client program (it can download from http://cgit.freedesktop.org/xorg/ ).
The phenomenon, see below:
1).Xserver-1.6.4/Geode driver-2.11.7
	Run: xrandr --output default --rotate left 
	Phenomenon: The screen properly rotate 
	Run: xrandr --output default --rotate normal --auto
	Phenomenon: The screen return to normal state 
2).Xserver-1.7.1/Geode driver-2.11.7
	Run: xrandr --output default --rotate left 
	Phenomenon: The screen turn to black 
	Run: xrandr --output default --rotate normal --auto
	Phenomenon: The screen return to normal state 
3).Xserver-1.8.99/Geode driver-2.11.8
	Run: xrandr --output default --rotate left 
	Phenomenon: The screen turn to black 
	Run: xrandr --output default --rotate normal --auto
	Phenomenon: The screen does not return to normal state, still black

	Now the problem become more and more urgent, I use ddd tools to trace the part of Xserver.

	In Xserver-1.6.4, I trace the source about the composite operation, as following:

#0  lx_do_composite (pxDst=0x8bef7f0, srcX=0, srcY=0, maskX=13860, maskY=-1740, dstX=0, dstY=0, width=1024, height=768) at lx_exa.c:992
#1  exaTryDriverComposite (op=<value optimized out>, pSrc=<value optimized out>, pMask=0x0, pDst=0x8bb41c0, xSrc=0, ySrc=0, xMask=<value optimized out>, yMask=<value optimized out>, xDst=<value optimized out>, yDst=<value optimized out>, width=<value optimized out>, height=<value optimized out>) at exa_render.c:688
#2  exaComposite (op=1 '\001', pSrc=0x8bb2fc0, pMask=0x0, pDst=0x8bb41c0, xSrc=0, ySrc=0, xMask=0, yMask=0, xDst=0, yDst=0, width=1024, height=768) at exa_render.c:935
#3  damageComposite (op=0 '\000', pSrc=0x8bb2fc0, pMask=0x0, pDst=0x8bb41c0, xSrc=<value optimized out>, ySrc=<value optimized out>, xMask=<value optimized out>, yMask=<value optimized out>, xDst=<value optimized out>, yDst=<value optimized out>, width=<value optimized out>, height=<value optimized out>) at damage.c:643
#4  CompositePicture (op=1 '\001', pSrc=0x8bb2fc0, pMask=0x0, pDst=0x8bb41c0, xSrc=0, ySrc=0, xMask=<value optimized out>, yMask=<value optimized out>, xDst=<value optimized out>, yDst=<value optimized out>, width=1024, height=768) at picture.c:1675
#5  xf86RotateCrtcRedisplay (screenNum=0, blockData=0x0, pTimeout=0xbfaa3aec, pReadmask=0x81ef240) at xf86Rotate.c:118
#6  xf86RotateRedisplay (screenNum=0, blockData=0x0, pTimeout=0xbfaa3aec, pReadmask=0x81ef240) at xf86Rotate.c:249
#7  xf86RotateBlockHandler (screenNum=0, blockData=0x0, pTimeout=0xbfaa3aec, pReadmask=0x81ef240) at xf86Rotate.c:269
#8  BlockHandler (pTimeout=0xbfaa3aec, pReadmask=0x81ef240) at dixutils.c:384
#9  WaitForSomething (pClientsReady=0x8be4900) at WaitFor.c:215
#10 Dispatch () at dispatch.c:386
#11 main (argc=1, argv=0xbfaa3c84, envp=0xbfaa3c8c) at main.c:397

	The lx_do_composite function is the Geode-driver function, the others are the XServer function, when I replace to the Xsever1.7.1 or Xserver1.8.99, the maskX and maskY values are 0. That make me doubt it. Can you have some other opinion? And you said the shadow_create, What is mean about it?

Thanks,
Hunk Cui

-----Original Message-----
From: Alex Deucher [mailto:alexdeucher at gmail.com] 
Sent: Thursday, May 27, 2010 10:57 PM
To: Cui, Hunk
Cc: xorg-devel at lists.x.org; xorg at lists.freedesktop.org; Kai-Uwe Behrmann; Adam Jackson; yangman at gmail.com
Subject: Re: The RandR-"unable to set rotation" issue in AMD Geode LX platform

On Wed, May 26, 2010 at 11:40 PM, Cui, Hunk <Hunk.Cui at amd.com> wrote:
> Hi, all,
>
> As said on Ubuntu BTS,
> https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-geode/+bug/377929
>
> 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.
>
> Because from 1.6.4 server to 1.7.1 server, the part of RandR have been
> updated and changed from source code.
>
> Who know the change about the part of RandR in Xserver 1.7.1?

I don't recall what might have changed with regard to rotation in
xserver 1.7.1 off hand.  However, randr-based rotation is implemented
via composite.  If your driver implements EXA, the EXA composite hook
would be used, so you need to make sure your composite hook handles
transforms or if not falls back properly so it can be handled by
software.  Also make sure you implement the randr crtc hooks for
allocating the shadow pixmap used for rotation (shadow_create,
shadow_allocate, shadow_destroy).  Finally in your crtc mode_set
function, make sure you set the crtc base address to the shadow buffer
is rotation is active.

Alex



More information about the xorg mailing list