All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Noralf Trønnes" <noralf@tronnes.org>
To: dri-devel@lists.freedesktop.org
Cc: marex@denx.de, alison.wang@freescale.com,
	puck.chen@hisilicon.com, narmstrong@baylibre.com,
	z.liuxinliang@hisilicon.com, kong.kongxinwei@hisilicon.com,
	laurent.pinchart@ideasonboard.com, daniel.vetter@ffwll.ch,
	zourongrong@gmail.com, maxime.ripard@free-electrons.com
Subject: [PATCH v4 01/10] drm/tinydrm: Use drm_gem_framebuffer_helper
Date: Sun, 24 Sep 2017 14:26:16 +0200	[thread overview]
Message-ID: <1506255985-61113-2-git-send-email-noralf@tronnes.org> (raw)
In-Reply-To: <1506255985-61113-1-git-send-email-noralf@tronnes.org>

Use drm_gem_framebuffer_helper directly instead of the cma
library wrappers.

Signed-off-by: Noralf Trønnes <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 551709e..1a8a57c 100644
--- a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c
+++ b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c
@@ -10,6 +10,7 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/tinydrm/tinydrm.h>
 #include <linux/device.h>
 #include <linux/dma-buf.h>
@@ -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 177e9d8..fc447c9 100644
--- a/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c
+++ b/drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c
@@ -9,6 +9,7 @@
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_modes.h>
 #include <drm/tinydrm/tinydrm.h>
 
@@ -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 f0dedc2..d43e992 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 <drm/drm_gem_framebuffer_helper.h>
 #include <drm/tinydrm/mipi-dbi.h>
 #include <drm/tinydrm/tinydrm-helpers.h>
 #include <linux/debugfs.h>
@@ -253,8 +254,8 @@ static int mipi_dbi_fb_dirty(struct drm_framebuffer *fb,
 }
 
 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 5fbe147..340198f 100644
--- a/drivers/gpu/drm/tinydrm/repaper.c
+++ b/drivers/gpu/drm/tinydrm/repaper.c
@@ -26,6 +26,7 @@
 #include <linux/spi/spi.h>
 #include <linux/thermal.h>
 
+#include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/tinydrm/tinydrm.h>
 #include <drm/tinydrm/tinydrm-helpers.h>
 
@@ -636,8 +637,8 @@ static int repaper_fb_dirty(struct drm_framebuffer *fb,
 }
 
 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 07b4d31..da9c0d8 100644
--- a/drivers/gpu/drm/tinydrm/st7586.c
+++ b/drivers/gpu/drm/tinydrm/st7586.c
@@ -17,6 +17,7 @@
 #include <linux/spi/spi.h>
 #include <video/mipi_display.h>
 
+#include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/tinydrm/mipi-dbi.h>
 #include <drm/tinydrm/tinydrm-helpers.h>
 
@@ -167,8 +168,8 @@ static int st7586_fb_dirty(struct drm_framebuffer *fb,
 }
 
 static const struct drm_framebuffer_funcs st7586_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		= st7586_fb_dirty,
 };
 
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-09-24 12:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-24 12:26 [PATCH v4 00/10] drm: Add GEM backed framebuffer library Noralf Trønnes
2017-09-24 12:26 ` Noralf Trønnes [this message]
2017-09-24 12:26 ` [PATCH v4 02/10] drm/fsl-dcu: Use drm_gem_fb_create() Noralf Trønnes
2017-09-24 12:26 ` [PATCH v4 03/10] drm/hisilicon/kirin: " Noralf Trønnes
2017-09-28  3:12   ` Xinliang Liu
2017-09-24 12:26 ` [PATCH v4 04/10] drm/meson: " Noralf Trønnes
2017-09-24 12:26 ` [PATCH v4 05/10] drm/mxsfb: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb() Noralf Trønnes
2017-09-24 12:26 ` [PATCH v4 06/10] drm/rcar-du: Use drm_gem_fb_create() Noralf Trønnes
2017-09-24 12:26 ` [PATCH v4 07/10] drm/shmobile: " Noralf Trønnes
2017-09-24 12:26 ` [PATCH v4 08/10] drm/sun4i: " Noralf Trønnes
2017-09-24 19:22   ` Maxime Ripard
2017-09-24 12:26 ` [PATCH v4 09/10] drm/tve200: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb() Noralf Trønnes
2017-09-25 15:37   ` Linus Walleij
2017-09-24 12:26 ` [PATCH v4 10/10] drm/fb-cma-helper: Remove unused functions Noralf Trønnes
2017-09-25 15:43   ` Linus Walleij
2017-09-25 16:25 ` [PATCH v4 00/10] drm: Add GEM backed framebuffer library Eric Anholt
2017-10-01 15:13   ` Noralf Trønnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506255985-61113-2-git-send-email-noralf@tronnes.org \
    --to=noralf@tronnes.org \
    --cc=alison.wang@freescale.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=marex@denx.de \
    --cc=maxime.ripard@free-electrons.com \
    --cc=narmstrong@baylibre.com \
    --cc=puck.chen@hisilicon.com \
    --cc=z.liuxinliang@hisilicon.com \
    --cc=zourongrong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.