diff mbox series

[v3,1/4] drm/i915/tc: rename mtl_tc_port_get_pin_assignment_mask()

Message ID 20230721111121.369227-2-luciano.coelho@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/tc: some clean-ups in max lane count handling code | expand

Commit Message

Luca Coelho July 21, 2023, 11:11 a.m. UTC
This function doesn't really return the pin assignment mask, but the
max lane count derived from that.  So rename the function to
mtl_tc_port_get_max_lane_count() to better reflect what it really does.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/gpu/drm/i915/display/intel_tc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Suraj Kandpal Aug. 16, 2023, 8:13 a.m. UTC | #1
> This function doesn't really return the pin assignment mask, but the max lane
> count derived from that.  So rename the function to
> mtl_tc_port_get_max_lane_count() to better reflect what it really does.
>
Maybe also add the version changes on commit messages here as cover letter ends up getting discarded

With that fixed

Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
 
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_tc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_tc.c
> b/drivers/gpu/drm/i915/display/intel_tc.c
> index 3ebf41859043..71bbc2b16a0e 100644
> --- a/drivers/gpu/drm/i915/display/intel_tc.c
> +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> @@ -290,7 +290,7 @@ u32 intel_tc_port_get_pin_assignment_mask(struct
> intel_digital_port *dig_port)
>  	       DP_PIN_ASSIGNMENT_SHIFT(tc->phy_fia_idx);
>  }
> 
> -static int mtl_tc_port_get_pin_assignment_mask(struct intel_digital_port
> *dig_port)
> +static int mtl_tc_port_get_max_lane_count(struct intel_digital_port
> +*dig_port)
>  {
>  	struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
>  	intel_wakeref_t wakeref;
> @@ -325,7 +325,7 @@ int intel_tc_port_fia_max_lane_count(struct
> intel_digital_port *dig_port)
>  	assert_tc_cold_blocked(tc);
> 
>  	if (DISPLAY_VER(i915) >= 14)
> -		return mtl_tc_port_get_pin_assignment_mask(dig_port);
> +		return mtl_tc_port_get_max_lane_count(dig_port);
> 
>  	lane_mask = 0;
>  	with_intel_display_power(i915, POWER_DOMAIN_DISPLAY_CORE,
> wakeref)
> --
> 2.39.2
Luca Coelho Aug. 16, 2023, 9:08 a.m. UTC | #2
On Wed, 2023-08-16 at 08:13 +0000, Kandpal, Suraj wrote:
> > This function doesn't really return the pin assignment mask, but
> > the max lane
> > count derived from that.  So rename the function to
> > mtl_tc_port_get_max_lane_count() to better reflect what it really
> > does.
> > 
> Maybe also add the version changes on commit messages here as cover
> letter ends up getting discarded

Ah, right.  I discussed this with someone else before and we agreed to
disagree. 
Lucas De Marchi Aug. 19, 2023, 3:50 a.m. UTC | #3
On Wed, Aug 16, 2023 at 09:08:44AM +0000, Coelho, Luciano wrote:
>On Wed, 2023-08-16 at 08:13 +0000, Kandpal, Suraj wrote:
>> > This function doesn't really return the pin assignment mask, but
>> > the max lane
>> > count derived from that.  So rename the function to
>> > mtl_tc_port_get_max_lane_count() to better reflect what it really
>> > does.
>> >
>> Maybe also add the version changes on commit messages here as cover
>> letter ends up getting discarded
>
>Ah, right.  I discussed this with someone else before and we agreed to
>disagree. 
Luca Coelho Aug. 24, 2023, 7:48 a.m. UTC | #4
On Fri, 2023-08-18 at 20:50 -0700, Lucas De Marchi wrote:
> On Wed, Aug 16, 2023 at 09:08:44AM +0000, Coelho, Luciano wrote:
> > On Wed, 2023-08-16 at 08:13 +0000, Kandpal, Suraj wrote:
> > > > This function doesn't really return the pin assignment mask, but
> > > > the max lane
> > > > count derived from that.  So rename the function to
> > > > mtl_tc_port_get_max_lane_count() to better reflect what it really
> > > > does.
> > > > 
> > > Maybe also add the version changes on commit messages here as cover
> > > letter ends up getting discarded
> > 
> > Ah, right.  I discussed this with someone else before and we agreed to
> > disagree. 
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
index 3ebf41859043..71bbc2b16a0e 100644
--- a/drivers/gpu/drm/i915/display/intel_tc.c
+++ b/drivers/gpu/drm/i915/display/intel_tc.c
@@ -290,7 +290,7 @@  u32 intel_tc_port_get_pin_assignment_mask(struct intel_digital_port *dig_port)
 	       DP_PIN_ASSIGNMENT_SHIFT(tc->phy_fia_idx);
 }
 
-static int mtl_tc_port_get_pin_assignment_mask(struct intel_digital_port *dig_port)
+static int mtl_tc_port_get_max_lane_count(struct intel_digital_port *dig_port)
 {
 	struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
 	intel_wakeref_t wakeref;
@@ -325,7 +325,7 @@  int intel_tc_port_fia_max_lane_count(struct intel_digital_port *dig_port)
 	assert_tc_cold_blocked(tc);
 
 	if (DISPLAY_VER(i915) >= 14)
-		return mtl_tc_port_get_pin_assignment_mask(dig_port);
+		return mtl_tc_port_get_max_lane_count(dig_port);
 
 	lane_mask = 0;
 	with_intel_display_power(i915, POWER_DOMAIN_DISPLAY_CORE, wakeref)