Re: [PATCH 1/2] drm/i915: Move intel_dp->prepare_link_train assignment into ddi code

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

 



On Tue, Jun 04, 2019 at 05:02:13PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> It's a bit silly to go through intel_dp.c to assign the
> prepare_link_train vfunc for ddi platforms when we can just
> assign it directly from intel_ddi.c.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Yes looks like a logical thing to do.

Reviewed-by: Manasi Navare <manasi.d.navare@xxxxxxxxx>

Manasi

> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 5 ++++-
>  drivers/gpu/drm/i915/intel_ddi.h | 1 -
>  drivers/gpu/drm/i915/intel_dp.c  | 4 ----
>  3 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 350eaf54f01f..609ccd240efb 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -3650,7 +3650,7 @@ intel_ddi_post_pll_disable(struct intel_encoder *encoder,
>  						  intel_ddi_main_link_aux_domain(dig_port));
>  }
>  
> -void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp)
> +static void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp)
>  {
>  	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
>  	struct drm_i915_private *dev_priv =
> @@ -3958,6 +3958,9 @@ intel_ddi_init_dp_connector(struct intel_digital_port *intel_dig_port)
>  		return NULL;
>  
>  	intel_dig_port->dp.output_reg = DDI_BUF_CTL(port);
> +	intel_dig_port->dp.prepare_link_retrain =
> +		intel_ddi_prepare_link_retrain;
> +
>  	if (!intel_dp_init_connector(intel_dig_port, connector)) {
>  		kfree(connector);
>  		return NULL;
> diff --git a/drivers/gpu/drm/i915/intel_ddi.h b/drivers/gpu/drm/i915/intel_ddi.h
> index 9cf69175942e..a08365da2643 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.h
> +++ b/drivers/gpu/drm/i915/intel_ddi.h
> @@ -31,7 +31,6 @@ void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_state
>  void intel_ddi_enable_pipe_clock(const struct intel_crtc_state *crtc_state);
>  void intel_ddi_disable_pipe_clock(const  struct intel_crtc_state *crtc_state);
>  void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state);
> -void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp);
>  bool intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector);
>  void intel_ddi_get_config(struct intel_encoder *encoder,
>  			  struct intel_crtc_state *pipe_config);
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 24b56b2a76c8..64fefc9af7a6 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -7348,10 +7348,6 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
>  	intel_dp->pps_pipe = INVALID_PIPE;
>  	intel_dp->active_pipe = INVALID_PIPE;
>  
> -	/* intel_dp vfuncs */
> -	if (HAS_DDI(dev_priv))
> -		intel_dp->prepare_link_retrain = intel_ddi_prepare_link_retrain;
> -
>  	/* Preserve the current hw state. */
>  	intel_dp->DP = I915_READ(intel_dp->output_reg);
>  	intel_dp->attached_connector = intel_connector;
> -- 
> 2.21.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux