Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Fix FreeSync active bit issue

[Why]
The FreeSync active bit unconditionally set in HDMI VSIF.

[How]
Set this bit to true when FAMS is enable on desktop.

Reviewed-by: Felipe Clark <felipe.clark@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Leo (Hanghong) Ma <hanghong.ma@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Leo (Hanghong) Ma and committed by
Alex Deucher
6cfb6df2 ba760684

+9 -3
+9 -3
drivers/gpu/drm/amd/display/modules/freesync/freesync.c
··· 955 955 * Check if Freesync is supported. Return if false. If true, 956 956 * set the corresponding bit in the info packet 957 957 */ 958 + bool freesync_on_desktop; 959 + bool fams_enable; 960 + 961 + fams_enable = stream->ctx->dc->current_state->bw_ctx.bw.dcn.clk.fw_based_mclk_switching; 962 + freesync_on_desktop = stream->freesync_on_desktop && fams_enable; 963 + 958 964 if (!vrr->send_info_frame) 959 965 return; 960 966 961 967 switch (packet_type) { 962 968 case PACKET_TYPE_FS_V3: 963 - build_vrr_infopacket_v3(stream->signal, vrr, app_tf, infopacket, stream->freesync_on_desktop); 969 + build_vrr_infopacket_v3(stream->signal, vrr, app_tf, infopacket, freesync_on_desktop); 964 970 break; 965 971 case PACKET_TYPE_FS_V2: 966 - build_vrr_infopacket_v2(stream->signal, vrr, app_tf, infopacket, stream->freesync_on_desktop); 972 + build_vrr_infopacket_v2(stream->signal, vrr, app_tf, infopacket, freesync_on_desktop); 967 973 break; 968 974 case PACKET_TYPE_VRR: 969 975 case PACKET_TYPE_FS_V1: 970 976 default: 971 - build_vrr_infopacket_v1(stream->signal, vrr, infopacket, stream->freesync_on_desktop); 977 + build_vrr_infopacket_v1(stream->signal, vrr, infopacket, freesync_on_desktop); 972 978 } 973 979 974 980 if (true == pack_sdp_v1_3 &&