Skip to content

Commit 2c81389

Browse files
Lawstorant1Naim
authored andcommitted
drm/amd/display: Rename PCON adaptive sync types
[Why] PCONs support sending out HDMI VRR infopackets on their own and this makes this types not specific to FreeSync [How] Make the name more generic for the upcoming HDMI VRR over PCON implementation Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com> Tested-by: Bernhard Berger <bernhard.berger@gmail.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
1 parent 911a3b2 commit 2c81389

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9638,7 +9638,8 @@ static void update_freesync_state_on_stream(
96389638

96399639
aconn = (struct amdgpu_dm_connector *)new_stream->dm_stream_context;
96409640

9641-
if (aconn && (aconn->as_type == FREESYNC_TYPE_PCON_IN_WHITELIST || aconn->vsdb_info.replay_mode)) {
9641+
if (aconn && (aconn->as_type == ADAPTIVE_SYNC_TYPE_PCON_ALLOWED ||
9642+
aconn->vsdb_info.replay_mode)) {
96429643
pack_sdp_v1_3 = aconn->pack_sdp_v1_3;
96439644

96449645
if (aconn->vsdb_info.amd_vsdb_version == 1)
@@ -13407,7 +13408,7 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
1340713408

1340813409
/* DP -> HDMI PCON */
1340913410
} else if (pcon_allowed && vsdb_info.freesync_supported) {
13410-
amdgpu_dm_connector->as_type = FREESYNC_TYPE_PCON_IN_WHITELIST;
13411+
amdgpu_dm_connector->as_type = ADAPTIVE_SYNC_TYPE_PCON_ALLOWED;
1341113412
amdgpu_dm_connector->pack_sdp_v1_3 = true;
1341213413
amdgpu_dm_connector->vsdb_info = vsdb_info;
1341313414

drivers/gpu/drm/amd/display/modules/inc/mod_info_packet.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ void mod_build_hf_vsif_infopacket(const struct dc_stream_state *stream,
4848
struct dc_info_packet *info_packet);
4949

5050
enum adaptive_sync_type {
51-
ADAPTIVE_SYNC_TYPE_NONE = 0,
52-
ADAPTIVE_SYNC_TYPE_DP = 1,
53-
FREESYNC_TYPE_PCON_IN_WHITELIST = 2,
54-
FREESYNC_TYPE_PCON_NOT_IN_WHITELIST = 3,
55-
ADAPTIVE_SYNC_TYPE_EDP = 4,
51+
ADAPTIVE_SYNC_TYPE_NONE = 0,
52+
ADAPTIVE_SYNC_TYPE_DP = 1,
53+
ADAPTIVE_SYNC_TYPE_PCON_ALLOWED = 2,
54+
ADAPTIVE_SYNC_TYPE_PCON_NOT_ALLOWED = 3,
55+
ADAPTIVE_SYNC_TYPE_EDP = 4,
5656
};
5757

5858
enum adaptive_sync_sdp_version {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ void mod_build_adaptive_sync_infopacket(const struct dc_stream_state *stream,
590590
if (stream != NULL)
591591
mod_build_adaptive_sync_infopacket_v2(stream, param, info_packet);
592592
break;
593-
case FREESYNC_TYPE_PCON_IN_WHITELIST:
593+
case ADAPTIVE_SYNC_TYPE_PCON_ALLOWED:
594594
case ADAPTIVE_SYNC_TYPE_EDP:
595595
if (stream && stream->link->replay_settings.config.replay_supported &&
596596
stream->link->replay_settings.config.replay_version == DC_VESA_PANEL_REPLAY)
@@ -599,7 +599,7 @@ void mod_build_adaptive_sync_infopacket(const struct dc_stream_state *stream,
599599
mod_build_adaptive_sync_infopacket_v1(info_packet);
600600
break;
601601
case ADAPTIVE_SYNC_TYPE_NONE:
602-
case FREESYNC_TYPE_PCON_NOT_IN_WHITELIST:
602+
case ADAPTIVE_SYNC_TYPE_PCON_NOT_ALLOWED:
603603
default:
604604
break;
605605
}

0 commit comments

Comments
 (0)