drm/i915/dp: Move force_dsc_fractional_bpp_en check to intel_dp_dsc_valid_bpp()

Add the fractional DSC BPP force check to intel_dp_dsc_valid_bpp(), and
use that in xelpd_dsc_compute_link_config(). This is another step closer
towards unifying the platform specific functions.

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/2d8cdfef422dc2229d3ead2201bff4a321cbbdd3.1738327620.git.jani.nikula@intel.com
This commit is contained in:
Jani Nikula
2025-01-31 14:50:00 +02:00
parent c791c7ebd0
commit 206914ca65

View File

@@ -2075,8 +2075,12 @@ static bool intel_dp_dsc_valid_bpp(struct intel_dp *intel_dp, int bpp_x16)
struct intel_display *display = to_intel_display(intel_dp);
int i;
if (DISPLAY_VER(display) >= 13)
if (DISPLAY_VER(display) >= 13) {
if (intel_dp->force_dsc_fractional_bpp_en && !fxp_q4_to_frac(bpp_x16))
return false;
return true;
}
if (fxp_q4_to_frac(bpp_x16))
return false;
@@ -2143,9 +2147,9 @@ xelpd_dsc_compute_link_config(struct intel_dp *intel_dp,
int ret;
for (bpp_x16 = max_bpp_x16; bpp_x16 >= min_bpp_x16; bpp_x16 -= bpp_step_x16) {
if (intel_dp->force_dsc_fractional_bpp_en &&
!fxp_q4_to_frac(bpp_x16))
if (!intel_dp_dsc_valid_bpp(intel_dp, bpp_x16))
continue;
ret = dsc_compute_link_config(intel_dp,
pipe_config,
limits,