Misc locking fixes and GEM debugging

Submitted by Chris Wilson on Feb. 2, 2016, 11:06 a.m.

Details

Reviewer None
Submitted Feb. 2, 2016, 11:06 a.m.
Last Updated Feb. 2, 2016, 3:49 p.m.
Revision 1

Cover Letter(s)

Revision 1
      From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

A collection of patches addressing locking inversions, missing
locking, un-needed atomic waiting, more precision for the latter
and adding some infrastructure to catch some of these during
driver development.

Tvrtko Ursulin (12):
  drm/i915: Add wait_for_us
  drm/i915: Do not wait atomically for display clocks
  drm/i915/guc: Do not wait for firmware load atomically
  drm/i915/lrc: Do not wait atomically when stopping engines
  drm/i915: Kconfig for extra driver debugging
  drm/i915: Do not lie about atomic wait granularity
  drm/i915: GEM operations need to be done under the big lock
  drm/i915: Fix struct mutex vs. RPS lock inversion
  drm/i915/ilk: Move register read under spinlock
  drm/i915: Introduce dedicated object VMA iterator
  drm/i915: Introduce dedicated safe object VMA iterator
  drm/i915: Add BKL asserts to get page helpers

 drivers/gpu/drm/i915/Kconfig             |  6 ++++++
 drivers/gpu/drm/i915/Kconfig.debug       | 12 +++++++++++
 drivers/gpu/drm/i915/i915_debugfs.c      |  8 +++----
 drivers/gpu/drm/i915/i915_drv.h          | 24 +++++++++++++++++++++
 drivers/gpu/drm/i915/i915_gem.c          | 30 +++++++++++++-------------
 drivers/gpu/drm/i915/i915_gem_gtt.c      |  2 +-
 drivers/gpu/drm/i915/i915_gem_shrinker.c |  5 ++---
 drivers/gpu/drm/i915/i915_gem_stolen.c   |  3 +++
 drivers/gpu/drm/i915/i915_gem_userptr.c  |  2 +-
 drivers/gpu/drm/i915/intel_display.c     | 20 +++++++++---------
 drivers/gpu/drm/i915/intel_dp.c          |  3 +--
 drivers/gpu/drm/i915/intel_drv.h         | 36 +++++++++++++++++++++++++-------
 drivers/gpu/drm/i915/intel_guc_loader.c  |  6 +++---
 drivers/gpu/drm/i915/intel_lrc.c         |  2 +-
 drivers/gpu/drm/i915/intel_pm.c          | 15 +++++++------
 drivers/gpu/drm/i915/intel_psr.c         |  2 +-
 16 files changed, 122 insertions(+), 54 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/Kconfig.debug
    

Revisions

Patches download mbox

Tests

Series 3006v1 Misc locking fixes and GEM debugging
http://patchwork.freedesktop.org/api/1.0/series/3006/revisions/1/mbox/

Test kms_pipe_crc_basic:
        Subgroup read-crc-pipe-b-frame-sequence:
                dmesg-warn -> PASS       (skl-i5k-2)
        Subgroup suspend-read-crc-pipe-b:
                dmesg-warn -> PASS       (byt-nuc)

bdw-nuci7        total:156  pass:147  dwarn:0   dfail:0   fail:0   skip:9  
bdw-ultra        total:159  pass:147  dwarn:0   dfail:0   fail:0   skip:12 
bsw-nuc-2        total:159  pass:129  dwarn:0   dfail:0   fail:0   skip:30 
byt-nuc          total:159  pass:136  dwarn:0   dfail:0   fail:0   skip:23 
hsw-brixbox      total:159  pass:146  dwarn:0   dfail:0   fail:0   skip:13 
hsw-gt2          total:159  pass:149  dwarn:0   dfail:0   fail:0   skip:10 
hsw-xps12        total:156  pass:146  dwarn:0   dfail:0   fail:0   skip:10 
ilk-hp8440p      total:159  pass:111  dwarn:0   dfail:0   fail:0   skip:48 
ivb-t430s        total:159  pass:145  dwarn:0   dfail:0   fail:0   skip:14 
skl-i5k-2        total:159  pass:144  dwarn:1   dfail:0   fail:0   skip:14 
snb-dellxps      total:159  pass:137  dwarn:0   dfail:0   fail:0   skip:22 
snb-x220t        total:159  pass:137  dwarn:0   dfail:0   fail:1   skip:21 

Results at /archive/results/CI_IGT_test/Patchwork_1340/

5d3deb0902a962218ad9b0e583e4d1bbdec29f9a drm-intel-nightly: 2016y-02m-01d-20h-05m-03s UTC integration manifest
bb47195bb06eab046c89691d0a527ea47d5d8e3d drm/i915: Add BKL asserts to get page helpers
c828ee3e795e318601e4b773b376a90e8f9fff30 drm/i915: Introduce dedicated safe object VMA iterator
e2a01dfe5c15750e306f99c7a7eb74a3ede4e4a1 drm/i915: Introduce dedicated object VMA iterator
cee676163abdbeae5b22ac87e99a3640c57ed717 drm/i915/ilk: Move register read under spinlock
a94d4b0b39db5fb4eeadeaeb953f8bc76acece31 drm/i915: Fix struct mutex vs. RPS lock inversion
fb1d051d6427b5536a2ad7022181dd5f87ef3f8e drm/i915: GEM operations need to be done under the big lock
3bf2524d60496461a3918c283f9f473f6330197d drm/i915: Do not lie about atomic wait granularity
e9c67ede8f4a9063b6bf350f0084aa5d3fa3f41f drm/i915: Kconfig for extra driver debugging
9f3db6eb03d2ebc1266de2d998f2e194d2b9dd90 drm/i915/lrc: Do not wait atomically when stopping engines
ca58ad5e9250cee3d0e3d1aa52e005bd5950407b drm/i915/guc: Do not wait for firmware load atomically
7de26a409b7911a17c7d2e231313b91a683c49cb drm/i915: Do not wait atomically for display clocks
666b46edb2e312b0afffca09b0d986b44f3b8775 drm/i915: Add wait_for_us