Commit 689008e1 authored by Dillon Varone's avatar Dillon Varone Committed by Alex Deucher

drm/amd/display: set active bit for desktop with VSDBv3

When using freesync on desktop, need to set freesync active bit for AMD
VSDBv3 infopacket.
Tested-by: default avatarDaniel Wheeler <Daniel.Wheeler@amd.com>
Reviewed-by: default avatarMartin Leung <Martin.Leung@amd.com>
Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarDillon Varone <Dillon.Varone@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2eb82aaa
...@@ -616,7 +616,8 @@ static void build_vrr_infopacket_data_v1(const struct mod_vrr_params *vrr, ...@@ -616,7 +616,8 @@ static void build_vrr_infopacket_data_v1(const struct mod_vrr_params *vrr,
} }
static void build_vrr_infopacket_data_v3(const struct mod_vrr_params *vrr, static void build_vrr_infopacket_data_v3(const struct mod_vrr_params *vrr,
struct dc_info_packet *infopacket) struct dc_info_packet *infopacket,
bool freesync_on_desktop)
{ {
unsigned int min_refresh; unsigned int min_refresh;
unsigned int max_refresh; unsigned int max_refresh;
...@@ -649,9 +650,15 @@ static void build_vrr_infopacket_data_v3(const struct mod_vrr_params *vrr, ...@@ -649,9 +650,15 @@ static void build_vrr_infopacket_data_v3(const struct mod_vrr_params *vrr,
infopacket->sb[6] |= 0x02; infopacket->sb[6] |= 0x02;
/* PB6 = [Bit 2 = FreeSync Active] */ /* PB6 = [Bit 2 = FreeSync Active] */
if (freesync_on_desktop) {
if (vrr->state != VRR_STATE_DISABLED &&
vrr->state != VRR_STATE_UNSUPPORTED)
infopacket->sb[6] |= 0x04;
} else {
if (vrr->state == VRR_STATE_ACTIVE_VARIABLE || if (vrr->state == VRR_STATE_ACTIVE_VARIABLE ||
vrr->state == VRR_STATE_ACTIVE_FIXED) vrr->state == VRR_STATE_ACTIVE_FIXED)
infopacket->sb[6] |= 0x04; infopacket->sb[6] |= 0x04;
}
min_refresh = (vrr->min_refresh_in_uhz + 500000) / 1000000; min_refresh = (vrr->min_refresh_in_uhz + 500000) / 1000000;
max_refresh = (vrr->max_refresh_in_uhz + 500000) / 1000000; max_refresh = (vrr->max_refresh_in_uhz + 500000) / 1000000;
...@@ -902,12 +909,13 @@ static void build_vrr_infopacket_v2(enum signal_type signal, ...@@ -902,12 +909,13 @@ static void build_vrr_infopacket_v2(enum signal_type signal,
static void build_vrr_infopacket_v3(enum signal_type signal, static void build_vrr_infopacket_v3(enum signal_type signal,
const struct mod_vrr_params *vrr, const struct mod_vrr_params *vrr,
enum color_transfer_func app_tf, enum color_transfer_func app_tf,
struct dc_info_packet *infopacket) struct dc_info_packet *infopacket,
bool freesync_on_desktop)
{ {
unsigned int payload_size = 0; unsigned int payload_size = 0;
build_vrr_infopacket_header_v3(signal, infopacket, &payload_size); build_vrr_infopacket_header_v3(signal, infopacket, &payload_size);
build_vrr_infopacket_data_v3(vrr, infopacket); build_vrr_infopacket_data_v3(vrr, infopacket, freesync_on_desktop);
build_vrr_infopacket_fs2_data(app_tf, infopacket); build_vrr_infopacket_fs2_data(app_tf, infopacket);
...@@ -952,7 +960,7 @@ void mod_freesync_build_vrr_infopacket(struct mod_freesync *mod_freesync, ...@@ -952,7 +960,7 @@ void mod_freesync_build_vrr_infopacket(struct mod_freesync *mod_freesync,
switch (packet_type) { switch (packet_type) {
case PACKET_TYPE_FS_V3: case PACKET_TYPE_FS_V3:
build_vrr_infopacket_v3(stream->signal, vrr, app_tf, infopacket); build_vrr_infopacket_v3(stream->signal, vrr, app_tf, infopacket, stream->freesync_on_desktop);
break; break;
case PACKET_TYPE_FS_V2: case PACKET_TYPE_FS_V2:
build_vrr_infopacket_v2(stream->signal, vrr, app_tf, infopacket, stream->freesync_on_desktop); build_vrr_infopacket_v2(stream->signal, vrr, app_tf, infopacket, stream->freesync_on_desktop);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment