drm/nouveau/disp: fix DP disable race
authorBen Skeggs <bskeggs@redhat.com>
Tue, 4 Sep 2018 05:57:09 +0000 (15:57 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 6 Sep 2018 20:54:28 +0000 (06:54 +1000)
commite04cfdc9b7398c60dbc70212415ea63b6c6a93ae
tree80b05c404f2af66090a5ab6e8b19540c325ca58f
parentf6d52b2172b1adfde010df34730290c282ee641b
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>
drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h