diff mbox series

[13/16] drm/i915/dp: Modify helper to get slice count for ultrajoiner

Message ID 20240923181336.3303940-14-ankit.k.nautiyal@intel.com (mailing list archive)
State New, archived
Headers show
Series Ultrajoiner basic functionality series | expand

Commit Message

Ankit Nautiyal Sept. 23, 2024, 6:13 p.m. UTC
From: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>

ultrajoiner needs 2 bigjoiners to be enabled, so modify the helper
intel_dp_dsc_get_slice_count for ultrajoiner.

Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Ville Syrjälä Sept. 23, 2024, 7:04 p.m. UTC | #1
On Mon, Sep 23, 2024 at 11:43:33PM +0530, Ankit Nautiyal wrote:
> From: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> 
> ultrajoiner needs 2 bigjoiners to be enabled, so modify the helper
> intel_dp_dsc_get_slice_count for ultrajoiner.
> 
> Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index a853f975bda1..115d8468bb91 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -996,8 +996,11 @@ u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
>  		    drm_dp_dsc_sink_max_slice_count(connector->dp.dsc_dpcd, false))
>  			break;
>  
> -		/* big joiner needs small joiner to be enabled */
> -		if (num_joined_pipes == 2 && test_slice_count < 4)
> +		/*
> +		 * big joiner needs small joiner to be enabled,
> +		 * and ultrajoiner needs 2 bigjoiners to be enabled
> +		 */
> +		if (num_joined_pipes > 1 && test_slice_count < num_joined_pipes * 2)

This is now

u8 test_slice_count = valid_dsc_slicecount[i] * num_joined_pipes;
if (num_joined_pipes > 1 && test_slice_count < num_joined_pipes * 2)
	continue;

which we could simply to just

if (num_joined_pipes > 1 && valid_dsc_slicecount[i] < 2)
	continue;

which might more clearly reflect what the original comment
"big joiner needs small joiner to be enabled" seems to
be trying to say (basically that we need at least two slices
per pipe) whenever bigjoiner is enabled. Ultrajoiner presumably
does not really change that fact in any way?

>  			continue;
>  
>  		if (min_slice_count <= test_slice_count)
> -- 
> 2.45.2
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index a853f975bda1..115d8468bb91 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -996,8 +996,11 @@  u8 intel_dp_dsc_get_slice_count(const struct intel_connector *connector,
 		    drm_dp_dsc_sink_max_slice_count(connector->dp.dsc_dpcd, false))
 			break;
 
-		/* big joiner needs small joiner to be enabled */
-		if (num_joined_pipes == 2 && test_slice_count < 4)
+		/*
+		 * big joiner needs small joiner to be enabled,
+		 * and ultrajoiner needs 2 bigjoiners to be enabled
+		 */
+		if (num_joined_pipes > 1 && test_slice_count < num_joined_pipes * 2)
 			continue;
 
 		if (min_slice_count <= test_slice_count)