aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1087-drm-amdgpu-Do-not-ref-count-on-validation-set.patch
blob: 8e1fdb87aee1d31d9e82d40326fbea2970b3ddb3 (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
From c0a04cc1658aea0d02c6a12cca45e67232daef1e Mon Sep 17 00:00:00 2001
From: "Leo (Sunpeng) Li" <sunpeng.li@amd.com>
Date: Wed, 22 Nov 2017 11:05:00 -0500
Subject: [PATCH 1087/4131] drm/amdgpu: Do not ref-count on validation set

The validation set is only alive for the duration of
amdgpu_dm_atomic_check. Since modifications of the set are done through
an interface, and only atomic_check calls those interfaces, we do not
need to manage ref-counting on it.

The case of another owner freeing a stream state -- and therefore freeing
a reference that the validation set has -- won't happen. The set tracks
the old stream states, which will not be released during atomic_check.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 -
 1 file changed, 1 deletion(-)

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 51d06df..0d95190 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4713,7 +4713,6 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,
                 old_acrtc_state = to_dm_crtc_state(crtc->state);
 
                 if (old_acrtc_state->stream) {
-                        dc_stream_retain(old_acrtc_state->stream);
                         set[set_count].stream = old_acrtc_state->stream;
                         ++set_count;
                 }
-- 
2.7.4