OSDN Git Service

drm/nouveau/disp: fix DP disable race
authorBen Skeggs <bskeggs@redhat.com>
Tue, 4 Sep 2018 05:57:09 +0000 (15:57 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2018 06:56:01 +0000 (08:56 +0200)
commit6978b0eb61c0484a3ae7ea84b341d401fc8554ad
tree4606725e56d7f704411f319df0bfc83b0336b5b3
parentc65768326592f7c3abd63a1d754f085a5cc86683
drm/nouveau/disp: fix DP disable race

[ Upstream commit e04cfdc9b7398c60dbc70212415ea63b6c6a93ae ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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