aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0765-drm-amd-dal-only-poll-for-ACT-when-needed.patch
blob: 23a9f4b02dc820a0c0f8e5fc962879c7e2359684 (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
From 7157a789df9f56b32ee4591bb6a07f4740d2c662 Mon Sep 17 00:00:00 2001
From: Mykola Lysenko <Mykola.Lysenko@amd.com>
Date: Wed, 3 Feb 2016 17:09:35 -0500
Subject: [PATCH 0765/1110] drm/amd/dal: only poll for ACT when needed

Should not poll for ACT change state when nothing
changed actually, because ACT will not change

Signed-off-by: Mykola Lysenko <Mykola.Lysenko@amd.com>
Acked-by: Jordan Lazare <Jordan.Lazare@amd.com>
---
 drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c
index 71fa7b1..2a92cfd 100644
--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c
@@ -753,6 +753,8 @@ static enum dc_status apply_single_controller_ctx_to_hw(uint8_t controller_idx,
 {
 	struct core_stream *stream =
 			context->res_ctx.controller_ctx[controller_idx].stream;
+	struct core_stream *old_stream =
+		dc->current_context.res_ctx.controller_ctx[controller_idx].stream;
 	struct output_pixel_processor *opp =
 		context->res_ctx.pool.opps[controller_idx];
 	bool timing_changed = context->res_ctx.controller_ctx[controller_idx]
@@ -765,7 +767,13 @@ static enum dc_status apply_single_controller_ctx_to_hw(uint8_t controller_idx,
 		 */
 		stream->tg->funcs->set_blank(stream->tg, true);
 
-		core_link_disable_stream(stream->sink->link, stream);
+		/*
+		 * only disable stream in case it was ever enabled
+		 */
+		if (old_stream)
+			core_link_disable_stream(
+				old_stream->sink->link,
+				old_stream);
 
 		/*TODO: AUTO check if timing changed*/
 		if (false == stream->clock_source->funcs->program_pix_clk(
-- 
2.7.4