aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Koo <Anthony.Koo@amd.com>2018-05-08 17:09:49 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-08-27 12:10:56 -0400
commit69ff884526742fcb00b7509461bf8e41c87d9b10 (patch)
tree47c62d5eafd785d24671a33119e3c8836b05af17
parent4c1fa3630b44f03d5539a778ddcea319e9c8223a (diff)
drm/amd/display: add config for sending VSIF
Signed-off-by: Anthony Koo <Anthony.Koo@amd.com> Reviewed-by: Aric Cyr <Aric.Cyr@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c1
-rw-r--r--drivers/gpu/drm/amd/display/modules/freesync/freesync.c3
-rw-r--r--drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h2
3 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 5f5e5ea20d78..f0f1e58b9830 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4680,6 +4680,7 @@ void set_freesync_on_stream(struct amdgpu_display_manager *dm,
4680 aconnector->min_vfreq * 1000000; 4680 aconnector->min_vfreq * 1000000;
4681 config.max_refresh_in_uhz = 4681 config.max_refresh_in_uhz =
4682 aconnector->max_vfreq * 1000000; 4682 aconnector->max_vfreq * 1000000;
4683 config.vsif_supported = true;
4683 } 4684 }
4684 4685
4685 mod_freesync_build_vrr_params(dm->freesync_module, 4686 mod_freesync_build_vrr_params(dm->freesync_module,
diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
index 769f46777a1d..e1688902a1b0 100644
--- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
+++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
@@ -492,7 +492,7 @@ void mod_freesync_build_vrr_infopacket(struct mod_freesync *mod_freesync,
492 /* Check if Freesync is supported. Return if false. If true, 492 /* Check if Freesync is supported. Return if false. If true,
493 * set the corresponding bit in the info packet 493 * set the corresponding bit in the info packet
494 */ 494 */
495 if (!vrr->supported) 495 if (!vrr->supported || !vrr->send_vsif)
496 return; 496 return;
497 497
498 if (dc_is_hdmi_signal(stream->signal)) { 498 if (dc_is_hdmi_signal(stream->signal)) {
@@ -634,6 +634,7 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,
634 return; 634 return;
635 635
636 in_out_vrr->state = in_config->state; 636 in_out_vrr->state = in_config->state;
637 in_out_vrr->send_vsif = in_config->vsif_supported;
637 638
638 if (in_config->state == VRR_STATE_UNSUPPORTED) { 639 if (in_config->state == VRR_STATE_UNSUPPORTED) {
639 in_out_vrr->state = VRR_STATE_UNSUPPORTED; 640 in_out_vrr->state = VRR_STATE_UNSUPPORTED;
diff --git a/drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h b/drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h
index 85c98afe9375..a0f32cde721c 100644
--- a/drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h
+++ b/drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h
@@ -78,6 +78,7 @@ enum mod_vrr_state {
78 78
79struct mod_freesync_config { 79struct mod_freesync_config {
80 enum mod_vrr_state state; 80 enum mod_vrr_state state;
81 bool vsif_supported;
81 bool ramping; 82 bool ramping;
82 bool btr; 83 bool btr;
83 unsigned int min_refresh_in_uhz; 84 unsigned int min_refresh_in_uhz;
@@ -103,6 +104,7 @@ struct mod_vrr_params_fixed_refresh {
103 104
104struct mod_vrr_params { 105struct mod_vrr_params {
105 bool supported; 106 bool supported;
107 bool send_vsif;
106 enum mod_vrr_state state; 108 enum mod_vrr_state state;
107 109
108 uint32_t min_refresh_in_uhz; 110 uint32_t min_refresh_in_uhz;