blob: 53c6cd9c7454d739a5a66d7ce21402e147a57dd9 (
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
52
53
54
55
|
From a224027d85c9182cef09bf0fa14ad15ff1898249 Mon Sep 17 00:00:00 2001
From: David Francis <David.Francis@amd.com>
Date: Wed, 6 Feb 2019 14:01:29 -0500
Subject: [PATCH 1534/2940] drm/amd/display: Allow pflips from a framebuffer to
itself
[Why]
IGT expects that pageflips can be triggered with the same
framebuffer before and after the commit
[How]
Expand the definition of pageflip to include any change
with an old framebuffer and a new framebuffer, even if they're
the same
Change-Id: I66399124224d23b225039da99619de14ff34f6e0
Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
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 710d9dd18abc..330b68ccc95e 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4819,7 +4819,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
struct drm_crtc_state *new_crtc_state;
struct drm_framebuffer *fb = new_plane_state->fb;
struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(fb);
- bool framebuffer_changed;
+ bool plane_needs_flip;
struct dc_plane_state *dc_plane;
struct dm_plane_state *dm_new_plane_state = to_dm_plane_state(new_plane_state);
@@ -4836,12 +4836,11 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
dc_plane = dm_new_plane_state->dc_state;
- framebuffer_changed = old_plane_state->fb &&
- old_plane_state->fb != new_plane_state->fb;
+ plane_needs_flip = old_plane_state->fb && new_plane_state->fb;
- pflip_present = pflip_present || framebuffer_changed;
+ pflip_present = pflip_present || plane_needs_flip;
- if (framebuffer_changed) {
+ if (plane_needs_flip) {
/*
* TODO This might fail and hence better not used, wait
* explicitly on fences instead
--
2.17.1
|