aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2561-drm-amd-display-Do-not-set-bandwidth-on-page-flips.patch
blob: 697e9fc42f96608e3ebbdff85ae9f14f3fa88a74 (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
From ea010bb352184f98686ce98f497635ec06dfc46b Mon Sep 17 00:00:00 2001
From: "Leo (Sunpeng) Li" <sunpeng.li@amd.com>
Date: Wed, 4 Oct 2017 12:47:13 -0400
Subject: [PATCH 2561/4131] drm/amd/display: Do not set bandwidth on page
 flips.

Which removes a lockdep warning for a possible deadlock situation:

While holding the drm event mutex (hard irq safe),
dc_post_update_surfaces_to_stream eventually acquires the atom context
lock, which is hard irq unsafe. We should only be calling it on full
updates anyways.

Also remove a redundant call to dc_post_update_surfaces_to_stream,
dc_commit_updates_for_stream already calls it.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 6b017d0..a324835 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -980,8 +980,6 @@ bool dc_commit_planes_to_stream(
 			new_plane_count,
 			dc_stream, stream_update, plane_states, state);
 
-	dc_post_update_surfaces_to_stream(dc);
-
 	kfree(stream_update);
 	return true;
 }
@@ -1418,7 +1416,8 @@ void dc_commit_updates_for_stream(struct dc *dc,
 				update_type,
 				context);
 
-	dc_post_update_surfaces_to_stream(dc);
+	if (update_type >= UPDATE_TYPE_FULL)
+		dc_post_update_surfaces_to_stream(dc);
 
 	if (dc->current_state != context) {
 
-- 
2.7.4