]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/display: Use int for entry setup frames
authorMika Kahola <mika.kahola@intel.com>
Mon, 13 Nov 2023 09:37:37 +0000 (11:37 +0200)
committerMika Kahola <mika.kahola@intel.com>
Tue, 14 Nov 2023 11:04:59 +0000 (13:04 +0200)
At least one TGL had regression when using u8 types
for entry setup frames calculation. So, let's switch
to use ints instead.

intel_psr_entry_setup_frames() function expects
to return u8 but since in case of error the error
code -ETIME is returned. This doesn't fit into u8
and hence the return value is not as expected.

Fixes: 2b981d57e480 ("drm/i915/display: Support PSR entry VSC packet to be transmitted one frame earlier")
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231113093737.358137-1-mika.kahola@intel.com
drivers/gpu/drm/i915/display/intel_psr.c

index ea292832ca47526045fc66d3145d62e08f891801..2fc89ac5b27a9a6554c327e2cdef1c66dca48f10 100644 (file)
@@ -1141,12 +1141,12 @@ static bool _compute_psr2_wake_times(struct intel_dp *intel_dp,
        return true;
 }
 
-static u8 intel_psr_entry_setup_frames(struct intel_dp *intel_dp,
-                                      const struct drm_display_mode *adjusted_mode)
+static int intel_psr_entry_setup_frames(struct intel_dp *intel_dp,
+                                       const struct drm_display_mode *adjusted_mode)
 {
        struct drm_i915_private *i915 = dp_to_i915(intel_dp);
        int psr_setup_time = drm_dp_psr_setup_time(intel_dp->psr_dpcd);
-       u8 entry_setup_frames = 0;
+       int entry_setup_frames = 0;
 
        if (psr_setup_time < 0) {
                drm_dbg_kms(&i915->drm,