Bug 18228 - [REGRESSION] rotation does not work any more
Summary: [REGRESSION] rotation does not work any more
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: 7.3 (2007.09)
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Wang Zhenyu
QA Contact: Xorg Project Team
Depends on:
Reported: 2008-10-26 07:38 UTC by Eric Piel
Modified: 2008-11-09 18:11 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

Xorg.0.log when Legacy3D is on (34.60 KB, text/plain)
2008-11-03 10:03 UTC, Eric Piel
no flags Details
Xorg.0.log when Legacy3D is off (rotation works) (35.51 KB, text/plain)
2008-11-03 10:04 UTC, Eric Piel
no flags Details

Description Eric Piel 2008-10-26 07:38:23 UTC
I've just upgraded to intel 2.5.0 (from 2.4.2). The rotation does not work anymore:
$ xrandr --output LVDS --rotate left
xrandr: Configure crtc 1 failed

And these lines appear in Xorg.0.log:
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(II) intel(0): EDID vendor "CMO", prod id 4641
(EE) intel(0): Failed to pin rotated crtc: Cannot allocate memory
(EE) intel(0): Couldn't allocate shadow memory for rotated CRTC
(II) intel(0): using SSC reference clock of 100 MHz
(II) intel(0): Selecting standard 18 bit TMDS pixel format.

Let's note that xrandr is very nice, as it detect that the rotation failed, it reverts to normal. However, with the gnome applet, that error is not handled, and my laptop screen becomes black (and the root window's dimension is changed for the rotated size).

More about my config:
Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
x11 server 1.4.2
Linux kernel 2.6.28-rc1 (64bits)
libdrm 2.4.0
Comment 1 Eric Piel 2008-10-26 07:48:58 UTC
Just noticed that these messages also appears in dmesg:
[drm:i915_gem_object_bind_to_gtt] *ERROR* GTT full, but LRU list empty
[drm:i915_gem_object_pin] *ERROR* Failure to bind: -12
Comment 2 Gordon Jin 2008-10-26 19:38:18 UTC
Haien, can you reproduce this?
Comment 3 liuhaien 2008-10-26 23:18:10 UTC
(In reply to comment #2)
> Haien, can you reproduce this?
I can't reproduce it with our q3-rc5-package and kernel 2.6.28-rc1.
Comment 4 Wang Zhenyu 2008-10-27 02:02:20 UTC
Eric, you may try with Option "Legacy3D" "off" in Device section, which won't alloc classic texture memory and will make more aperture space available.
Comment 5 Eric Piel 2008-10-27 02:15:08 UTC
Ok, I'll try. I actually tried "Legacy3D" "on"... but it seems I misunderstood the meaning of the option ;-) (from the manpage I understood it would disable GEM mode).

In the mean time, I've rebooted on a kernel 2.6.27, and rotation works fine. So it's likely coming from somewhere in this direction...
Comment 6 Eric Piel 2008-11-03 10:01:53 UTC
Legacy3D "off" does make the rotation working again. But that's just a workaround, I don't think it's nice to have to add special options to xorg.conf just to have rotation working! I'll attach the Xorg.0.log's with and without Legacy3D. Hopefully the differences will help you to find where is the problem...
Comment 7 Eric Piel 2008-11-03 10:03:41 UTC
Created attachment 20019 [details]
Xorg.0.log when Legacy3D is on
Comment 8 Eric Piel 2008-11-03 10:04:50 UTC
Created attachment 20020 [details]
Xorg.0.log when Legacy3D is off (rotation works)
Comment 9 Wang Zhenyu 2008-11-03 17:28:05 UTC
We can not turn Legacy3D off by default even in Gem case, because X driver have no idea what version of mesa user will be using. If non-gem enabled mesa was in use, 2D driver didn't allocate classic texture memory space for it, all 3d apps would fail.

So use the option as a workaround for now to leave more aperture space for rotated fb, we might fix this by bo-based fb later but I'm not sure.
Comment 10 Eric Piel 2008-11-04 06:13:31 UTC
Do you mean that on an ideal distro which has everything up-to-date and recompiled, Legacy3D "off" would have no drawback?
Comment 11 Wang Zhenyu 2008-11-04 16:50:54 UTC
yeah, the concern here is what mesa version you'll be using.
Comment 12 Wang Zhenyu 2008-11-09 18:11:36 UTC
Close this one as workaround is available now and we might provide better solution later.

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.