blob: c590e1fcdb8a81e735f79b63d80c23345a38143c (
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
|
From 9dcaef2d9a1c63a2500e6cf95be457090c9c8ce1 Mon Sep 17 00:00:00 2001
From: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Date: Wed, 23 Aug 2017 16:54:03 -0400
Subject: [PATCH 2324/4131] drm/amd/display: Use DRM provided page flip flag.
Starting with 4.12 kernel DRM provides page flip flags so we
don't need to have our own copy.
Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++-------
1 file changed, 2 insertions(+), 7 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 7d6f48b..9733646 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4021,7 +4021,7 @@ static void amdgpu_dm_do_flip(
struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(fb);
struct amdgpu_bo *abo = gem_to_amdgpu_bo(afb->obj);
struct amdgpu_device *adev = crtc->dev->dev_private;
- bool async_flip = (acrtc->flip_flags & DRM_MODE_PAGE_FLIP_ASYNC) != 0;
+ bool async_flip = (crtc->state->pageflip_flags & DRM_MODE_PAGE_FLIP_ASYNC) != 0;
struct dc_flip_addrs addr = { {0} };
/* TODO eliminate or rename surface_update */
struct dc_surface_update surface_updates[1] = { {0} };
@@ -4153,7 +4153,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
* TODO Check if it's correct
*/
*wait_for_vblank =
- acrtc_attach->flip_flags & DRM_MODE_PAGE_FLIP_ASYNC ?
+ pcrtc->state->pageflip_flags & DRM_MODE_PAGE_FLIP_ASYNC ?
false : true;
/* TODO: Needs rework for multiplane flip */
@@ -4164,11 +4164,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
crtc,
fb,
drm_crtc_vblank_count(crtc) + *wait_for_vblank);
-
- /*TODO BUG remove ASAP in 4.12 to avoid race between worker and flip IOCTL */
-
- /*clean up the flags for next usage*/
- acrtc_attach->flip_flags = 0;
}
}
--
2.7.4
|