Bug 90625

Summary: [BDW/BSW bisected] "testdisplay -d 32" core dump
Product: DRI Reporter: Jeff Zheng <jeff.zheng>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: christophe.prigent, intel-gfx-bugs
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg log
none
Fix for igt none

Description Jeff Zheng 2015-05-25 05:34:28 UTC
Created attachment 116018 [details]
dmesg log

==System Environment==
--------------------------
Regression: Yes, don't see this issue on drm-intel-testing-2015-05-08. 
Non-working platforms: BSW
BIOS: V69

==kernel==
--------------------------
-testing: drm-intel-testing-2015-05-22 (fails)

==Bug detailed description==
-----------------------------
"testdisplay -d 32" core dump on BSW:
root@x-bsw14:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./testdisplay -d 32
using depth 32
CRTC(20):[0]  1920x1080 60 1920 1966 1996 2080 1080 1082 1086 1112 0xa 0x48 138780
failed to set mode (1920x1080@60Hz): Invalid argument
Received signal SIGSEGV.
Segmentation fault (core dumped)

"testdisplay -d 16" and "testdisplay -d 24" are fine.

==Reproduce steps==
---------------------------- 
1. Reboot and login into BSW
2. ./testdisplay -d 32
Comment 1 Jeff Zheng 2015-05-26 04:04:32 UTC
root@xfzheng:~/git/drm-intel# git bisect start
root@xfzheng:~/git/drm-intel# git bisect good c457879f0d8f664050e46092afde46fec58c9e67
root@xfzheng:~/git/drm-intel# git bisect bad 5d96d8afcfbb1500272756747e0bfcdbebf3b070
Bisecting: a merge base must be tested
[214a2b7fab215b1e979fbae51225b01b8fc58288] drm/i915: Update DRIVER_DATE to 20150508
root@xfzheng:~/git/drm-intel# git bisect good
Bisecting: 404 revisions left to test after this (roughly 9 steps)
[6c9d370c16aad97cfc6de68666634eaabac2b048] Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
root@xfzheng:~/git/drm-intel# git bisect good
Bisecting: 201 revisions left to test after this (roughly 8 steps)
[518af3cb8ccaf32057db6046e241ec393d6c7b98] Merge branch 'master' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
root@xfzheng:~/git/drm-intel# git bisect good
Bisecting: 117 revisions left to test after this (roughly 7 steps)
[e26081808edadfd257c6c9d81014e3b25e9a6118] Linux 4.1-rc4
root@xfzheng:~/git/drm-intel# git bisect good
Bisecting: 58 revisions left to test after this (roughly 6 steps)
[d94b5030d26b4f45510a092262bc2b542a00bd7c] drm/i915: Ensure cache flushes prior to doing CS flips
root@xfzheng:~/git/drm-intel# git bisect good
Bisecting: 29 revisions left to test after this (roughly 5 steps)
[8504c74c7ae48b4b8ed1f1c0acf67482a7f45c93] drm/i915: Preserve ddi_pll_sel when allocating new pipe_config
root@xfzheng:~/git/drm-intel# git bisect good
Bisecting: 14 revisions left to test after this (roughly 4 steps)
[1e8df16778b0d8fd8102b3ee799b028f8f961089] drm/i915/skl: Swapping 90 and 270 to be compliant with Xrandr
root@xfzheng:~/git/drm-intel# git bisect bad
Bisecting: 7 revisions left to test after this (roughly 3 steps)
[0c9b371550f40f8273a835f1e1055445cc3e2498] drm/i915: add HAS_DP_MST feature test macro
root@xfzheng:~/git/drm-intel# git bisect good
Bisecting: 3 revisions left to test after this (roughly 2 steps)
[6c0fd451bdde9a6d0ac408bd078351890228e465] drm/i915: Tighten the exposure ARGB/ABGR 8888 formats
root@xfzheng:~/git/drm-intel# git bisect bad
Bisecting: 1 revision left to test after this (roughly 1 step)
[e0681e3841118b470b312b7c62c90af9364fce8d] drm/i915/bxt: Move around lane stagger calculation
root@xfzheng:~/git/drm-intel# git bisect good
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[c965d99557fd48e8c57d793ec22458e508cbf676] drm/i915: Fix 'suspedn' typo
root@xfzheng:~/git/drm-intel# git bisect good
6c0fd451bdde9a6d0ac408bd078351890228e465 is the first bad commit
commit 6c0fd451bdde9a6d0ac408bd078351890228e465
Author: Damien Lespiau <damien.lespiau@intel.com>
Date:   Tue May 19 12:29:16 2015 +0100

    drm/i915: Tighten the exposure ARGB/ABGR 8888 formats

    ARGB8888 is used for cursors on all platforms so we need to allow it
    everywhere.

    ABGR8888 is currently only honoured:
      - on VLV/CHV in sprite planes
      - on SKL+ for primary and sprite planes
    so only allow it for those platforms.

    Note that we only support ARGB8888/ABGR8888 on the primary plane for
    SKL/BXT because we have in line of sight the pipe bottom color on those
    platforms and because the primary plane programming on VLV/CHV doesn't
    anything different for those formats today.

    v2: Fix the logic to forbid the creation ABGR2101010 fbs (Ville)
    v3: Still allow the creation of ARGB8888 fbs now that cursor planes use
        real fb objects (found by PRTS).

    Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

