From cce1a87788eb607e9616fe0d1c04f5da72141068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sun, 24 Sep 2017 14:26:16 +0200 Subject: [PATCH] drm/tinydrm: Use drm_gem_framebuffer_helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use drm_gem_framebuffer_helper directly instead of the cma library wrappers. Signed-off-by: Noralf Trønnes Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-2-git-send-email-noralf@tronnes.org --- drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 3 ++- drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 5 +++-- drivers/gpu/drm/tinydrm/mipi-dbi.c | 5 +++-- drivers/gpu/drm/tinydrm/repaper.c | 5 +++-- drivers/gpu/drm/tinydrm/st7586.c | 5 +++-- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c index 551709e6b114..1a8a57cad431 100644 --- a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -128,7 +129,7 @@ tinydrm_fb_create(struct drm_device *drm, struct drm_file *file_priv, { struct tinydrm_device *tdev = drm->dev_private; - return drm_fb_cma_create_with_funcs(drm, file_priv, mode_cmd, + return drm_gem_fb_create_with_funcs(drm, file_priv, mode_cmd, tdev->fb_funcs); } diff --git a/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c b/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c index 177e9d861001..fc447c9a1a27 100644 --- a/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -144,7 +145,7 @@ EXPORT_SYMBOL(tinydrm_display_pipe_update); * @pipe: Simple display pipe * @plane_state: Plane state * - * This function uses drm_fb_cma_prepare_fb() to check if the plane FB has an + * This function uses drm_gem_fb_prepare_fb() to check if the plane FB has an * dma-buf attached, extracts the exclusive fence and attaches it to plane * state for the atomic helper to wait on. Drivers can use this as their * &drm_simple_display_pipe_funcs->prepare_fb callback. @@ -152,7 +153,7 @@ EXPORT_SYMBOL(tinydrm_display_pipe_update); int tinydrm_display_pipe_prepare_fb(struct drm_simple_display_pipe *pipe, struct drm_plane_state *plane_state) { - return drm_fb_cma_prepare_fb(&pipe->plane, plane_state); + return drm_gem_fb_prepare_fb(&pipe->plane, plane_state); } EXPORT_SYMBOL(tinydrm_display_pipe_prepare_fb); diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c index f0dedc244944..d43e992ab432 100644 --- a/drivers/gpu/drm/tinydrm/mipi-dbi.c +++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c @@ -9,6 +9,7 @@ * (at your option) any later version. */ +#include #include #include #include @@ -253,8 +254,8 @@ out_unlock: } static const struct drm_framebuffer_funcs mipi_dbi_fb_funcs = { - .destroy = drm_fb_cma_destroy, - .create_handle = drm_fb_cma_create_handle, + .destroy = drm_gem_fb_destroy, + .create_handle = drm_gem_fb_create_handle, .dirty = mipi_dbi_fb_dirty, }; diff --git a/drivers/gpu/drm/tinydrm/repaper.c b/drivers/gpu/drm/tinydrm/repaper.c index 5fbe14715c83..340198f5afea 100644 --- a/drivers/gpu/drm/tinydrm/repaper.c +++ b/drivers/gpu/drm/tinydrm/repaper.c @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -636,8 +637,8 @@ out_unlock: } static const struct drm_framebuffer_funcs repaper_fb_funcs = { - .destroy = drm_fb_cma_destroy, - .create_handle = drm_fb_cma_create_handle, + .destroy = drm_gem_fb_destroy, + .create_handle = drm_gem_fb_create_handle, .dirty = repaper_fb_dirty, }; diff --git a/drivers/gpu/drm/tinydrm/st7586.c b/drivers/gpu/drm/tinydrm/st7586.c index 07b4d312784c..da9c0d83045f 100644 --- a/drivers/gpu/drm/tinydrm/st7586.c +++ b/drivers/gpu/drm/tinydrm/st7586.c @@ -17,6 +17,7 @@ #include #include