Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/sun4i: wait on implicit fence before display

Render like lima will attach a fence to the framebuffer
dma_buf, display like sun4i should wait it finish before
show the framebuffer. Otherwise tearing will be observed.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20181122014417.23285-1-yuq825@gmail.com

authored by

Qiang Yu and committed by
Daniel Vetter
7b24eec7 c6fdea6e

+6
+2
drivers/gpu/drm/sun4i/sun4i_layer.c
··· 12 12 13 13 #include <drm/drm_atomic_helper.h> 14 14 #include <drm/drm_plane_helper.h> 15 + #include <drm/drm_gem_framebuffer_helper.h> 15 16 #include <drm/drmP.h> 16 17 17 18 #include "sun4i_backend.h" ··· 113 112 } 114 113 115 114 static const struct drm_plane_helper_funcs sun4i_backend_layer_helper_funcs = { 115 + .prepare_fb = drm_gem_fb_prepare_fb, 116 116 .atomic_disable = sun4i_backend_layer_atomic_disable, 117 117 .atomic_update = sun4i_backend_layer_atomic_update, 118 118 };
+2
drivers/gpu/drm/sun4i/sun8i_ui_layer.c
··· 19 19 #include <drm/drm_crtc_helper.h> 20 20 #include <drm/drm_fb_cma_helper.h> 21 21 #include <drm/drm_gem_cma_helper.h> 22 + #include <drm/drm_gem_framebuffer_helper.h> 22 23 #include <drm/drm_plane_helper.h> 23 24 #include <drm/drmP.h> 24 25 ··· 301 300 } 302 301 303 302 static struct drm_plane_helper_funcs sun8i_ui_layer_helper_funcs = { 303 + .prepare_fb = drm_gem_fb_prepare_fb, 304 304 .atomic_check = sun8i_ui_layer_atomic_check, 305 305 .atomic_disable = sun8i_ui_layer_atomic_disable, 306 306 .atomic_update = sun8i_ui_layer_atomic_update,
+2
drivers/gpu/drm/sun4i/sun8i_vi_layer.c
··· 13 13 #include <drm/drm_crtc_helper.h> 14 14 #include <drm/drm_fb_cma_helper.h> 15 15 #include <drm/drm_gem_cma_helper.h> 16 + #include <drm/drm_gem_framebuffer_helper.h> 16 17 #include <drm/drm_plane_helper.h> 17 18 #include <drm/drmP.h> 18 19 ··· 337 336 } 338 337 339 338 static struct drm_plane_helper_funcs sun8i_vi_layer_helper_funcs = { 339 + .prepare_fb = drm_gem_fb_prepare_fb, 340 340 .atomic_check = sun8i_vi_layer_atomic_check, 341 341 .atomic_disable = sun8i_vi_layer_atomic_disable, 342 342 .atomic_update = sun8i_vi_layer_atomic_update,