:040000 040000 322b628bb8364c3ff3f13826349abe6c3b49eff7 772ec232149432c26c2a7c92055c623c2bb13d39 M      drivers
Comment 2 Ander Conselvan de Oliveira 2015-05-26 10:31:24 UTC
Can you provide a gdb backtrace for testdisplay?
Comment 3 Jeff Zheng 2015-05-27 00:45:15 UTC
(gdb) run -d 32
Starting program: /GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests/testdisplay -d 32
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
using depth 32
CRTC(20):[0]  1920x1080 60 1920 1966 1996 2080 1080 1082 1086 1112 0xa 0x48 138780
failed to set mode (1920x1080@60Hz): Invalid argument

Program received signal SIGSEGV, Segmentation fault.
INT_cairo_surface_destroy (surface=0x4088980000000000) at cairo-surface.c:950
950     cairo-surface.c: No such file or directory.
(gdb) bt
#0  INT_cairo_surface_destroy (surface=0x4088980000000000)
    at cairo-surface.c:950
#1  0x000000000040f574 in igt_remove_fb (fd=4, fb=fb@entry=0x7fffffffdd90)
    at igt_fb.c:866
#2  0x00000000004065eb in set_mode (c=0x639d80) at testdisplay.c:394
#3  update_display () at testdisplay.c:499
#4  0x0000000000405544 in main (argc=<optimized out>, argv=<optimized out>)
    at testdisplay.c:772
Comment 4 Ander Conselvan de Oliveira 2015-05-27 07:31:42 UTC
Created attachment 116069 [details] [review]
Fix for igt

Please tests the attach patch for i-g-t.
Comment 5 Jeff Zheng 2015-05-27 07:41:26 UTC
(In reply to Ander Conselvan de Oliveira from comment #4)
> Created attachment 116069 [details] [review] [review]
> Fix for igt
> 
> Please tests the attach patch for i-g-t.

Yes, testdisplay will not core dump with the patch, but it still complains "invalid argument":
root@x-bsw14:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./testdisplay -d 32
using depth 32
CRTC(20):[0]  1920x1080 60 1920 1966 1996 2080 1080 1082 1086 1112 0xa 0x48 138780
failed to set mode (1920x1080@60Hz): Invalid argument


And is this a kernel bug or igt bug?
Comment 6 Ander Conselvan de Oliveira 2015-05-27 08:03:14 UTC
(In reply to Jeff Zheng from comment #5)
> (In reply to Ander Conselvan de Oliveira from comment #4)
> > Created attachment 116069 [details] [review] [review] [review]
> > Fix for igt
> > 
> > Please tests the attach patch for i-g-t.
> 
> Yes, testdisplay will not core dump with the patch, but it still complains
> "invalid argument":
> root@x-bsw14:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./testdisplay
> -d 32
> using depth 32
> CRTC(20):[0]  1920x1080 60 1920 1966 1996 2080 1080 1082 1086 1112 0xa 0x48
> 138780
> failed to set mode (1920x1080@60Hz): Invalid argument
> 
> 
> And is this a kernel bug or igt bug?

Well, the test indicates Damien's patch work as intended. Using an ARGB8888 fb for the primary plane in platforms other than SKL+ shouldn't work.

The crash in testdisplay is an i-g-t bug.
Comment 7 Jeff Zheng 2015-05-27 08:25:21 UTC
(In reply to Ander Conselvan de Oliveira from comment #6)

> > And is this a kernel bug or igt bug?
> 
> Well, the test indicates Damien's patch work as intended. Using an ARGB8888
> fb for the primary plane in platforms other than SKL+ shouldn't work.
> 
> The crash in testdisplay is an i-g-t bug.

Hi Ander, I need to double check here, does it mean:

1. "testdisplay -d 32" should report "Invalid parameter" for -SKL platforms (for example, BSW, BDW, HSW etc)
2. "testdisplay -d 32" should display normally for SKL+ platforms (SKL, BXT etc).

?
Comment 8 Ander Conselvan de Oliveira 2015-05-27 09:09:24 UTC
(In reply to Jeff Zheng from comment #7)
> (In reply to Ander Conselvan de Oliveira from comment #6)
> 
> > > And is this a kernel bug or igt bug?
> > 
> > Well, the test indicates Damien's patch work as intended. Using an ARGB8888
> > fb for the primary plane in platforms other than SKL+ shouldn't work.
> > 
> > The crash in testdisplay is an i-g-t bug.
> 
> Hi Ander, I need to double check here, does it mean:
> 
> 1. "testdisplay -d 32" should report "Invalid parameter" for -SKL platforms
> (for example, BSW, BDW, HSW etc)
> 2. "testdisplay -d 32" should display normally for SKL+ platforms (SKL, BXT
> etc).
> 
> ?

Yes to both.
Comment 9 Daniel Vetter 2015-05-28 08:18:57 UTC
With the igt_remove_fb fixed there's nothing left to do here.
Comment 10 Ander Conselvan de Oliveira 2015-05-28 09:09:19 UTC
Keeping this open until someone pushes the fix for i-g-t. (I don't have access)
Comment 11 xubin 2015-05-28 11:33:29 UTC
The same issue also happened on the BDW with the drm-intel-testing-2015-05-22 kernel,wish the fix for i-g-t as soon as pssible.
Comment 12 Jesse Barnes 2015-08-03 21:26:31 UTC
Assuming fixed now.

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.