Stop users from using the device on driver unbind

Submitted by Janusz Krzysztofik on April 5, 2019, 1:02 p.m.

Details

Reviewer None
Submitted April 5, 2019, 1:02 p.m.
Last Updated April 18, 2019, 2:51 p.m.
Revision 1

Cover Letter(s)

Revision 1
      Use drm_dev_unplug() to have device resources protected from user access
by DRM layer as soon as the driver is going to be unbound.  Also, cancel
all pending work so associated resources can be quickly released.

Janusz Krzysztofik (2):
  drm/i915: Use drm_dev_unplug()
  drm/i915: Mark GEM wedged right after marking device unplugged

 drivers/gpu/drm/i915/i915_drv.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

I'm resending these two patches together in series to make the robot
happy about the second one.  Also, I've added the Suggested-by: clause
to credit actual Chris' contribution.

Thanks,
Janusz
    

Revisions

SERIES REVISION LOOKS STRANGE. Please double-check patch list and the ordering before proceeding.

Patches download mbox

Tests

CI Bug Log - changes from CI_DRM_5881 -> Patchwork_12699
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_12699 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_12699, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/59064/revisions/1/mbox/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_12699:

### IGT changes ###

#### Possible regressions ####

  * igt@i915_module_load@reload:
    - fi-kbl-r:           PASS -> INCOMPLETE
    - fi-whl-u:           PASS -> INCOMPLETE
    - fi-pnv-d510:        PASS -> INCOMPLETE
    - fi-skl-iommu:       PASS -> INCOMPLETE
    - fi-hsw-4770r:       PASS -> INCOMPLETE
    - fi-skl-6700k2:      PASS -> INCOMPLETE
    - fi-bsw-kefka:       PASS -> INCOMPLETE
    - fi-bdw-5557u:       PASS -> INCOMPLETE
    - fi-skl-guc:         PASS -> INCOMPLETE
    - fi-kbl-guc:         PASS -> INCOMPLETE
    - fi-cfl-8109u:       PASS -> INCOMPLETE
    - fi-cfl-8700k:       PASS -> INCOMPLETE
    - fi-snb-2520m:       PASS -> INCOMPLETE
    - fi-hsw-4770:        PASS -> INCOMPLETE
    - fi-cfl-guc:         PASS -> INCOMPLETE
    - fi-skl-6770hq:      PASS -> INCOMPLETE
    - fi-bsw-n3050:       PASS -> INCOMPLETE
    - fi-ilk-650:         PASS -> INCOMPLETE
    - fi-ivb-3770:        PASS -> INCOMPLETE
    - fi-skl-lmem:        PASS -> INCOMPLETE
    - fi-hsw-peppy:       PASS -> INCOMPLETE
    - fi-skl-6260u:       PASS -> INCOMPLETE
    - fi-kbl-x1275:       PASS -> INCOMPLETE
    - fi-gdg-551:         PASS -> INCOMPLETE

  * igt@runner@aborted:
    - fi-ilk-650:         NOTRUN -> FAIL
    - fi-pnv-d510:        NOTRUN -> FAIL
    - fi-bdw-gvtdvm:      NOTRUN -> FAIL
    - fi-cfl-8109u:       NOTRUN -> FAIL
    - fi-hsw-peppy:       NOTRUN -> FAIL
    - fi-icl-u2:          NOTRUN -> FAIL
    - fi-gdg-551:         NOTRUN -> FAIL
    - fi-snb-2520m:       NOTRUN -> FAIL
    - fi-hsw-4770:        NOTRUN -> FAIL
    - fi-bxt-j4205:       NOTRUN -> FAIL
    - fi-whl-u:           NOTRUN -> FAIL
    - fi-ivb-3770:        NOTRUN -> FAIL
    - fi-byt-j1900:       NOTRUN -> FAIL
    - fi-cfl-guc:         NOTRUN -> FAIL
    - fi-icl-y:           NOTRUN -> FAIL
    - fi-bsw-n3050:       NOTRUN -> FAIL
    - fi-blb-e6850:       NOTRUN -> FAIL
    - fi-kbl-x1275:       NOTRUN -> FAIL
    - fi-bsw-kefka:       NOTRUN -> FAIL
    - fi-cfl-8700k:       NOTRUN -> FAIL
    - fi-hsw-4770r:       NOTRUN -> FAIL
    - fi-kbl-8809g:       NOTRUN -> FAIL
    - fi-byt-clapper:     NOTRUN -> FAIL
    - fi-kbl-r:           NOTRUN -> FAIL
    - fi-bdw-5557u:       NOTRUN -> FAIL
    - fi-bwr-2160:        NOTRUN -> FAIL
    - fi-byt-n2820:       NOTRUN -> FAIL
    - fi-kbl-guc:         NOTRUN -> FAIL
    - fi-snb-2600:        NOTRUN -> FAIL
    - fi-elk-e7500:       NOTRUN -> FAIL

  
