Skip to content

Commit abb749b

Browse files
Lawstorant1Naim
authored andcommitted
drm/amd/display: freesync_on_desktop support for HDMI VRR
[Why] Many TVs and other HDMI sinks suffer from blanking and possibly other glitches when VRR is toggled. With FreeSync present on such sinks, they behave like the signal is always variable, even in fixed refresh rate situations. DisplayPort and eDP enforce seamless VRR transitions but HDMI unfortunately doesn't. [How] Keep HDMI VRR toggled if it's supported and not explicitly disabled. Add logic that control this behavior and use this mode by default until it can be controlled by connector KMS property. Functionally, for an end user, this is the same as normal, fixed refresh rate mode. The only difference is that sink is kept in VRR state which enables seamless transitions into/out of variable refresh rate. Uses the already established freesync_on_desktop field and logic. Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
1 parent 75e9ec9 commit abb749b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,14 @@ static void build_vtem_infopacket_data(const struct dc_stream_state *stream,
633633

634634
vrr_active = vrr->state == VRR_STATE_ACTIVE_VARIABLE ||
635635
vrr->state == VRR_STATE_ACTIVE_FIXED;
636+
/*
637+
* Enables FreeSync-like behavior by keeping HDMI VRR signalling active
638+
* in fixed refresh rate conditions like normal desktop work/web browsing.
639+
* Functinally behaves like non-VRR mode by keeping the actual refresh
640+
* rate fixed.
641+
*/
642+
if (stream->freesync_on_desktop)
643+
vrr_active |= vrr->state == VRR_STATE_INACTIVE;
636644

637645
infopacket->sb[VTEM_MD0] = VTEM_M_CONST << VTEM_M_CONST_BIT;
638646
infopacket->sb[VTEM_MD0] |= VTEM_FVA_FACTOR << VTEM_FVA_BIT;

0 commit comments

Comments
 (0)