diff options
| author | Ingo Molnar <[email protected]> | 2018-03-27 08:43:39 +0200 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2018-03-27 08:43:39 +0200 |
| commit | 0bc91d4ba77156ae9217d25ed7c434540f950d05 (patch) | |
| tree | 949c1acf27b106184d8842586740fbbcc9c9ea62 /drivers/gpu/drm/drm_framebuffer.c | |
| parent | 565977a3d929fc4427769117a8ac976ec16776d5 (diff) | |
| parent | 3eb2ce825ea1ad89d20f7a3b5780df850e4be274 (diff) | |
Merge tag 'v4.16-rc7' into x86/mm, to fix up conflict
Conflicts:
arch/x86/mm/init_64.c
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/drm_framebuffer.c')
| -rw-r--r-- | drivers/gpu/drm/drm_framebuffer.c | 7 |
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, if (!fb) return -ENOENT; + /* Multi-planar framebuffers need getfb2. */ + if (fb->format->num_planes > 1) { + ret = -EINVAL; + goto out; + } + r->height = fb->height; r->width = fb->width; r->depth = fb->format->depth; @@ -484,6 +490,7 @@ int drm_mode_getfb(struct drm_device *dev, ret = -ENODEV; } +out: drm_framebuffer_put(fb); return ret; |