]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/dp: Rename some variables in xelpd_dsc_compute_link_config()
authorJani Nikula <jani.nikula@intel.com>
Fri, 31 Jan 2025 12:49:56 +0000 (14:49 +0200)
committerJani Nikula <jani.nikula@intel.com>
Mon, 3 Feb 2025 14:31:10 +0000 (16:31 +0200)
Use the _x16 suffix for all .4 fixed point variables. Drop compressed_
prefix, as it's implied from the precision suffix.

As dsc_min_bpp and dsc_max_bpp change domain from int to .4 in the
middle of the function, they remain the same for now.

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/91dd6ef53683b624a978101cca7322ea3e5e2f7b.1738327620.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_dp.c

index 43c6f0ad0c011816146a21fd7297e802ced7b76f..e2d252e15ce988e0af27d01da0efc37ae0073bf3 100644 (file)
@@ -2126,31 +2126,28 @@ xelpd_dsc_compute_link_config(struct intel_dp *intel_dp,
 {
        struct intel_display *display = to_intel_display(intel_dp);
        int output_bpp = intel_dp_output_bpp(pipe_config->output_format, pipe_bpp);
-       u16 compressed_bppx16;
-       u8 bppx16_step;
+       int bpp_x16, bpp_step_x16;
        int ret;
 
-       bppx16_step = intel_dp_dsc_bpp_step_x16(connector);
+       bpp_step_x16 = intel_dp_dsc_bpp_step_x16(connector);
 
        /* Compressed BPP should be less than the Input DSC bpp */
-       dsc_max_bpp = min(dsc_max_bpp << 4, (output_bpp << 4) - bppx16_step);
+       dsc_max_bpp = min(dsc_max_bpp << 4, (output_bpp << 4) - bpp_step_x16);
        dsc_min_bpp = dsc_min_bpp << 4;
 
-       for (compressed_bppx16 = dsc_max_bpp;
-            compressed_bppx16 >= dsc_min_bpp;
-            compressed_bppx16 -= bppx16_step) {
+       for (bpp_x16 = dsc_max_bpp; bpp_x16 >= dsc_min_bpp; bpp_x16 -= bpp_step_x16) {
                if (intel_dp->force_dsc_fractional_bpp_en &&
-                   !fxp_q4_to_frac(compressed_bppx16))
+                   !fxp_q4_to_frac(bpp_x16))
                        continue;
                ret = dsc_compute_link_config(intel_dp,
                                              pipe_config,
                                              limits,
-                                             compressed_bppx16,
+                                             bpp_x16,
                                              timeslots);
                if (ret == 0) {
-                       pipe_config->dsc.compressed_bpp_x16 = compressed_bppx16;
+                       pipe_config->dsc.compressed_bpp_x16 = bpp_x16;
                        if (intel_dp->force_dsc_fractional_bpp_en &&
-                           fxp_q4_to_frac(compressed_bppx16))
+                           fxp_q4_to_frac(bpp_x16))
                                drm_dbg_kms(display->drm,
                                            "Forcing DSC fractional bpp\n");