Bug 60124 - no accelerated rendering on rotated display
no accelerated rendering on rotated display
Status: RESOLVED FIXED
Product: xorg
Classification: Unclassified
Component: Driver/intel
unspecified
All Linux (All)
: medium normal
Assigned To: Chris Wilson
Intel GFX Bugs mailing list
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-31 15:29 UTC by sjoerd.timmer
Modified: 2013-02-01 08:44 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sjoerd.timmer 2013-01-31 15:29:27 UTC
Description:
there is no accelerated rendering on the secondary screen in dual head mode when the secondary screen is rotated.

I am aware of virtual framebuffer limits of 2048x2048 on intel integrated graphics, but that is not the problem here since it works if the second monitor is not rotated. When both screens are non-rotated everything works fine with both screens side by side(2960 pixels wide) as long as i don't start a compositing window manager.

I have intel integrated graphics:
00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02)
00:02.1 Display controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02)

I have two monitors as reported by xrandr:
Screen 0: minimum 320 x 200, current 2704 x 1280, maximum 4096 x 4096
VGA1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 473mm x 296mm
1280x1024 75.0 + 60.0 
1680x1050 60.0*+
1680x945 60.0 
1400x1050 74.9 60.0 
1600x900 60.0 
1440x900 75.0 59.9 
1280x960 60.0 
1366x768 60.0 
1360x768 60.0 
1280x800 74.9 59.8 
1152x864 75.0 
1280x768 74.9 59.9 
1024x768 75.1 70.1 60.0 
1024x576 60.0 
800x600 72.2 75.0 60.3 56.2 
848x480 60.0 
640x480 72.8 75.0 60.0 
720x400 70.1 
DVI1 connected 1024x1280+1680+0 left (normal left inverted right x axis y axis) 376mm x 301mm
1280x1024 60.0*+ 75.0 
1280x960 60.0 
1280x800 74.9 59.9 
1152x864 75.0 
1280x768 74.9 60.0 
1024x768 75.1 70.1 60.0 
1024x576 60.0 
800x600 72.2 75.0 60.3 56.2 
848x480 60.0 
640x480 72.8 75.0 60.0 
720x400 70.1 



I can un-rotate the right/DVI screen and then there is no problem, but when it is rotated rendering becomes laggy...
glxgears shows about 10 fps on the right screen while it is 60 on the left screen(for a reasonably large glxgears window. For small glxgear windows the framerate is limited to 60 on the straight monitor, but somehow vsync does not work on the rotated monitor so there the fps goes to something like 300 for small glxgear windows)
Also dragging windows and scrolling large scrollareas is slow and looks jaggedy.
When the rotate screen is rotated back into normal orientation nothing is wrong. Then vsync works on both screens and rendering is fast.

Additional info:
os: archlinux x86_64
package version: 2.20.19-1


I have no manual configuration in /etc/X11 whatsoever.
xorg log shows this after the xrandr command that rotates the second screen:
[ 21599.275] (II) intel(0): Allocated new frame buffer 2752x1280 stride 11008, untiled
[ 21599.317] (II) intel(0): Allocated new frame buffer 1280x1024 stride 8192, tiled

when I set it back to non-rotated it shown only one new line:
[ 26053.553] (II) intel(0): Allocated new frame buffer 3008x1050 stride 12032, untiled


I found an ubuntu bugreport that says that this bug(presuming it's the same) was solved upstream in 2.3.1 but apparently it is back
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/174650

Steps to reproduce:
* attach two monitors
* assign the above configuration:
> xrandr --output VGA1 --mode 1680x1050 --primary
> xrandr --output DVI1 --right-of VGA1 --rotate left
* run glxgears on both screens and observe the big difference(also looks better on the non-rotated screen)

I'd be glad to provide more information but for the moment I think this sums it up pretty much. If you want to see specific logs or command, please let me know
Comment 1 Chris Wilson 2013-01-31 15:36:28 UTC
Please try adding Option "AccelMethod" "sna" to your xorg.conf or create a snippet in /etc/xorg.conf.d/intel.conf:

Section "Device"
 Identifier "Device0"
 Driver "intel"
 Option "AccelMethod" "sna"
EndSection


(Though just be aware that 2.20.19 has a known bug that can cause a GPU hang on q35, which I am working to make a new release to fix.)
Comment 2 sjoerd.timmer 2013-01-31 15:56:29 UTC
Thanks for the fast reply,

The suggested configuration blanks the second screen. The area is added to the desktop but besides the cursor everything is black. I can move a window over there but it becomes invisible. The framerate in glxgears is good though so it does fix the initial problem. The black screen is actually worse though:P
I don't presume this is the bug that you are fixing since the gpu does not hang?
Comment 3 Chris Wilson 2013-01-31 16:01:02 UTC
No, but I have a feeling I will...
Comment 4 sjoerd.timmer 2013-01-31 16:03:35 UTC
If you need anything; logs, output of certain commands, etc...
Please let me know.
Comment 5 Chris Wilson 2013-01-31 17:36:59 UTC
commit cd7df0004cf6e423d2ae6c0cf83a84e0031161b4
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jan 31 17:32:57 2013 +0000

    sna: Pass width/height to composite for rotated displays
    
    This is essential to handle displays that are too large to be rendered
    normally via the 3D pipeline and so that the bounds of the fixup region
    are known.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60124
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

That will fix up SNA so that you can see the rotated screen, and you should be able to drive glxgears at 60fps! Do bear in mind the 2048x2048 limit still exists, and extra work is involved to circumvent that limit.

Hope this helps!
Comment 6 sjoerd.timmer 2013-02-01 08:44:37 UTC
YES! That fixed the problem. I can see both displays under sna now.
Thank you very much!