ccd6de065c6c2481cef7482653477c2a71507098
[openwrt/staging/ansuel.git] /
1 From 87df00d6b301f5de54443ac7e3765dce983e8b6a Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Thu, 28 Mar 2019 11:58:51 -0700
4 Subject: [PATCH] drm/vc4: Fix synchronization firmwarekms against GL
5 rendering.
6
7 We would present the framebuffer immediately without waiting for
8 rendering to finish first, resulting in stuttering and flickering as a
9 window was dragged around when the GPU was busy enough to not just win
10 the race.
11
12 Signed-off-by: Eric Anholt <eric@anholt.net>
13 ---
14 drivers/gpu/drm/vc4/vc4_firmware_kms.c | 5 +++--
15 1 file changed, 3 insertions(+), 2 deletions(-)
16
17 --- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
18 +++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
19 @@ -15,6 +15,7 @@
20 */
21
22 #include "drm/drm_atomic_helper.h"
23 +#include "drm/drm_gem_framebuffer_helper.h"
24 #include "drm/drm_plane_helper.h"
25 #include "drm/drm_crtc_helper.h"
26 #include "drm/drm_fourcc.h"
27 @@ -291,7 +292,7 @@ static const struct drm_plane_funcs vc4_
28 };
29
30 static const struct drm_plane_helper_funcs vc4_primary_plane_helper_funcs = {
31 - .prepare_fb = NULL,
32 + .prepare_fb = drm_gem_fb_prepare_fb,
33 .cleanup_fb = NULL,
34 .atomic_check = vc4_plane_atomic_check,
35 .atomic_update = vc4_primary_plane_atomic_update,
36 @@ -299,7 +300,7 @@ static const struct drm_plane_helper_fun
37 };
38
39 static const struct drm_plane_helper_funcs vc4_cursor_plane_helper_funcs = {
40 - .prepare_fb = NULL,
41 + .prepare_fb = drm_gem_fb_prepare_fb,
42 .cleanup_fb = NULL,
43 .atomic_check = vc4_plane_atomic_check,
44 .atomic_update = vc4_cursor_plane_atomic_update,