[PATCH 01/14] drm/i915/dp: Iterate DSC BPP from high to low on all platforms
Jani Nikula
jani.nikula at intel.com
Mon Feb 3 14:46:28 UTC 2025
On Fri, 31 Jan 2025, Imre Deak <imre.deak at intel.com> wrote:
> On Fri, Jan 31, 2025 at 02:49:54PM +0200, Jani Nikula wrote:
>> Commit 1c56e9a39833 ("drm/i915/dp: Get optimal link config to have best
>> compressed bpp") tries to find the best compressed bpp for the
>> link. However, it iterates from max to min bpp on display 13+, and from
>> min to max on other platforms. This presumably leads to minimum
>> compressed bpp always being chosen on display 11-12.
>>
>> Iterate from high to low on all platforms to actually use the best
>> possible compressed bpp.
>>
>> Fixes: 1c56e9a39833 ("drm/i915/dp: Get optimal link config to have best compressed bpp")
>> Cc: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
>> Cc: Imre Deak <imre.deak at intel.com>
>> Cc: <stable at vger.kernel.org> # v6.7+
>> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>
> Reviewed-by: Imre Deak <imre.deak at intel.com>
Thanks for the swift reviews! Pushed the lot to drm-intel-next.
BR,
Jani.
>
>> ---
>> drivers/gpu/drm/i915/display/intel_dp.c | 7 +++----
>> 1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
>> index d1b4fd542a1f..ecf192262eb9 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> @@ -2073,11 +2073,10 @@ icl_dsc_compute_link_config(struct intel_dp *intel_dp,
>> /* Compressed BPP should be less than the Input DSC bpp */
>> dsc_max_bpp = min(dsc_max_bpp, output_bpp - 1);
>>
>> - for (i = 0; i < ARRAY_SIZE(valid_dsc_bpp); i++) {
>> - if (valid_dsc_bpp[i] < dsc_min_bpp)
>> + for (i = ARRAY_SIZE(valid_dsc_bpp) - 1; i >= 0; i--) {
>> + if (valid_dsc_bpp[i] < dsc_min_bpp ||
>> + valid_dsc_bpp[i] > dsc_max_bpp)
>> continue;
>> - if (valid_dsc_bpp[i] > dsc_max_bpp)
>> - break;
>>
>> ret = dsc_compute_link_config(intel_dp,
>> pipe_config,
>> --
>> 2.39.5
>>
--
Jani Nikula, Intel
More information about the Intel-gfx
mailing list