From e2b51d9b0960c58a6d598038c167f3edc5112132 Mon Sep 17 00:00:00 2001 From: "Le.Ma" 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 Reviewed-by: Xiaojie Yuan --- 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