]> git.hungrycats.org Git - linux/commitdiff
drm/nouveau/kms/nv50: fix oops during DP IRQ handling on non-MST boards
authorBen Skeggs <bskeggs@redhat.com>
Tue, 3 Oct 2017 06:24:28 +0000 (16:24 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Oct 2017 08:39:12 +0000 (10:39 +0200)
commit 227f66d2f9954f68375736af62ebcd73c6754d69 upstream.

Reported-by: Woody Suwalski <terraluna977@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/nv50_display.c

index 3d35ea3e95db63c618a0ca62a971b92e6c3ad091..92ff3e4ca013248d2ff691f8285ddf2d3fef8203 100644 (file)
@@ -3281,11 +3281,14 @@ nv50_mstm = {
 void
 nv50_mstm_service(struct nv50_mstm *mstm)
 {
-       struct drm_dp_aux *aux = mstm->mgr.aux;
+       struct drm_dp_aux *aux = mstm ? mstm->mgr.aux : NULL;
        bool handled = true;
        int ret;
        u8 esi[8] = {};
 
+       if (!aux)
+               return;
+
        while (handled) {
                ret = drm_dp_dpcd_read(aux, DP_SINK_COUNT_ESI, esi, 8);
                if (ret != 8) {