#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@i915_module_load@reload:
    - {fi-kbl-7567u}:     PASS -> INCOMPLETE

  * igt@runner@aborted:
    - {fi-icl-u3}:        NOTRUN -> FAIL
    - {fi-kbl-7567u}:     NOTRUN -> FAIL

  
Known issues
------------

  Here are the changes found in Patchwork_12699 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-icl-u2:          PASS -> DMESG-WARN [fdo#109638]

  * igt@i915_module_load@reload:
    - fi-kbl-8809g:       PASS -> INCOMPLETE [fdo#103665]
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]
    - fi-byt-j1900:       PASS -> INCOMPLETE [fdo#102657]
    - fi-apl-guc:         PASS -> INCOMPLETE [fdo#103927]
    - fi-skl-6600u:       PASS -> INCOMPLETE [fdo#104108]
    - fi-elk-e7500:       PASS -> INCOMPLETE [fdo#103989]
    - fi-byt-clapper:     PASS -> INCOMPLETE [fdo#102657]
    - fi-bdw-gvtdvm:      PASS -> INCOMPLETE [fdo#105600]
    - fi-icl-u2:          PASS -> INCOMPLETE [fdo#107713]
    - fi-skl-gvtdvm:      PASS -> INCOMPLETE [fdo#105600]
    - fi-bxt-j4205:       PASS -> INCOMPLETE [fdo#103927]
    - fi-byt-n2820:       PASS -> INCOMPLETE [fdo#102657]
    - fi-snb-2600:        PASS -> INCOMPLETE [fdo#105411]
    - fi-bwr-2160:        PASS -> INCOMPLETE [k.org#201317]
    - fi-icl-y:           PASS -> INCOMPLETE [fdo#107713]

  * igt@runner@aborted:
    - fi-skl-iommu:       NOTRUN -> FAIL [fdo#104108]
    - fi-skl-guc:         NOTRUN -> FAIL [fdo#104108]
    - fi-skl-6700k2:      NOTRUN -> FAIL [fdo#104108]
    - fi-skl-6600u:       NOTRUN -> FAIL [fdo#104108]
    - fi-skl-lmem:        NOTRUN -> FAIL [fdo#104108]
    - fi-skl-6770hq:      NOTRUN -> FAIL [fdo#104108]
    - fi-skl-gvtdvm:      NOTRUN -> FAIL [fdo#104108]
    - fi-skl-6260u:       NOTRUN -> FAIL [fdo#104108]

  
#### Possible fixes ####

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-byt-clapper:     FAIL [fdo#103191] / [fdo#107362] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102657]: https://bugs.freedesktop.org/show_bug.cgi?id=102657
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#103989]: https://bugs.freedesktop.org/show_bug.cgi?id=103989
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#105600]: https://bugs.freedesktop.org/show_bug.cgi?id=105600
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#109638]: https://bugs.freedesktop.org/show_bug.cgi?id=109638
  [k.org#201317]: https://bugzilla.kernel.org/show_bug.cgi?id=201317


Participating hosts (49 -> 45)
------------------------------

  Missing    (4): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-bdw-samus 


Build changes
-------------

    * Linux: CI_DRM_5881 -> Patchwork_12699

  CI_DRM_5881: b070175c76da1440a747fd023ee6253e573055f8 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4931: 019f892e5d1a0a9643cb726c47ce2d99c14b444f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12699: 494aa340c3a1fa4fac95457839cf7acb1f64d6f6 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

494aa340c3a1 drm/i915: Mark GEM wedged right after marking device unplugged
df465066fd31 drm/i915: Use drm_dev_unplug()
$ dim checkpatch origin/drm-tip
df465066fd31 drm/i915: Use drm_dev_unplug()
494aa340c3a1 drm/i915: Mark GEM wedged right after marking device unplugged
$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/i915: Use drm_dev_unplug()
Okay!

Commit: drm/i915: Mark GEM wedged right after marking device unplugged
Okay!