Bug 15509

Summary: xrandr rotation crashes when virtual >2048
Product: xorg Reporter: Bryce Harrington <bryce>
Component: Driver/intelAssignee: Wang Zhenyu <zhenyu.z.wang>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: major    
Priority: high CC: bas
Version: 7.3 (2007.09)   
Hardware: x86 (IA32)   
OS: Linux (All)   
URL: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/174745
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
proposal fix for exa pitch checking
none
more clean one none

Description Bryce Harrington 2008-04-14 18:28:41 UTC
I'm forwarding this bug from a Ubuntu reporter.

If "Virtual X Y" is specified in xorg.conf, where X > 2048 (such as to permit dual-head layouts), and the user rotates the screen using 'xrandr', X crashes and hangs the machine.

PCI ID:      Intel Mobile 945GM/GMS/GME, 943/940GML (chip 8086,27a2 card 17aa,201a)
Xorg.0.log:  http://launchpadlibrarian.net/10791146/Xorg.0.log.old
Backtrace:   http://launchpadlibrarian.net/13288015/Xorg_rotate_crash

(EE) intel(0): Cannot support DRI with frame buffer width > 2048.
Error in I830WaitLpRing(), timeout for 2 seconds
pgetbl_ctl: 0x3ffc0001getbl_err: 0x0
ipeir: 0 iphdr: 2000011
LP ring tail: 38 head: dc9c len: 1f001 start 0
eir: 0 esr: 0 emr: ffff
instdone: 81 instpm: 0
memmode: 306 instps: 800f04c4
hwstam: ffff ier: 0 imr: ffff iir: 0
Ring at virtual 0xa78c5000 head 0xdc9c tail 0x38 count 18663

Presumably this is occurring because a screen that had been configured for DRI can no longer use it when the width goes over 2048?  Rather than crashing, it would be preferable for it to either refuse to rotate, or to rotate but disable DRI and issue an error message about it, but not crash.
Comment 1 Julien Cristau 2008-04-15 03:26:51 UTC
On Mon, Apr 14, 2008 at 18:28:42 -0700, bugzilla-daemon@freedesktop.org wrote:

> If "Virtual X Y" is specified in xorg.conf, where X > 2048 (such as to permit
> dual-head layouts), and the user rotates the screen using 'xrandr', X crashes
> and hangs the machine.

What version of the driver? 7bba2c13310ed5ac22a355a3cc0ec8b7afaa79cf
might help.

Cheers,
Julien
Comment 2 Wang Zhenyu 2008-04-17 01:37:40 UTC
Created attachment 15979 [details] [review]
proposal fix for exa pitch checking

I have produced on 915G here, and it looks we got pitch that larger than hw can support (8k for i915). This is a kludge patch to always check pitch size in driver, as current exa pitch checks of pixmap not created by CreatePixmap is broken to ignore devKind.

A seperate xserver/exa patch is available to fix this issue, but there will be compat issue...

Please try with this patch first.
Comment 3 Wang Zhenyu 2008-04-17 01:41:55 UTC
Created attachment 15981 [details] [review]
more clean one
Comment 4 Wang Zhenyu 2008-04-20 06:44:52 UTC
Fixed in git.
Comment 5 Bryce Harrington 2008-04-22 14:08:33 UTC
Thanks
Comment 6 Gordon Jin 2008-05-23 23:44:44 UTC
Zhenyu, I can't find the attached patch in the git. Could you double check and provide the commit id?
Comment 7 Gordon Jin 2008-05-23 23:46:37 UTC
*** Bug 16064 has been marked as a duplicate of this bug. ***
Comment 8 Wang Zhenyu 2008-05-25 19:11:32 UTC
8187a5a16f8bd8f0ba5e7f5357f355928b3b8f07 in 2.3-branch.

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.