drm/nouveau: require contiguous bo for framebuffer
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Wed, 7 Aug 2013 15:11:27 +0000 (17:11 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 4 Sep 2013 03:46:28 +0000 (13:46 +1000)
This was already required before, but no check in the kernel was done
to enforce it.

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

index 77ffded..d2712e6 100644 (file)
@@ -107,6 +107,11 @@ nouveau_framebuffer_init(struct drm_device *dev,
                         return -EINVAL;
                }
 
+               if (nvbo->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG) {
+                       NV_ERROR(drm, "framebuffer requires contiguous bo\n");
+                       return -EINVAL;
+               }
+
                if (nv_device(drm->device)->chipset == 0x50)
                        nv_fb->r_format |= (tile_flags << 8);