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.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index e4e7b92f6d32..3fd85772afb8 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -2405,7 +2405,6 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
2405 struct drm_file *file_priv) 2405 struct drm_file *file_priv)
2406{ 2406{
2407 struct drm_mode_set_plane *plane_req = data; 2407 struct drm_mode_set_plane *plane_req = data;
2408 struct drm_mode_object *obj;
2409 struct drm_plane *plane; 2408 struct drm_plane *plane;
2410 struct drm_crtc *crtc = NULL; 2409 struct drm_crtc *crtc = NULL;
2411 struct drm_framebuffer *fb = NULL; 2410 struct drm_framebuffer *fb = NULL;
@@ -2428,14 +2427,12 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
2428 * First, find the plane, crtc, and fb objects. If not available, 2427 * First, find the plane, crtc, and fb objects. If not available,
2429 * we don't bother to call the driver. 2428 * we don't bother to call the driver.
2430 */ 2429 */
2431 obj = drm_mode_object_find(dev, plane_req->plane_id, 2430 plane = drm_plane_find(dev, plane_req->plane_id);
2432 DRM_MODE_OBJECT_PLANE); 2431 if (!plane) {
2433 if (!obj) {
2434 DRM_DEBUG_KMS("Unknown plane ID %d\n", 2432 DRM_DEBUG_KMS("Unknown plane ID %d\n",
2435 plane_req->plane_id); 2433 plane_req->plane_id);
2436 return -ENOENT; 2434 return -ENOENT;
2437 } 2435 }
2438 plane = obj_to_plane(obj);
2439 2436
2440 if (plane_req->fb_id) { 2437 if (plane_req->fb_id) {
2441 fb = drm_framebuffer_lookup(dev, plane_req->fb_id); 2438 fb = drm_framebuffer_lookup(dev, plane_req->fb_id);
@@ -2445,14 +2442,12 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
2445 return -ENOENT; 2442 return -ENOENT;
2446 } 2443 }
2447 2444
2448 obj = drm_mode_object_find(dev, plane_req->crtc_id, 2445 crtc = drm_crtc_find(dev, plane_req->crtc_id);
2449 DRM_MODE_OBJECT_CRTC); 2446 if (!crtc) {
2450 if (!obj) {
2451 DRM_DEBUG_KMS("Unknown crtc ID %d\n", 2447 DRM_DEBUG_KMS("Unknown crtc ID %d\n",
2452 plane_req->crtc_id); 2448 plane_req->crtc_id);
2453 return -ENOENT; 2449 return -ENOENT;
2454 } 2450 }
2455 crtc = obj_to_crtc(obj);
2456 } 2451 }
2457 2452
2458 /* 2453 /*