aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2017-09-24 08:26:16 -0400
committerNoralf Trønnes <noralf@tronnes.org>2017-10-01 10:59:49 -0400
commitcce1a87788eb607e9616fe0d1c04f5da72141068 (patch)
tree16e6885fa4f37a6426aa3130638042ecf299f562
parent320e421ea303b1e53451b2b4cd3ad18cdd043b3b (diff)
drm/tinydrm: Use drm_gem_framebuffer_helper
Use drm_gem_framebuffer_helper directly instead of the cma library wrappers. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-2-git-send-email-noralf@tronnes.org
-rw-r--r--drivers/gpu/drm/tinydrm/core/tinydrm-core.c3
-rw-r--r--drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c5
-rw-r--r--drivers/gpu/drm/tinydrm/mipi-dbi.c5
-rw-r--r--drivers/gpu/drm/tinydrm/repaper.c5
-rw-r--r--drivers/gpu/drm/tinydrm/st7586.c5
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 @@
10#include <drm/drm_atomic.h> 10#include <drm/drm_atomic.h>
11#include <drm/drm_atomic_helper.h> 11#include <drm/drm_atomic_helper.h>
12#include <drm/drm_crtc_helper.h> 12#include <drm/drm_crtc_helper.h>
13#include <drm/drm_gem_framebuffer_helper.h>
13#include <drm/tinydrm/tinydrm.h> 14#include <drm/tinydrm/tinydrm.h>
14#include <linux/device.h> 15#include <linux/device.h>
15#include <linux/dma-buf.h> 16#include <linux/dma-buf.h>
@@ -128,7 +129,7 @@ tinydrm_fb_create(struct drm_device *drm, struct drm_file *file_priv,
128{ 129{
129 struct tinydrm_device *tdev = drm->dev_private; 130 struct tinydrm_device *tdev = drm->dev_private;
130 131
131 return drm_fb_cma_create_with_funcs(drm, file_priv, mode_cmd, 132 return drm_gem_fb_create_with_funcs(drm, file_priv, mode_cmd,
132 tdev->fb_funcs); 133 tdev->fb_funcs);
133} 134}
134 135
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 @@
9 9
10#include <drm/drm_atomic_helper.h> 10#include <drm/drm_atomic_helper.h>
11#include <drm/drm_crtc_helper.h> 11#include <drm/drm_crtc_helper.h>
12#include <drm/drm_gem_framebuffer_helper.h>
12#include <drm/drm_modes.h> 13#include <drm/drm_modes.h>
13#include <drm/tinydrm/tinydrm.h> 14#include <drm/tinydrm/tinydrm.h>
14 15
@@ -144,7 +145,7 @@ EXPORT_SYMBOL(tinydrm_display_pipe_update);
144 * @pipe: Simple display pipe 145 * @pipe: Simple display pipe
145 * @plane_state: Plane state 146 * @plane_state: Plane state
146 * 147 *
147 * This function uses drm_fb_cma_prepare_fb() to check if the plane FB has an 148 * This function uses drm_gem_fb_prepare_fb() to check if the plane FB has an
148 * dma-buf attached, extracts the exclusive fence and attaches it to plane 149 * dma-buf attached, extracts the exclusive fence and attaches it to plane
149 * state for the atomic helper to wait on. Drivers can use this as their 150 * state for the atomic helper to wait on. Drivers can use this as their
150 * &drm_simple_display_pipe_funcs->prepare_fb callback. 151 * &drm_simple_display_pipe_funcs->prepare_fb callback.
@@ -152,7 +153,7 @@ EXPORT_SYMBOL(tinydrm_display_pipe_update);
152int tinydrm_display_pipe_prepare_fb(struct drm_simple_display_pipe *pipe, 153int tinydrm_display_pipe_prepare_fb(struct drm_simple_display_pipe *pipe,
153 struct drm_plane_state *plane_state) 154 struct drm_plane_state *plane_state)
154{ 155{
155 return drm_fb_cma_prepare_fb(&pipe->plane, plane_state); 156 return drm_gem_fb_prepare_fb(&pipe->plane, plane_state);
156} 157}
157EXPORT_SYMBOL(tinydrm_display_pipe_prepare_fb); 158EXPORT_SYMBOL(tinydrm_display_pipe_prepare_fb);
158 159
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 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <drm/drm_gem_framebuffer_helper.h>
12#include <drm/tinydrm/mipi-dbi.h> 13#include <drm/tinydrm/mipi-dbi.h>
13#include <drm/tinydrm/tinydrm-helpers.h> 14#include <drm/tinydrm/tinydrm-helpers.h>
14#include <linux/debugfs.h> 15#include <linux/debugfs.h>
@@ -253,8 +254,8 @@ out_unlock:
253} 254}
254 255
255static const struct drm_framebuffer_funcs mipi_dbi_fb_funcs = { 256static const struct drm_framebuffer_funcs mipi_dbi_fb_funcs = {
256 .destroy = drm_fb_cma_destroy, 257 .destroy = drm_gem_fb_destroy,
257 .create_handle = drm_fb_cma_create_handle, 258 .create_handle = drm_gem_fb_create_handle,
258 .dirty = mipi_dbi_fb_dirty, 259 .dirty = mipi_dbi_fb_dirty,
259}; 260};
260 261
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 @@
26#include <linux/spi/spi.h> 26#include <linux/spi/spi.h>
27#include <linux/thermal.h> 27#include <linux/thermal.h>
28 28
29#include <drm/drm_gem_framebuffer_helper.h>
29#include <drm/tinydrm/tinydrm.h> 30#include <drm/tinydrm/tinydrm.h>
30#include <drm/tinydrm/tinydrm-helpers.h> 31#include <drm/tinydrm/tinydrm-helpers.h>
31 32
@@ -636,8 +637,8 @@ out_unlock:
636} 637}
637 638
638static const struct drm_framebuffer_funcs repaper_fb_funcs = { 639static const struct drm_framebuffer_funcs repaper_fb_funcs = {
639 .destroy = drm_fb_cma_destroy, 640 .destroy = drm_gem_fb_destroy,
640 .create_handle = drm_fb_cma_create_handle, 641 .create_handle = drm_gem_fb_create_handle,
641 .dirty = repaper_fb_dirty, 642 .dirty = repaper_fb_dirty,
642}; 643};
643 644
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 @@
17#include <linux/spi/spi.h> 17#include <linux/spi/spi.h>
18#include <video/mipi_display.h> 18#include <video/mipi_display.h>
19 19
20#include <drm/drm_gem_framebuffer_helper.h>
20#include <drm/tinydrm/mipi-dbi.h> 21#include <drm/tinydrm/mipi-dbi.h>
21#include <drm/tinydrm/tinydrm-helpers.h> 22#include <drm/tinydrm/tinydrm-helpers.h>
22 23
@@ -167,8 +168,8 @@ out_unlock:
167} 168}
168 169
169static const struct drm_framebuffer_funcs st7586_fb_funcs = { 170static const struct drm_framebuffer_funcs st7586_fb_funcs = {
170 .destroy = drm_fb_cma_destroy, 171 .destroy = drm_gem_fb_destroy,
171 .create_handle = drm_fb_cma_create_handle, 172 .create_handle = drm_gem_fb_create_handle,
172 .dirty = st7586_fb_dirty, 173 .dirty = st7586_fb_dirty,
173}; 174};
174 175