diff options
| -rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 7 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_plane_helper.c | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 43735f38cd17..b8cc4fe0a0f7 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", |
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c index 1b15643b4586..37b9333cee49 100644 --- a/drivers/gpu/drm/drm_plane_helper.c +++ b/drivers/gpu/drm/drm_plane_helper.c | |||
| @@ -145,12 +145,6 @@ int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc, | |||
| 145 | return -EINVAL; | 145 | return -EINVAL; |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | /* Primary planes are locked to their owning CRTC */ | ||
| 149 | if (plane->possible_crtcs != drm_crtc_mask(crtc)) { | ||
| 150 | DRM_DEBUG_KMS("Cannot change primary plane CRTC\n"); | ||
| 151 | return -EINVAL; | ||
| 152 | } | ||
| 153 | |||
| 154 | /* Disallow scaling */ | 148 | /* Disallow scaling */ |
| 155 | src_w >>= 16; | 149 | src_w >>= 16; |
| 156 | src_h >>= 16; | 150 | src_h >>= 16; |
