drm/meson: Add implicit fencing support for primary and overlay planes
authorKoen Kooi <koen@dominion.thruhere.net>
Mon, 19 Nov 2018 10:02:39 +0000 (11:02 +0100)
committerNeil Armstrong <narmstrong@baylibre.com>
Wed, 21 Nov 2018 11:20:53 +0000 (12:20 +0100)
Suggested by Qiang Yu <yuq825@gmail.com> to fix tearing artefacts in the
Kodi GUI.

Suggested-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
[narmstrong: added Suggested-by tag]
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1542621759-26413-1-git-send-email-koen@dominion.thruhere.net
drivers/gpu/drm/meson/meson_overlay.c
drivers/gpu/drm/meson/meson_plane.c

index 9aebc5e4b418a924f5ed2844c734dd592f4651d1..691a9fd16b3664c0028d9e9359988d915a54cb21 100644 (file)
@@ -16,6 +16,7 @@
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_fb_cma_helper.h>
+#include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_rect.h>
 
 #include "meson_overlay.h"
@@ -532,6 +533,7 @@ static const struct drm_plane_helper_funcs meson_overlay_helper_funcs = {
        .atomic_check   = meson_overlay_atomic_check,
        .atomic_disable = meson_overlay_atomic_disable,
        .atomic_update  = meson_overlay_atomic_update,
+       .prepare_fb     = drm_gem_fb_prepare_fb,
 };
 
 static const struct drm_plane_funcs meson_overlay_funcs = {
index 12a47b4f65a533eee9210b571738a41248ed357e..8ee2cf9e47cdc020dfbdbe978725c38645874c0f 100644 (file)
@@ -32,6 +32,7 @@
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_fb_cma_helper.h>
+#include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_rect.h>
 
 #include "meson_plane.h"
@@ -322,6 +323,7 @@ static const struct drm_plane_helper_funcs meson_plane_helper_funcs = {
        .atomic_check   = meson_plane_atomic_check,
        .atomic_disable = meson_plane_atomic_disable,
        .atomic_update  = meson_plane_atomic_update,
+       .prepare_fb     = drm_gem_fb_prepare_fb,
 };
 
 static const struct drm_plane_funcs meson_plane_funcs = {