diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2018-09-04 15:57:09 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2018-09-07 06:54:28 +1000 |
commit | e04cfdc9b7398c60dbc70212415ea63b6c6a93ae (patch) | |
tree | 80b05c404f2af66090a5ab6e8b19540c325ca58f /drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | |
parent | drm/nouveau/disp: move eDP panel power handling (diff) | |
download | linux-dev-e04cfdc9b7398c60dbc70212415ea63b6c6a93ae.tar.xz linux-dev-e04cfdc9b7398c60dbc70212415ea63b6c6a93ae.zip |
drm/nouveau/disp: fix DP disable race
If a HPD pulse signalling the need to retrain the link occurs between
the KMS driver releasing the output and the supervisor interrupt that
finishes the teardown, it was possible get a NULL-ptr deref.
Avoid this by marking the link as inactive earlier.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c index 4b6973f90309..9fcaf3147eb8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c @@ -93,6 +93,8 @@ nvkm_outp_release(struct nvkm_outp *outp, u8 user) if (ior) { outp->acquired &= ~user; if (!outp->acquired) { + if (outp->func->release && outp->ior) + outp->func->release(outp); outp->ior->asy.outp = NULL; outp->ior = NULL; } |