aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r--drivers/gpu/drm/drm_crtc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 239342f554b4..fe94cc10cd35 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -2178,6 +2178,13 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
2178 goto out; 2178 goto out;
2179 } 2179 }
2180 2180
2181 /* Check whether this plane is usable on this CRTC */
2182 if (!(plane->possible_crtcs & drm_crtc_mask(crtc))) {
2183 DRM_DEBUG_KMS("Invalid crtc for plane\n");
2184 ret = -EINVAL;
2185 goto out;
2186 }
2187
2181 fb = drm_framebuffer_lookup(dev, plane_req->fb_id); 2188 fb = drm_framebuffer_lookup(dev, plane_req->fb_id);
2182 if (!fb) { 2189 if (!fb) {
2183 DRM_DEBUG_KMS("Unknown framebuffer ID %d\n", 2190 DRM_DEBUG_KMS("Unknown framebuffer ID %d\n",