[PATCH] drm: Remove redundant code in the getencoder ioctl

Daniel Vetter daniel.vetter at ffwll.ch
Wed Feb 25 09:03:40 PST 2015


When enabling atomic state object for this ioctl in

commit abd69c55dd8f1f71b33b8c6165217f4329db8f25
Author: Daniel Vetter <daniel.vetter at ffwll.ch>
Date:   Tue Nov 25 23:50:05 2014 +0100

    drm: Handle atomic state properly in kms getfoo ioctl

I've forgotten to remove this hunk in one of the later revisions.
drm_encoder_get_crtc already does this.

Cc: Rob Clark <robdclark at gmail.com>
Cc: Sean Paul <seanpaul at chromium.org>
Reviewed-by: Rob Clark <robdclark at gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 drivers/gpu/drm/drm_crtc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 4dacee645153..cc548ecd3634 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -2284,8 +2284,6 @@ int drm_mode_getencoder(struct drm_device *dev, void *data,
 	crtc = drm_encoder_get_crtc(encoder);
 	if (crtc)
 		enc_resp->crtc_id = crtc->base.id;
-	else if (encoder->crtc)
-		enc_resp->crtc_id = encoder->crtc->base.id;
 	else
 		enc_resp->crtc_id = 0;
 	drm_modeset_unlock(&dev->mode_config.connection_mutex);
-- 
2.1.4



More information about the dri-devel mailing list