Bug 55304

Summary: [Regression ILK]I-G-T/debugfs_reader fail with Call Trace
Product: DRI Reporter: Guang Yang <guang.a.yang>
Component: DRM/IntelAssignee: Daniel Vetter <daniel>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: medium CC: ben, chris, daniel, jbarnes
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg info after running debugfs_reader
none
Take the spinlock for external callers (debugfs) none

Description Guang Yang 2012-09-25 05:58:03 UTC
Created attachment 67664 [details]
dmesg info after running debugfs_reader

System Environment:
--------------------------
Platform:        IronLake
Kernel: (drm-intel-next-queued) 456470eb583f063ee84c6818251e638598be0fb8
Bug detailed description:
-------------------------
   On ILK platform, running debugfs_reader shows:
./debugfs_reader: line 7:  3351 Segmentation fault      cat $i915_path/* > /dev/null 
2>&1  
  and the dmesg shows Call Trace, so I attach the dmesg info.
  I find this commit can work well:
  (drm-intel-next-queued) ab3951eb74e7c33a2f5b7b64d72e82f1eea61571
Comment 1 Daniel Vetter 2012-09-25 06:49:33 UTC
Again, since this is a regression, please also mention the last known good version.
Comment 2 Guang Yang 2012-09-25 06:55:47 UTC
(In reply to comment #1)
> Again, since this is a regression, please also mention the last known good
> version.
   This is the good version, I have mentioned it on comment 0.
Good version:
  (drm-intel-next-queued) ab3951eb74e7c33a2f5b7b64d72e82f1eea61571
Bad version:
  (drm-intel-next-queued) 456470eb583f063ee84c6818251e638598be0fb8
  Daniel, if need bisect, tell me.
Comment 3 Chris Wilson 2012-09-25 08:43:37 UTC
commit 02d719562ef40483648b2cc46899d4a2ff5953bb
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Aug 9 16:44:54 2012 +0200

    drm/i915: properly guard ilk ips state

-> assert_spin_locked(&mchdev_lock);
Comment 4 Chris Wilson 2012-09-25 08:51:36 UTC
Created attachment 67667 [details] [review]
Take the spinlock for external callers (debugfs)
Comment 5 Chris Wilson 2012-09-26 12:01:17 UTC
commit f531dcb23f9a5c6ad77e451459df965dc9a0c0c8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Sep 25 10:16:12 2012 +0100

    drm/i915: Wrap external callers to IPS state with appropriate locks
    
    Finishes commit 02d719562ef40483648b2cc46899d4a2ff5953bb
    Author: Daniel Vetter <daniel.vetter@ffwll.ch>
    Date:   Thu Aug 9 16:44:54 2012 +0200
    
        drm/i915: properly guard ilk ips state
    
    The core functions were annotated with their locking requirements, but
    we overlooked that they were exported, without any control over the
    locking, to debugfs. So in order to enable debugfs to read the registers
    without triggering sanity checks, we change the exported entry points to
    properly take the required locks before calling the core routines.
    
    Reported-by: yangguang <guang.a.yang@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55304
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Comment 6 shui yangwei 2012-09-28 01:11:01 UTC
System Environment:
-----------------------
Kernel: (drm-intel-fixes)f531dcb23f9a5c6ad77e451459df965dc9a0c0c8


Description:
-----------------------
Tested with this kernel on IronLake machine(x-pk1), call trace dmesg disappear.
Comment 7 Elizabeth 2017-10-06 14:48:11 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.