drm/nvd9/disp: bail out of mode_set_base if no fb bound to crtc
authorBen Skeggs <bskeggs@redhat.com>
Thu, 25 Aug 2011 23:40:39 +0000 (09:40 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 20 Sep 2011 06:12:11 +0000 (16:12 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvd0_display.c

index 20072fb784a50051cc34babb74ad597516f3c458..23d63b4b3d77078ce4a351f82b8d7cba16d280b7 100644 (file)
@@ -391,6 +391,11 @@ nvd0_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
        struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
        int ret;
 
+       if (!crtc->fb) {
+               NV_DEBUG_KMS(crtc->dev, "No FB bound\n");
+               return 0;
+       }
+
        ret = nvd0_crtc_swap_fbs(crtc, old_fb);
        if (ret)
                return ret;