From: Dillon Varone <[email protected]>

[Why & How]
Same as freesync, when VRR state is inactive, set VRR_EN=1 so sinks
react accordingly when VRR abruptly becomes active.

Reviewed-by: Relja Vojvodic <[email protected]>
Signed-off-by: Dillon Varone <[email protected]>
Signed-off-by: Ray Wu <[email protected]>
---
 drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c 
b/drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c
index 48d0e164e62b..8dd9cec6aefb 100644
--- a/drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c
+++ b/drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c
@@ -669,8 +669,8 @@ static void build_vtem_infopacket_data(const struct 
dc_stream_state *stream,
        set_field_with_mask(&infopacket->sb[VTEM_MD0], 
MASK_VTEM_MD0__FVA_FACTOR_M1,
                        (fva_factor > 0) ? (fva_factor - 1) : 0);
        /* VRR Parameters */
-       if (vrr->state == VRR_STATE_ACTIVE_VARIABLE ||
-           vrr->state == VRR_STATE_ACTIVE_FIXED) {
+       if (vrr->state != VRR_STATE_DISABLED &&
+                       vrr->state != VRR_STATE_UNSUPPORTED) {
                set_field_with_mask(&infopacket->sb[VTEM_MD0], 
MASK_VTEM_MD0__VRR_EN, 1);
        } else {
                set_field_with_mask(&infopacket->sb[VTEM_MD0], 
MASK_VTEM_MD0__VRR_EN, 0);
-- 
2.43.0

Reply via email to