Bug 20943 - [KMS] rotate will crash X
Summary: [KMS] rotate will crash X
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other Linux (All)
: high major
Assignee: Jesse Barnes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: intel-drm-blocker
  Show dependency treegraph
 
Reported: 2009-03-30 03:12 UTC by zhao jian
Modified: 2017-10-06 14:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
xorg.conf (3.67 KB, text/plain)
2009-03-30 03:12 UTC, zhao jian
no flags Details
xorg.0.log (23.00 KB, text/plain)
2009-03-30 03:14 UTC, zhao jian
no flags Details

Description zhao jian 2009-03-30 03:12:27 UTC
Created attachment 24362 [details]
xorg.conf

System Environment:
----------------------
Platform:               945gm
Arch:           i386
OSD:            Fedora release 9 (Sulphur)
Libdrm:         (master)e2d7dfb61ad7a97367f050150160c205614d152e
Mesa:           (mesa_7_4_branch)de197cf991416f0cd65ad2e2d2ca9aa599b52075
Xserver:        (server-1.6-branch)60c161545af80eb78eb790a05bde79409dfdf16e
Xf86_video_intel:               (2.7)e2465249a90b9aefe6d7a96eb56a51fde54698a0


Bug Description:
---------------------
With KMS kernel, in UXA mode, start X and rotate it left or right, then rotate it back to normal, and it will crash X when it rotate back. the backtrace as following shows:    

(gdb) c
Continuing.
X: intel_bufmgr_gem.c:766: drm_intel_gem_bo_unmap: Assertion `bo_gem->mem_virtual != ((void *)0)' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb7ebb730 (LWP 2575)]
0xb808f424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb808f424 in __kernel_vsyscall ()
#1  0x03155660 in raise () from /lib/libc.so.6
#2  0x03157028 in abort () from /lib/libc.so.6
#3  0x0314e57e in __assert_fail () from /lib/libc.so.6
#4  0xb7db6a98 in drm_intel_gem_bo_unmap (bo=0x849aa18)
    at intel_bufmgr_gem.c:766
#5  0xb7db3202 in drm_intel_bo_unmap (buf=0x849aa18) at intel_bufmgr.c:85
#6  0xb7e11c6e in drmmode_crtc_shadow_destroy (crtc=0x820c248,
    rotate_pixmap=0x849a640, data=0xb6c00000) at drmmode_display.c:375
#7  0x080ec958 in xf86RotateDestroy (crtc=0x820c248) at xf86Rotate.c:290
#8  0x080e1a72 in xf86DisableUnusedFunctions (pScrn=0x820a200)
    at xf86Crtc.c:2727
#9  0x080eb454 in xf86RandR12CrtcSet (pScreen=0x8222130, randr_crtc=0x8227de0,
    randr_mode=0x0, x=0, y=0, rotation=1, num_randr_outputs=0,
    randr_outputs=0x0) at xf86RandR12.c:1243
#10 0x08152f46 in RRCrtcSet (crtc=0x8227de0, mode=0x0, x=0, y=0, rotation=1,
    numOutputs=0, outputs=0x0) at rrcrtc.c:331
#11 0x08153730 in ProcRRSetCrtcConfig (client=0x8499970) at rrcrtc.c:963
#12 0x08150a45 in ProcRRDispatch (client=0xa0f) at randr.c:476
#13 0x0808671f in Dispatch () at dispatch.c:437
#14 0x0806c64d in main (argc=2, argv=0xbfc8f1f4, envp=Cannot access memory at address 0xa17
) at main.c:397



Reproduce Steps:
---------------------
1. xinit&
2. xrandr --output LVDS1 --rotate right
3. xrandr --output LVDS1 --rotate normal
Comment 1 zhao jian 2009-03-30 03:14:52 UTC
Created attachment 24363 [details]
xorg.0.log
Comment 2 Gordon Jin 2009-03-30 19:33:20 UTC
This looks like a critical regression. Jian, please try bisect.

Jesse, we are using for-airlied branch for kernel.
Comment 3 zhao jian 2009-03-30 20:02:27 UTC
I find it was caused by a commit in Libdrm(master): 

commit e2d7dfb61ad7a97367f050150160c205614d152e
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Thu Mar 26 16:43:00 2009 -0700

    libdrm/intel: support GTT maps correctly
Comment 4 Jesse Barnes 2009-03-31 07:53:03 UTC
Fix pushed.

commit 087f72e1f5d7d11b8795ba80a842874f5a9bb01d
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Tue Mar 31 07:50:10 2009 -0700

    Match GTT unmap with map in KMS rotation case
Comment 5 zhao jian 2009-04-07 19:51:07 UTC
Rotate works well now with the following configuration: 
Libdrm:             (master)1faab66cfd1a854925da6ff7109aa614292dea90
Mesa:               (mesa_7_4_branch)de197cf991416f0cd65ad2e2d2ca9aa599b52075
Xserver:            (server-1.6-branch)60c161545af80eb78eb790a05bde79409dfdf16e
Xf86_video_intel:   (2.7)3e5586cace98f73a9f8403a6446d380899ecbce9
Kernel:             (drm-intel-2.6.29)71d7aec4bbf923eaf43563c03459726a746cd332
Comment 6 Elizabeth 2017-10-06 14:54:59 UTC
Closing old verified.


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.