aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_framebuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_framebuffer.c')
-rw-r--r--drivers/gpu/drm/drm_framebuffer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
index c0530a1af5e3..2dc5e8bed172 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -461,6 +461,12 @@ int drm_mode_getfb(struct drm_device *dev,
461 if (!fb) 461 if (!fb)
462 return -ENOENT; 462 return -ENOENT;
463 463
464 /* Multi-planar framebuffers need getfb2. */
465 if (fb->format->num_planes > 1) {
466 ret = -EINVAL;
467 goto out;
468 }
469
464 r->height = fb->height; 470 r->height = fb->height;
465 r->width = fb->width; 471 r->width = fb->width;
466 r->depth = fb->format->depth; 472 r->depth = fb->format->depth;
@@ -484,6 +490,7 @@ int drm_mode_getfb(struct drm_device *dev,
484 ret = -ENODEV; 490 ret = -ENODEV;
485 } 491 }
486 492
493out:
487 drm_framebuffer_put(fb); 494 drm_framebuffer_put(fb);
488 495
489 return ret; 496 return ret;