Bug 12129

Summary: Rotation crash with driver 6.7.191
Product: xorg Reporter: Johannes Hessellund <osos>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: 84yelo3, gunnar_thielebein
Version: 7.2 (2007.02)   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
stderr message of Xorg when Option Rotate is set
none
my setup
none
log with Rotate option
none
update of xorg.conf
none
log of the crash
none
possible fix for server none

Description Johannes Hessellund 2007-08-23 22:40:36 UTC
Been testing latest driver from xrandr 1.2 branch (or master now), version 6.7.191, compiled by Timo for Ubuntu gutsy.
http://ubuntuforums.org/showthread.php?t=532831

System:
Ubuntu Gutsy as of 23. august 2007.
Thinkpad T42 with Radeon 7500 32mb.
LVDS 1400x1050 50hz
DVI flatpanel 1280x1024 60hz

Tried rotating the panel, both the LVDS without DVI connected, and the DVI panel with LVDS off. Both crashes my computer, and I have to power off.

I noticed an warning when trying to expand my desktop by the 2 screens:
xrandr --output LVDS --mode 1400x1050 --right-of DVI-0
gives: Supported resolution only 1600x1200 requesting 2680x1200.

After powering off the LVDS and requesting rotation on DVI-0, same error occured. I then lowered resolution on DVI-0 to 1024x768 and rotated, computer hangs!

More I noticed in clone-mode, the DVI-0 panel behaves normal, but the LVDS is like stop-motion, like its showing only half the frames of the DVI.
Windows handles both clone-mode and desktop-expand great, so the card is capable.

What info can I provide?
Comment 1 Alex Deucher 2007-08-24 06:21:02 UTC
Rotation is not expected to work at the moment, I implemented it, but never got it fully working.  keep an eye on the git logs though, it'll work eventually.  regarding the max FB size, the driver was limited to 1600x1200 by default.  I've since adjusted the max sizes a bit based on vram, but they may be bigger or smaller than you want.  To change the max desktop size, add a virtual line to the screen section of your config specifying the max size you want, e.g.,

Virtual 2680 1200

Once we get ttm support, we will be able to dynamically resize the buffers.
Comment 2 Alex Deucher 2007-08-26 16:04:54 UTC
should be working in git:
d43596e5f5d7c60f96b57bc3e743a9b40eb7109d
EXA composite accel doesn't seem to do the right thing yet though so use XAA or disable render accel.
Comment 3 Johannes Hessellund 2007-09-01 05:06:34 UTC
Yes it is working!! It's not crashing...

But very slowly. Everything is redrawing very slow and badly. Using XAA accelleration. Try moving a window around, or scrolling in firefox!
Useless... sorry.

