diff mbox series

[v2,5/6] drm/i915/lspcon: remove dp_to_lspcon(), hide enc_to_intel_lspcon()

Message ID ea14ba07b88ba5ed65d832c89a3415b7a91edea9.1738677489.git.jani.nikula@intel.com (mailing list archive)
State New
Headers show
Series drm/i915/lspcon: interface cleanups | expand

Commit Message

Jani Nikula Feb. 4, 2025, 1:58 p.m. UTC
There are no users left for dp_to_lspcon(), remove it. The only two
users of enc_to_intel_lspcon() are in intel_lspcon.c, so hide it there.

v2: Rebase

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_types.h | 12 ------------
 drivers/gpu/drm/i915/display/intel_lspcon.c        |  5 +++++
 2 files changed, 5 insertions(+), 12 deletions(-)

Comments

Rodrigo Vivi Feb. 4, 2025, 10:59 p.m. UTC | #1
On Tue, Feb 04, 2025 at 03:58:42PM +0200, Jani Nikula wrote:
> There are no users left for dp_to_lspcon(), remove it. The only two
> users of enc_to_intel_lspcon() are in intel_lspcon.c, so hide it there.
> 
> v2: Rebase

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_types.h | 12 ------------
>  drivers/gpu/drm/i915/display/intel_lspcon.c        |  5 +++++
>  2 files changed, 5 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index cb51b7936f93..a358620e2c09 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1982,24 +1982,12 @@ static inline bool intel_encoder_is_hdmi(struct intel_encoder *encoder)
>  	}
>  }
>  
> -static inline struct intel_lspcon *
> -enc_to_intel_lspcon(struct intel_encoder *encoder)
> -{
> -	return &enc_to_dig_port(encoder)->lspcon;
> -}
> -
>  static inline struct intel_digital_port *
>  dp_to_dig_port(struct intel_dp *intel_dp)
>  {
>  	return container_of(intel_dp, struct intel_digital_port, dp);
>  }
>  
> -static inline struct intel_lspcon *
> -dp_to_lspcon(struct intel_dp *intel_dp)
> -{
> -	return &dp_to_dig_port(intel_dp)->lspcon;
> -}
> -
>  static inline struct intel_digital_port *
>  hdmi_to_dig_port(struct intel_hdmi *intel_hdmi)
>  {
> diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
> index 45b63fea3642..02c22a981fe1 100644
> --- a/drivers/gpu/drm/i915/display/intel_lspcon.c
> +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
> @@ -55,6 +55,11 @@
>  #define  LSPCON_PARADE_AVI_IF_KICKOFF (1 << 7)
>  #define LSPCON_PARADE_AVI_IF_DATA_SIZE 32
>  
> +static struct intel_lspcon *enc_to_intel_lspcon(struct intel_encoder *encoder)
> +{
> +	return &enc_to_dig_port(encoder)->lspcon;
> +}
> +
>  static struct intel_dp *lspcon_to_intel_dp(struct intel_lspcon *lspcon)
>  {
>  	struct intel_digital_port *dig_port =
> -- 
> 2.39.5
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index cb51b7936f93..a358620e2c09 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1982,24 +1982,12 @@  static inline bool intel_encoder_is_hdmi(struct intel_encoder *encoder)
 	}
 }
 
-static inline struct intel_lspcon *
-enc_to_intel_lspcon(struct intel_encoder *encoder)
-{
-	return &enc_to_dig_port(encoder)->lspcon;
-}
-
 static inline struct intel_digital_port *
 dp_to_dig_port(struct intel_dp *intel_dp)
 {
 	return container_of(intel_dp, struct intel_digital_port, dp);
 }
 
-static inline struct intel_lspcon *
-dp_to_lspcon(struct intel_dp *intel_dp)
-{
-	return &dp_to_dig_port(intel_dp)->lspcon;
-}
-
 static inline struct intel_digital_port *
 hdmi_to_dig_port(struct intel_hdmi *intel_hdmi)
 {
diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
index 45b63fea3642..02c22a981fe1 100644
--- a/drivers/gpu/drm/i915/display/intel_lspcon.c
+++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
@@ -55,6 +55,11 @@ 
 #define  LSPCON_PARADE_AVI_IF_KICKOFF (1 << 7)
 #define LSPCON_PARADE_AVI_IF_DATA_SIZE 32
 
+static struct intel_lspcon *enc_to_intel_lspcon(struct intel_encoder *encoder)
+{
+	return &enc_to_dig_port(encoder)->lspcon;
+}
+
 static struct intel_dp *lspcon_to_intel_dp(struct intel_lspcon *lspcon)
 {
 	struct intel_digital_port *dig_port =