Bug 20412

Summary: [Q45] xf86-video-intel 2.6.x fails to accelerate rotated display
Product: xorg Reporter: Clemens Fruhwirth <clemens>
Component: Driver/intelAssignee: Jesse Barnes <jbarnes>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: gordon.jin, senjas
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Clemens Fruhwirth 2009-03-01 10:06:06 UTC
Using 2.4.2 handels the following case fine:

Section "ServerLayout"
        Identifier      "MainLayout"
        Screen          "IntelDualScreen"
        ..some input devices..
EndSection

Section "Screen"
        Identifier "IntelDualScreen"
        Monitor "IBMdual"
        Device "inteldualdrv"
        DefaultDepth 16 
        SubSection "Display"
                Depth 16
                Virtual 2800 1600
        EndSubSection
EndSection

Section "Device"
        Identifier "inteldualdrv"
        Driver "intel"
        Option "monitor-HDMI-2" "HP2035dual"
        Option "monitor-HDMI-1" "IBMdual"
EndSection
Section "Monitor"
        Identifier "HP2035dual"
        Option  "Position" "1200 0"
        Option "Rotate" "left"
EndSection
Section "Monitor"
        Identifier "IBMdual"
        Option "Rotate" "left"
EndSection

FYI: I run both monitors at 1600x1200 (rotate that'd be 1200x1600). 

Under 2.4.2 this works ok, except for the strange Virtual definition. Reducing either value results in overlapping screens. 2800 seems to come from some sort of 1200+1600. I have no clue why.

The second problem is the upgrade to 2.6.2. 2.6.2 fails to accelerate and every screen update takes half a second. What puzzles me is that I toyed around with xorg.conf a bit (reducing it to a single screen xorg.conf), and the moment I put Rotate "left" in there, acceleration fails. So, I'd call that a regression from 2.4.2.

Here are these two cases http://clemens.endorphin.org/debugX11/ - I guess the Xorg.log files won't be of any help, because if you diff them there is no additional error message: DRI fails in boths cases (fails=swrendering). DRI doesn't fail with 2.4.2 btw.

I would greatly appreciate any insights into this. I also appologize for the rather unmaintained state of my Xorg.conf.
Comment 1 Gordon Jin 2009-03-01 17:48:21 UTC
I guess we'd better start from the single display problem with rotation.

I'm meeting rotation issue with tiling on (bug#20265). Does setting tiling off works for you?
Comment 2 Clemens Fruhwirth 2009-03-04 04:16:29 UTC
Thanks for the reply. No, Tiling does not change the overall problem. I also tried with a single screen. Not even regular rotation works for me in an acceptable way.

I made a video of the problem http://www.youtube.com/watch?v=SIFGgrYkqXM 
Comment 3 Clemens Fruhwirth 2009-03-04 10:00:52 UTC
Just a quick note: The Dma initialization problem worried me, so I upgrade to 2.6.29-rc7 and indeed it fixed the Dma initialization problem. According to the log DRI seems work. But rotation acceleration doesn't seem to be related to DRI in any way. :/

Btw I also tried with xf86-video-intel-2.6.3. No changes to the situation. Can someone confirm the slowdown with a simple "xrandr -o left"? 
Comment 4 Andrey S. 2009-03-24 14:03:17 UTC
Same problem here with my tablet PC equipped with Intel 965GM.

In any rotated state (90, 180, 270 degrees)
not just 3D acceleration, but whole desktop is awfully slow:
moving windows, scrolling pdf's, web-pages, etc. 
Screen refresh rate seems to be about 2 - 5 herz.

I have noticed this bug after just another update of XOrg packages.

About my system...
I'm using openSUSE 11.1 with XOrg repository:
xorg-x11-driver-video-7.4-74.3
Model:   Mesa DRI Intel(R) 965GM 20090316 2009Q1 RC1
Driver:   2.0 Mesa 7.4-rc1
(I don't know how to convert openSUSE package numbers
to actual xf86-video-intel version. 
If you know how, please let me know.)
Comment 5 Clemens Fruhwirth 2009-03-27 11:53:53 UTC
Jesse - as you are the one that this bug is assigned to - can you confirm the problem with a simple xrandr -o left?
Comment 6 Jesse Barnes 2009-03-27 12:24:47 UTC
No I haven't tried reproducing this yet, but I've heard of similar problems on ATI, which would indicate a server problem...
Comment 7 Clemens Fruhwirth 2009-03-27 12:50:21 UTC
There is no server version change between my tests for 2.4.x and 2.6.x.
Comment 8 Clemens Fruhwirth 2009-04-02 07:04:02 UTC
With all due respect, this is not just a minor functionality regression. 2.6.x is completely unusable for me.

One month passed and my question for a single "xrandr -o left" is still unanswered. This "works-for-you?" check takes 10 seconds. Please Jesse, take time for this very simple check. It would at least help me to figure out whether this is a configuration problem or not.

Could 
http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=e964d4e53af3a47de6d09c884be1cc0044d03bea
or
http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=087f72e1f5d7d11b8795ba80a842874f5a9bb01d
be related?
Comment 9 Jesse Barnes 2009-04-02 09:48:10 UTC
(In reply to comment #8)
> With all due respect, this is not just a minor functionality regression. 2.6.x
> is completely unusable for me.
> 
> One month passed and my question for a single "xrandr -o left" is still
> unanswered. This "works-for-you?" check takes 10 seconds. Please Jesse, take
> time for this very simple check. It would at least help me to figure out
> whether this is a configuration problem or not.

Sorry Clemens, 10min * 50+ bugs assigned to me is nearly 10 hours of time, I have to prioritize.  I'll dig into this one when I can...  Last time I tried rotation (yesterday) I didn't notice any huge slowdown, but I didn't push it very hard either.

> Could 
> http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=e964d4e53af3a47de6d09c884be1cc0044d03bea

It's definitely possible that some of the tiling related changes are to blame here.  Also have you tried using UXA as your accelmethod?
Comment 10 Clemens Fruhwirth 2009-04-12 04:57:40 UTC
I tried UXA today. It was a somewhat mixed experience. First, UXA seems to strongly dislike failing mtrr allocations from kernel drm (The reason for these allocation failures seems to come from overlap in mtrr ranges as I have 4GB of memory). However, I removed a memory brick to try and UXA started to work on a single screen. Even xrandr -o left gave me a somewhat slugish but much better acceleration. However, putting 'Option "Rotate" "Left"' into xorg.conf made my X fail to draw any picture. Further, dual screen doesn't work for me at all. Neither rotated nor normal. (Framebuffer console cloning worked however)

I do not plan to persue this bug any further. I will switch graphic chipsets, sorry.
Comment 11 Jesse Barnes 2009-04-13 10:04:21 UTC
Gordon, since Clemens won't pursue this further you can close this unless your team can reproduce (I can't).
Comment 12 Andrey S. 2009-04-13 13:41:06 UTC
> Gordon, since Clemens won't pursue this further you can close this unless your
team can reproduce (I can't).

Does this mean, that rotated display refresh rate 
and acceleration in your system is the same as in normal position?

After a couple of updates from openSUSE XOrg repository
My Intel GM965 system is still extremely slow in rotated state.
From Xorg.0.log:
Loading /usr/lib64/xorg/modules//drivers/intel_drv.so
Module intel: vendor="X.Org Foundation"
	compiled for 1.6.0, module version = 2.6.99

Tried these options, none of them helped.
        Option          "AccelMethod"           "UXA"
        Option          "Tiling"                "No"

What should I do?
Should I open bug report for GM965? 
As I understand this one is for Q45.
Comment 13 Gordon Jin 2009-04-13 22:37:12 UTC
Jesse, I can't reproduce this either.
Comment 14 Jesse Barnes 2009-05-04 15:25:59 UTC
Andrey, yes it's working fine for me (though I usually use xrandr --output LVDS --rotate right/left/normal instead of xrandr -o).

If you're still seeing issues with the 2.7.0 release and rotation, please try to collect profiling information (using sysprof or oprofile) so we can see where the CPU might be spending time.  Thanks.
Comment 15 Jesse Barnes 2009-05-04 15:26:18 UTC
Oh and open a separate bug from this one.
Comment 16 Andrey S. 2009-05-05 12:12:08 UTC
> If you're still seeing issues with the 2.7.0 release and rotation, please try
> to collect profiling information (using sysprof or oprofile) so we can see
> where the CPU might be spending time.  Thanks.

Yes, still seeing this problem with 2.7.0.
Bug already opened: https://bugs.freedesktop.org/show_bug.cgi?id=21570

At the moment I don't know anything about system profiling.
Just a link to some sort of FAQ or manual, 
how to do it for X.Org will be enough.

Thanks!

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.