Skip to content

Commit 2b68b9b

Browse files
committed
drm/i915/dp: Simplify computing forced DSC BPP for DP-SST
If dsc_compute_compressed_bpp() failed with a forced pipe BPP value (where the forced pipe BPP value itself is valid within the min/max pipe BPP limits), the function will also fail when called with the maximum pipe BPP value: dsc_compute_compressed_bpp() will try all compressed BPPs below the passed in pipe BPP value and if the function failed with a given (low) compressed BPP value it will also fail with a compressed BPP value higher than the one which failed already. Based on the above remove the logic to retry computing a compressed BPP value with the maximum pipe BPP value if computing the compressed BPP failed already with the (lower) forced pipe BPP value. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patch.msgid.link/20251222153547.713360-18-imre.deak@intel.com
1 parent ce46682 commit 2b68b9b

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2299,17 +2299,11 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
22992299
int ret;
23002300

23012301
forced_bpp = intel_dp_force_dsc_pipe_bpp(intel_dp, limits);
2302+
if (forced_bpp)
2303+
pipe_bpp = forced_bpp;
2304+
else
2305+
pipe_bpp = limits->pipe.max_bpp;
23022306

2303-
if (forced_bpp) {
2304-
ret = dsc_compute_compressed_bpp(intel_dp, pipe_config, conn_state,
2305-
limits, forced_bpp);
2306-
if (ret == 0) {
2307-
pipe_config->pipe_bpp = forced_bpp;
2308-
return 0;
2309-
}
2310-
}
2311-
2312-
pipe_bpp = limits->pipe.max_bpp;
23132307
ret = dsc_compute_compressed_bpp(intel_dp, pipe_config, conn_state,
23142308
limits, pipe_bpp);
23152309
if (ret)

0 commit comments

Comments
 (0)