From: Tony Cheng <tony.cheng@amd.com>
Date: Tue, 6 Dec 2016 21:22:17 -0500
Subject: drm/amd/display: avoid apply_clk_constraints for address update
Git-commit: f4c07f88cc30e77d2431b5bcf95a05e0ee6f3482
Patch-mainline: v4.15-rc1
References: FATE#326289 FATE#326079 FATE#326049 FATE#322398 FATE#326166
- dc_update_surfaces_for_target get called in ISR but apply_clk_constraints allocates memory
Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1336,6 +1336,7 @@ void dc_update_surfaces_for_target(struc
int i, j;
bool is_new_pipe_surface[MAX_PIPES];
const struct dc_surface *new_surfaces[MAX_SURFACES] = { 0 };
+ bool need_apply_clk_constraints = false;
update_surface_trace(dc, updates, surface_count);
@@ -1405,6 +1406,7 @@ void dc_update_surfaces_for_target(struc
if (updates[i].plane_info || updates[i].scaling_info
|| is_new_pipe_surface[j]) {
+ need_apply_clk_constraints = true;
if (updates[i].plane_info) {
surface->public.color_space =