[6/9] drm/i915: Relocate intel_attached_dp()
diff mbox series

Message ID 20191204180549.1267-7-ville.syrjala@linux.intel.com
State New
Headers show
Series
  • drm/i915: Cleanups around intel_attached_encoder() & co.
Related show

Commit Message

Ville Syrjälä Dec. 4, 2019, 6:05 p.m. UTC
From: Ville Syrjälä <ville.syrjala@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@linux.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(-)

Comments

Kahola, Mika Jan. 13, 2020, 1:53 p.m. UTC | #1
On Wed, 2019-12-04 at 20:05 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@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@linux.intel.com>

Reviewed-by: Mika Kahola <mika.kahola@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);

Patch
diff mbox series

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);