drm/amd/display: Ensure vmin and vmax adjust for DCE
authorjsg <jsg@openbsd.org>
Thu, 6 Jul 2023 04:20:00 +0000 (04:20 +0000)
committerjsg <jsg@openbsd.org>
Thu, 6 Jul 2023 04:20:00 +0000 (04:20 +0000)
From Rodrigo Siqueira
c50065a3927932cd9baf3d5c94c91b58c31200d5 in linux-6.1.y/6.1.38
2820433be2a33beb44b13b367e155cf221f29610 in mainline linux

sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c

index 277ccee..087a483 100644 (file)
@@ -405,8 +405,9 @@ bool dc_stream_adjust_vmin_vmax(struct dc *dc,
         * Don't adjust DRR while there's bandwidth optimizations pending to
         * avoid conflicting with firmware updates.
         */
-       if (dc->optimized_required || dc->wm_optimized_required)
-               return false;
+       if (dc->ctx->dce_version > DCE_VERSION_MAX)
+               if (dc->optimized_required || dc->wm_optimized_required)
+                       return false;
 
        stream->adjust.v_total_max = adjust->v_total_max;
        stream->adjust.v_total_mid = adjust->v_total_mid;