aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2674-drm-amdkcl-4.12-Kcl-for-get_new_crtc_state-after-sw-.patch
blob: 31cba7efa6c0e291b722bcea7f795590eaf9677a (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
From e2b51d9b0960c58a6d598038c167f3edc5112132 Mon Sep 17 00:00:00 2001
From: "Le.Ma" <Le.Ma@amd.com>
Date: Wed, 29 Nov 2017 14:32:08 +0800
Subject: [PATCH 2674/4131] drm/amdkcl: [4.12] Kcl for get_new_crtc_state after
 sw commit

Change-Id: Ie77703a862e0777656a34967683279e2973ed579
Signed-off-by: Le.Ma <Le.Ma@amd.com>
Reviewed-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

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 5c8e785..f16902b 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4037,7 +4037,11 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 	struct dc_plane_state *plane_states_constructed[MAX_SURFACES];
 	struct amdgpu_crtc *acrtc_attach = to_amdgpu_crtc(pcrtc);
 	struct drm_crtc_state *new_pcrtc_state =
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
+			kcl_drm_atomic_get_new_crtc_state_after_commit(state, pcrtc);
+#else
 			drm_atomic_get_new_crtc_state(state, pcrtc);
+#endif
 	struct dm_crtc_state *acrtc_state = to_dm_crtc_state(new_pcrtc_state);
 	struct dm_atomic_state *dm_state = to_dm_atomic_state(state);
 	int planes_count = 0;
@@ -4064,7 +4068,13 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 		if (!fb || !crtc || pcrtc != crtc)
 			continue;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
+		new_crtc_state =
+			kcl_drm_atomic_get_new_crtc_state_after_commit(
+			state, crtc);
+#else
 		new_crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
+#endif
 		if (!new_crtc_state->active)
 			continue;
 
-- 
2.7.4