[PATCH v2 02/12] drm/i915/dp_mst: Simplify handling the single-bpp case during state computation

Nautiyal, Ankit K ankit.k.nautiyal at intel.com
Tue May 6 09:51:13 UTC 2025


On 4/28/2025 7:01 PM, Imre Deak wrote:
> A follow-up change wants to skip invalid bpps in the bpp select loop of
> a stream state computation. To allow for that, using the usual
> 'continue' statement in the loop, change the way the sinlge-bpp range is


s/sinlge/single


> handled.
>
> Cc: Jani Nikula <jani.nikula at intel.com>
> Signed-off-by: Imre Deak <imre.deak at intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_dp_mst.c | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 49b836cd8816c..d8033e55dc093 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -283,6 +283,12 @@ int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
>   					   fxp_q4_to_frac(max_bpp_x16) ||
>   					   fxp_q4_to_frac(bpp_step_x16)));
>   
> +	if (!bpp_step_x16) {
> +		/* Allow using zero step only to indicate single try for a given bpp. */
> +		drm_WARN_ON(display->drm, min_bpp_x16 != max_bpp_x16);
> +		bpp_step_x16 = 1;
> +	}

I can see this function is called for non-dsc uhbr case with 
bpp_step_x16 =0 and dsc false.


So we just want to get the loop run once and get the slots with 
min_bpp_x16 == max_bpp_x16 == fxp_q4_from_int(pipe_bpp) right?


Similarly for dsc uhbr case check with a given compressed bpp 
dsc_bpp_x16 if its valid.


bpp_step_x16 = 1 will mean 1/16th fraction. The value itself won't have 
any effect for the case where min_bpp_x16 == max_bpp_x16.


Is my understanding correct here?


Regards,

Ankit





> +
>   	if (is_mst) {
>   		mst_state = drm_atomic_get_mst_topology_state(state, &intel_dp->mst.mgr);
>   		if (IS_ERR(mst_state))
> @@ -408,10 +414,6 @@ int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
>   
>   			break;
>   		}
> -
> -		/* Allow using zero step to indicate one try */
> -		if (!bpp_step_x16)
> -			break;
>   	}
>   
>   	if (slots < 0) {


More information about the Intel-xe mailing list