aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/0120-drm-amd-display-add-config-for-sending-VSIF.patch
blob: 6389f195b9874129f896b27dc7455fc2116da442 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
From c05543b50511005dcf8799167382c148248672aa Mon Sep 17 00:00:00 2001
From: Anthony Koo <Anthony.Koo@amd.com>
Date: Tue, 8 May 2018 17:09:49 -0400
Subject: [PATCH 0120/2940] 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>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c       | 1 +
 drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 3 ++-
 drivers/gpu/drm/amd/display/modules/inc/mod_freesync.h  | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

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 478077cc466e..fcaa4a625427 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4815,6 +4815,7 @@ void set_freesync_on_stream(struct amdgpu_display_manager *dm,
 				aconnector->min_vfreq * 1000000;
 		config.max_refresh_in_uhz =
 				aconnector->max_vfreq * 1000000;
+		config.vsif_supported = true;
 	}
 
 	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,
 	/* Check if Freesync is supported. Return if false. If true,
 	 * set the corresponding bit in the info packet
 	 */
-	if (!vrr->supported)
+	if (!vrr->supported || !vrr->send_vsif)
 		return;
 
 	if (dc_is_hdmi_signal(stream->signal)) {
@@ -634,6 +634,7 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,
 		return;
 
 	in_out_vrr->state = in_config->state;
+	in_out_vrr->send_vsif = in_config->vsif_supported;
 
 	if (in_config->state == VRR_STATE_UNSUPPORTED) {
 		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 {
 
 struct mod_freesync_config {
 	enum mod_vrr_state state;
+	bool vsif_supported;
 	bool ramping;
 	bool btr;
 	unsigned int min_refresh_in_uhz;
@@ -103,6 +104,7 @@ struct mod_vrr_params_fixed_refresh {
 
 struct mod_vrr_params {
 	bool supported;
+	bool send_vsif;
 	enum mod_vrr_state state;
 
 	uint32_t min_refresh_in_uhz;
-- 
2.17.1