aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0631-drm-amd-dal-fix-reset-mode-warning-msg.patch
blob: da97af7f38ca6c7b861971ca24acaa865079e25d (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
49
50
51
From d2a0579cf2cd7889a8bc17117e848f79a5575c47 Mon Sep 17 00:00:00 2001
From: Mykola Lysenko <Mykola.Lysenko@amd.com>
Date: Thu, 3 Mar 2016 17:44:33 -0500
Subject: [PATCH 0631/1110] drm/amd/dal: fix reset mode warning msg

We should call surface programming in case of mode
reset (actual reset or DPMS). Warning was printed
that target is NULL.

Also removed debug prints for buffers prepare/remove,
that occurs on each pageflip and pollutes log

Signed-off-by: Mykola Lysenko <Mykola.Lysenko@amd.com>
Acked-by: Jordan Lazare <Jordan.Lazare@amd.com>
---
 drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
index 3189e87..910f646 100644
--- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
@@ -1430,7 +1430,6 @@ static int dm_plane_helper_prepare_fb(
 
 	afb = to_amdgpu_framebuffer(new_state->fb);
 
-	DRM_DEBUG_KMS("Pin new framebuffer: %p\n", afb);
 	obj = afb->obj;
 	rbo = gem_to_amdgpu_bo(obj);
 	r = amdgpu_bo_reserve(rbo, false);
@@ -1461,7 +1460,6 @@ static void dm_plane_helper_cleanup_fb(
 		return;
 
 	afb = to_amdgpu_framebuffer(old_state->fb);
-	DRM_DEBUG_KMS("Unpin old framebuffer: %p\n", afb);
 	rbo = gem_to_amdgpu_bo(afb->obj);
 	r = amdgpu_bo_reserve(rbo, false);
 	if (unlikely(r)) {
@@ -2273,7 +2271,8 @@ int amdgpu_dm_atomic_commit(
 		struct drm_connector *connector;
 		struct dm_connector_state *dm_state = NULL;
 
-		if (!fb || !crtc || !crtc->state->planes_changed)
+		if (!fb || !crtc || !crtc->state->planes_changed ||
+			!crtc->state->active)
 			continue;
 
 		if (page_flip_needed(
-- 
2.7.4