Offtopic: Having Both the DVI-0 and the LVDS connected, the LVDS still seems to be running at 5 hz instead of 50 hz!?
Comment 4 Daniel Stone 2007-09-01 05:28:51 UTC
if you're running xserver master, this is probably due to lack of mtrr support.
Comment 5 Johannes Hessellund 2007-09-01 06:46:22 UTC
(In reply to comment #4)
> if you're running xserver master, this is probably due to lack of mtrr support.
> 

Running the current of Ubuntu Gutsy. xserver 1.3 with some patches i think.
Is the xserver lacking support for mtrr, or my hardware?
Anything to do about it?
Comment 6 Nicolò Chieffo 2007-09-01 07:43:50 UTC
I'm sorry to reopen the bug, but in my case it does not work.
I have the package 6.7.192-1ubuntu1

My screen gets garbled  and the system does not respond to the commands anymore

Section "Device"
    Identifier  "ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]"
    Driver      "radeon"
    Busid       "PCI:1:0:0"
    Option      "XAANoOffscreenPixmaps"
    Option      "GartSize"      "64"
    Option      "AccelDFS"      "true"
    Option      "ColorTiling"   "true"
    Option      "EnablePageFlip"    "true"
EndSection
Comment 7 Alex Deucher 2007-09-01 08:34:57 UTC
radeon does not have functional acceleration for rotation yet, so it will be slow.
Comment 8 Alex Deucher 2007-09-01 08:39:02 UTC
(In reply to comment #6)
> I'm sorry to reopen the bug, but in my case it does not work.
> I have the package 6.7.192-1ubuntu1
> 
> My screen gets garbled  and the system does not respond to the commands anymore
> 

>     Option      "XAANoOffscreenPixmaps"
>     Option      "AccelDFS"      "true"
>     Option      "ColorTiling"   "true"
>     Option      "EnablePageFlip"    "true"

Can you try removing these options one by one and see if any of them help?
Comment 9 Johannes Hessellund 2007-09-01 08:42:58 UTC
(In reply to comment #6)

This is my working config:

Section "Device"
	Identifier	"ATI Technologies, Inc. Radeon Mobility M7 LW [Radeon Mobility 7500]"
	Driver		"radeon"
	BusID		"PCI:1:0:0"
	Option		"XAANoOffscreenPixmaps" "true"
	Option    "ColorTiling"   "on"
	Option		"DynamicClocks"	"on"
	Option		"AGPMode"	"4"
	Option		"AGPFastWrite"	"yes"
        Option     "EnableDepthMoves"          "yes"
        Option     "EnablePageFlip"             "yes"
	Option          "Accel"
	Option "AccelMethod" "XAA"
	Option "RenderAccel" "false"
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Device		"ATI Technologies, Inc. Radeon Mobility M7 LW [Radeon Mobility 7500]"
	Monitor		"Standard Skærm"
	DefaultDepth	24
	SubSection "Display"
		Virtual		2680 1400
		Depth		24
		Modes		"1400x1050" "1280x1024"  "1024x768" "800x600" "640x480"
	EndSubSection
EndSection
Comment 10 Nicolò Chieffo 2007-09-01 10:00:02 UTC
I tried without any options, and also in fedora 8 I have this problem.
Is there any way to get debug informations about the rotation? I tried Xorg.0.log and .xsession-errors but it does not contain anything 
Comment 11 Alex Deucher 2007-09-24 08:38:11 UTC
(In reply to comment #10)
> I tried without any options, and also in fedora 8 I have this problem.
> Is there any way to get debug informations about the rotation? I tried
> Xorg.0.log and .xsession-errors but it does not contain anything 
> 

can you get a backtrace of the crash with GDB?
http://wiki.x.org/wiki/Development/Documentation/ServerDebugging
Comment 12 Nicolò Chieffo 2007-09-24 09:13:42 UTC
Now I only have 1 pc, and I'm afraid it is too difficult...
Comment 13 Gunnar Thielebein 2007-12-31 06:58:17 UTC
i have an 9800xt and with the 1:6.7.197-1 from debian sid I get rotation working in ubuntu gutsy. Performance is very slow yet. When will this be increased?

What me bothers is that I can't set Rotation statical in xorg.conf.

I tried with one monitor and dual-head setup and always Xorg refuses to start.

attached error and xorg.conf
Comment 14 Gunnar Thielebein 2007-12-31 06:59:38 UTC
Created attachment 13433 [details]
stderr message of Xorg when Option Rotate  is set
Comment 15 Gunnar Thielebein 2007-12-31 07:00:21 UTC
Created attachment 13434 [details]
my setup
Comment 16 Gunnar Thielebein 2007-12-31 07:04:07 UTC
the device name is not the one of my card so don't get clouded.
Comment 17 Alex Deucher 2007-12-31 09:51:54 UTC
Can you attach your full xorg log?
Comment 18 Gunnar Thielebein 2008-01-02 15:30:47 UTC
Created attachment 13467 [details]
log with Rotate option
Comment 19 Alex Deucher 2008-01-02 17:14:53 UTC
remove this option:
	Option "XAANoOffscreenPixmaps" "true"
or switch to exa.
and make sure you have a large enough virtual space for the rotated screen:
Virtual	2304 2304
Comment 20 Gunnar Thielebein 2008-01-03 07:45:54 UTC
Created attachment 13486 [details]
update of xorg.conf

I have changed my configuration like you suggested but still no change.
Comment 21 Gunnar Thielebein 2008-01-03 07:49:09 UTC
Created attachment 13487 [details]
log of the crash

I now use XAA again because EXA renders very slow but before I also tried EXA which crashed, too.
Comment 22 Alex Deucher 2008-01-03 12:49:42 UTC
fixed in git: 2e4473b63d65801ae8ac5a8391de232b2201d958

xf86CrtcRotate() accesses pScrn->pScreen which is not set during ScreenInit(). This should also be fixed in the server.
Comment 23 Alex Deucher 2008-01-03 12:50:33 UTC
Created attachment 13495 [details] [review]
possible fix for server
Comment 24 Alex Deucher 2008-01-03 22:22:56 UTC
fixed in xserver as well.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.