[Intel-gfx] [PATCH 6/9] drm/i915: Relocate intel_attached_dp()

Kahola, Mika mika.kahola at intel.com
Mon Jan 13 13:53:17 UTC 2020


On Wed, 2019-12-04 at 20:05 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> We have uses for intel_attached_dp() outside of intel_dp.c. Move
> it to a header.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Mika Kahola <mika.kahola at intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_display_types.h | 5 +++++
>  drivers/gpu/drm/i915/display/intel_dp.c            | 5 -----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h
> b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 79c7454ff510..92bd3d04ad80 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1483,6 +1483,11 @@ static inline struct intel_dp
> *enc_to_intel_dp(struct intel_encoder *encoder)
>  	return &enc_to_dig_port(encoder)->dp;
>  }
>  
> +static inline struct intel_dp *intel_attached_dp(struct
> intel_connector *connector)
> +{
> +	return enc_to_intel_dp(intel_attached_encoder(connector));
> +}
> +
>  static inline bool intel_encoder_is_dp(struct intel_encoder
> *encoder)
>  {
>  	switch (encoder->type) {
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 93f3d232fcb5..50b9b81d37db 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -146,11 +146,6 @@ bool intel_dp_is_edp(struct intel_dp *intel_dp)
>  	return intel_dig_port->base.type == INTEL_OUTPUT_EDP;
>  }
>  
> -static struct intel_dp *intel_attached_dp(struct intel_connector
> *connector)
> -{
> -	return enc_to_intel_dp(intel_attached_encoder(connector));
> -}
> -
>  static void intel_dp_link_down(struct intel_encoder *encoder,
>  			       const struct intel_crtc_state
> *old_crtc_state);
>  static bool edp_panel_vdd_on(struct intel_dp *intel_dp);


More information about the Intel-gfx mailing list