drm/nouveau: warn if we fail to re-pin fb on resume
authorBen Skeggs <bskeggs@redhat.com>
Tue, 12 Aug 2014 13:35:35 +0000 (23:35 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 14 Aug 2014 21:58:39 +0000 (07:58 +1000)
Spotted by Coverity.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_display.c

index 1cc7b603c75342799835825708e0d6edb144f620..65b4fd53dd4e13186c2d33a072b380e2b8a1fdd1 100644 (file)
@@ -592,7 +592,9 @@ nouveau_display_repin(struct drm_device *dev)
                if (!nouveau_fb || !nouveau_fb->nvbo)
                        continue;
 
-               nouveau_bo_pin(nouveau_fb->nvbo, TTM_PL_FLAG_VRAM);
+               ret = nouveau_bo_pin(nouveau_fb->nvbo, TTM_PL_FLAG_VRAM);
+               if (ret)
+                       NV_ERROR(drm, "Could not pin framebuffer\n");
        }
 
        list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {