Re: [PATCH 07/15] drm/i915: Remove unused loop from intel_dp_mst_compute_config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 09, 2016 at 05:04:06PM +0200, Maarten Lankhorst wrote:
> conn_state is passed as argument now, if anything required conn_state
> they can get it without having to look it up.

Commit message seems off, this has been dead code before. It seems to be
duct-tape from before we had a proper intel_mst_best_encoder.
-Daniel

> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_dp_mst.c | 19 +------------------
>  1 file changed, 1 insertion(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
> index 694c67ebf82a..1fb741a02813 100644
> --- a/drivers/gpu/drm/i915/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
> @@ -38,12 +38,9 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder,
>  	struct intel_digital_port *intel_dig_port = intel_mst->primary;
>  	struct intel_dp *intel_dp = &intel_dig_port->dp;
>  	struct drm_atomic_state *state;
> -	int bpp, i;
> +	int bpp;
>  	int lane_count, slots;
>  	const struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode;
> -	struct drm_connector *drm_connector;
> -	struct intel_connector *connector, *found = NULL;
> -	struct drm_connector_state *connector_state;
>  	int mst_pbn;
>  
>  	pipe_config->dp_encoder_is_mst = true;
> @@ -62,20 +59,6 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder,
>  
>  	state = pipe_config->base.state;
>  
> -	for_each_connector_in_state(state, drm_connector, connector_state, i) {
> -		connector = to_intel_connector(drm_connector);
> -
> -		if (connector_state->best_encoder == &encoder->base) {
> -			found = connector;
> -			break;
> -		}
> -	}
> -
> -	if (!found) {
> -		DRM_ERROR("can't find connector\n");
> -		return false;
> -	}
> -
>  	mst_pbn = drm_dp_calc_pbn_mode(adjusted_mode->crtc_clock, bpp);
>  
>  	pipe_config->pbn = mst_pbn;
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux