drm: Add GEM backed framebuffer library
Subsystems (12)
v4 cover drm: Add GEM backed framebuffer library
This adds helpers for drivers that don't subclass drm_framebuffer and are backed by drm_gem_object(s). drm_fb_cma_helper is converted to use the helpers.
Ack's have been trickling in the last month but seem to have stopped now, so these are the ones left plus a new one: tve200
Noralf.
Changes since version 3:
- Added tve200
Changes since version 2:
- Expanded docs (Daniel)
- Add drm_gem_fbdev_fb_create() instead of exporting drm_gem_fb_alloc(). This function is used by drivers/helpers to create a drm_framebuffer for use with fbdev emulation.
- drm_gem_object_put_unlocked() is NULL tolerant (Joe Kniss)
- Rebase tinydrm patch on new st7586 driver
- Rebase arc and pl111 patches on 'drm: make drm_mode_config_func const'
Changes since version 1:
- Pushed the new functions out to the cma drivers, so I could clean up the cma library.
Noralf Trønnes (10):
drm/tinydrm: Use drm_gem_framebuffer_helper drm/fsl-dcu: Use drm_gem_fb_create() drm/hisilicon/kirin: Use drm_gem_fb_create() drm/meson: Use drm_gem_fb_create()
drm/mxsfb: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb() drm/rcar-du: Use drm_gem_fb_create()
drm/shmobile: Use drm_gem_fb_create()
drm/sun4i: Use drm_gem_fb_create()
drm/tve200: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb() drm/fb-cma-helper: Remove unused functions
drivers/gpu/drm/drm_fb_cma_helper.c | 77 +------------------------ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 3 +- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 +- drivers/gpu/drm/meson/meson_drv.c | 3 +- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 5 +- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 3 +- drivers/gpu/drm/shmobile/shmob_drm_kms.c | 3 +- drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 3 +- 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 +- drivers/gpu/drm/tve200/tve200_display.c | 3 +- drivers/gpu/drm/tve200/tve200_drv.c | 3 +- include/drm/drm_fb_cma_helper.h | 13 ----- 16 files changed, 36 insertions(+), 106 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 1/10 drm/tinydrm: Use drm_gem_framebuffer_helper
Use drm_gem_framebuffer_helper directly instead of the cma library wrappers.
--- 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(-)
drivers/gpu/drm/tinydrm/core/tinydrm-core.c +2 -1
@@ -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); }
drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c +3 -2
@@ -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);
drivers/gpu/drm/tinydrm/mipi-dbi.c +3 -2
@@ -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, };
drivers/gpu/drm/tinydrm/repaper.c +3 -2
@@ -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, };
drivers/gpu/drm/tinydrm/st7586.c +3 -2
@@ -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, };
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 2/10 drm/fsl-dcu: Use drm_gem_fb_create()
In reply to Noralf Trønnesdrm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly.
--- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c +2 -1
@@ -13,6 +13,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_fb_cma_helper.h> +#include <drm/drm_gem_framebuffer_helper.h> #include "fsl_dcu_drm_crtc.h" #include "fsl_dcu_drm_drv.h"
@@ -20,7 +21,7 @@static const struct drm_mode_config_funcs fsl_dcu_drm_mode_config_funcs = { .atomic_check = drm_atomic_helper_check, .atomic_commit = drm_atomic_helper_commit, - .fb_create = drm_fb_cma_create, + .fb_create = drm_gem_fb_create, };int fsl_dcu_drm_modeset_init (struct fsl_dcu_drm_device *fsl_dev)
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 3/10 drm/hisilicon/kirin: Use drm_gem_fb_create()
In reply to Noralf Trønnesdrm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly.
--- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +2 -1
@@ -22,6 +22,7 @@#include <drm/drmP.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_atomic_helper.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_of.h>
@@ -56,7 +57,7 @@ static void kirin_fbdev_output_poll_changed(struct drm_device *dev) }static const struct drm_mode_config_funcs kirin_drm_mode_config_funcs = { - .fb_create = drm_fb_cma_create, + .fb_create = drm_gem_fb_create, .output_poll_changed = kirin_fbdev_output_poll_changed, .atomic_check = drm_atomic_helper_check, .atomic_commit = drm_atomic_helper_commit,
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v4 03/10] drm/hisilicon/kirin: Use drm_gem_fb_create()
Quoted 8 lines · Noralf Trønnes
drm_fb_cma_create()is just a wrapper arounddrm_gem_fb_create()now, so use the function directly.Cc Xinliang Liu <[email protected]>Cc Rongrong Zou <[email protected]>Cc Xinwei Kong <[email protected]>Cc Chen Feng <[email protected]>Signed-off-by Noralf Trønnes <[email protected]>
Thanks,
Best,
Xinliang
Quoted 28 lines
--- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +2
-2@@ -22,6 +22,7 @@#include <drm/drmP.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_atomic_helper.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_of.h> @@ -56,7 +57,7 @@ static void kirin_fbdev_output_poll_changed(struct drm_device *dev) }static const struct drm_mode_config_funcs kirin_drm_mode_config_funcs = { - .fb_create = drm_fb_cma_create, + .fb_create = drm_gem_fb_create, .output_poll_changed = kirin_fbdev_output_poll_changed, .atomic_check = drm_atomic_helper_check, .atomic_commit = drm_atomic_helper_commit, --2.7.4
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 4/10 drm/meson: Use drm_gem_fb_create()
In reply to Noralf Trønnesdrm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly.
--- drivers/gpu/drm/meson/meson_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/meson/meson_drv.c +2 -1
@@ -34,6 +34,7 @@#include <drm/drm_crtc_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_fb_cma_helper.h> #include <drm/drm_rect.h> #include <drm/drm_fb_helper.h>
@@ -78,7 +79,7 @@ static const struct drm_mode_config_funcs meson_mode_config_funcs = { .output_poll_changed = meson_fb_output_poll_changed, .atomic_check = drm_atomic_helper_check, .atomic_commit = drm_atomic_helper_commit, - .fb_create = drm_fb_cma_create, + .fb_create = drm_gem_fb_create, };static irqreturn_t meson_irq (int irq,void *arg)
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 5/10 drm/mxsfb: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb()
In reply to Noralf Trønnesdrm_fb_cma_create() and drm_fb_cma_prepare_fb() are just wrappers now, use drm_gem_fb_create() and drm_gem_fb_prepare_fb() directly.
--- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +3 -2
@@ -35,6 +35,7 @@#include <drm/drm_fb_helper.h> #include <drm/drm_fb_cma_helper.h> #include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_of.h> #include <drm/drm_panel.h> #include <drm/drm_simple_kms_helper.h>
@@ -92,7 +93,7 @@ void mxsfb_disable_axi_clk(struct mxsfb_drm_private *mxsfb) }static const struct drm_mode_config_funcs mxsfb_mode_config_funcs = { - .fb_create = drm_fb_cma_create, + .fb_create = drm_gem_fb_create, .atomic_check = drm_atomic_helper_check, .atomic_commit = drm_atomic_helper_commit, };
@@ -127,7 +128,7 @@ static void mxsfb_pipe_update(struct drm_simple_display_pipe *pipe,static int mxsfb_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); }static struct drm_simple_display_pipe_funcs mxsfb_funcs = {
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 6/10 drm/rcar-du: Use drm_gem_fb_create()
In reply to Noralf Trønnesdrm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly.
--- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/rcar-du/rcar_du_kms.c +2 -1
@@ -18,6 +18,7 @@#include <drm/drm_crtc_helper.h> #include <drm/drm_fb_cma_helper.h> #include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_framebuffer_helper.h> #include <linux/of_graph.h> #include <linux/wait.h>
@@ -213,7 +214,7 @@ rcar_du_fb_create(struct drm_device *dev, struct drm_file *file_priv, } } -return drm_fb_cma_create (dev, file_priv, mode_cmd); +return drm_gem_fb_create (dev, file_priv, mode_cmd); }static void rcar_du_output_poll_changed (struct drm_device *dev)
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 7/10 drm/shmobile: Use drm_gem_fb_create()
In reply to Noralf Trønnesdrm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly.
--- drivers/gpu/drm/shmobile/shmob_drm_kms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/shmobile/shmob_drm_kms.c +2 -1
@@ -16,6 +16,7 @@#include <drm/drm_crtc_helper.h> #include <drm/drm_fb_cma_helper.h> #include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_framebuffer_helper.h> #include <video/sh_mobile_meram.h>
@@ -131,7 +132,7 @@ shmob_drm_fb_create(struct drm_device *dev, struct drm_file *file_priv, } } -return drm_fb_cma_create (dev, file_priv, mode_cmd); +return drm_gem_fb_create (dev, file_priv, mode_cmd); }static const struct drm_mode_config_funcs shmob_drm_mode_config_funcs = {
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 8/10 drm/sun4i: Use drm_gem_fb_create()
In reply to Noralf Trønnesdrm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly.
--- drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/sun4i/sun4i_framebuffer.c +2 -1
@@ -12,6 +12,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_fb_cma_helper.h> +#include <drm/drm_gem_framebuffer_helper.h> #include <drm/drmP.h> #include "sun4i_drv.h"
@@ -28,7 +29,7 @@ static const struct drm_mode_config_funcs sun4i_de_mode_config_funcs = { .output_poll_changed = sun4i_de_output_poll_changed, .atomic_check = drm_atomic_helper_check, .atomic_commit = drm_atomic_helper_commit, - .fb_create = drm_fb_cma_create, + .fb_create = drm_gem_fb_create, };struct drm_fbdev_cma *sun4i_framebuffer_init (struct drm_device *drm)
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v4 08/10] drm/sun4i: Use drm_gem_fb_create()
Quoted 5 lines · Noralf Trønnes
drm_fb_cma_create()is just a wrapper arounddrm_gem_fb_create()now, so use the function directly.Cc Maxime Ripard <[email protected]>Signed-off-by Noralf Trønnes <[email protected]>
Thanks!
Maxime
Signature · 3 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 9/10 drm/tve200: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb()
In reply to Noralf Trønnesdrm_fb_cma_create() and drm_fb_cma_prepare_fb() are just wrappers now, use drm_gem_fb_create() and drm_gem_fb_prepare_fb() directly.
--- drivers/gpu/drm/tve200/tve200_display.c | 3 ++- drivers/gpu/drm/tve200/tve200_drv.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/tve200/tve200_display.c +2 -1
@@ -21,6 +21,7 @@#include <drm/drmP.h> #include <drm/drm_panel.h> #include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_fb_cma_helper.h> #include "tve200_drm.h"
@@ -290,7 +291,7 @@ void tve200_disable_vblank(struct drm_device *drm, unsigned int crtc)static int tve200_display_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); }const struct drm_simple_display_pipe_funcs tve200_display_funcs = {
drivers/gpu/drm/tve200/tve200_drv.c +2 -1
@@ -45,6 +45,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_fb_cma_helper.h> #include <drm/drm_panel.h> #include <drm/drm_of.h>
@@ -55,7 +56,7 @@#define DRIVER_DESC "DRM module for Faraday TVE200"static const struct drm_mode_config_funcs mode_config_funcs = { - .fb_create = drm_fb_cma_create, + .fb_create = drm_gem_fb_create, .atomic_check = drm_atomic_helper_check, .atomic_commit = drm_atomic_helper_commit, };
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v4 09/10] drm/tve200: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb()
Quoted 5 lines · Noralf Trønnes
drm_fb_cma_create()anddrm_fb_cma_prepare_fb()are just wrappers now, usedrm_gem_fb_create()anddrm_gem_fb_prepare_fb()directly.Cc Linus Walleij <[email protected]>Signed-off-by Noralf Trønnes <[email protected]>
Yours,
Linus Walleij
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 10/10 drm/fb-cma-helper: Remove unused functions
In reply to Noralf TrønnesThe cma drivers use the drm_gem_framebuffer_helper functions now, so remove drm_fb_cma_destroy, drm_fb_cma_create_handle, drm_fb_cma_create_with_funcs, drm_fb_cma_create and drm_fb_cma_prepare_fb.
--- drivers/gpu/drm/drm_fb_cma_helper.c | 77 ++----------------------------------- include/drm/drm_fb_cma_helper.h | 13 ------- 2 files changed, 3 insertions(+), 87 deletions(-)
drivers/gpu/drm/drm_fb_cma_helper.c +3 -74
@@ -38,7 +38,7 @@ struct drm_fbdev_cma {* Provides helper functions for creating a cma (contiguous memory allocator) * backed framebuffer. * -* drm_fb_cma_create() is used in the &drm_mode_config_funcs.fb_create +* drm_gem_fb_create() is used in the &drm_mode_config_funcs.fb_create * callback function to create a cma backed framebuffer. * * An fbdev framebuffer backed by cma is also available by calling
@@ -61,8 +61,8 @@ struct drm_fbdev_cma {* } * * static struct drm_framebuffer_funcs driver_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 = driver_fb_dirty, * }; *
@@ -80,57 +80,6 @@ static inline struct drm_fbdev_cma *to_fbdev_cma(struct drm_fb_helper *helper) return container_of(helper, struct drm_fbdev_cma, fb_helper); } -void drm_fb_cma_destroy (struct drm_framebuffer *fb) -{ -drm_gem_fb_destroy (fb); -} -EXPORT_SYMBOL (drm_fb_cma_destroy); - -int drm_fb_cma_create_handle (struct drm_framebuffer *fb, -struct drm_file *file_priv,unsigned int *handle) -{ -return drm_gem_fb_create_handle (fb, file_priv, handle); -} -EXPORT_SYMBOL (drm_fb_cma_create_handle); - -/** -* drm_fb_cma_create_with_funcs() - helper function for the -* &drm_mode_config_funcs.fb_create -* callback -* @dev: DRM device -* @file_priv: drm file for the ioctl call -* @mode_cmd: metadata from the userspace fb creation request -* @funcs: vtable to be used for the new framebuffer object -* -* This can be used to set &drm_framebuffer_funcs for drivers that need the -* &drm_framebuffer_funcs.dirty callback. Use drm_fb_cma_create() if you don't -* need to change &drm_framebuffer_funcs. -*/ -struct drm_framebuffer *drm_fb_cma_create_with_funcs (struct drm_device *dev, -struct drm_file *file_priv,const struct drm_mode_fb_cmd2 *mode_cmd, -const struct drm_framebuffer_funcs *funcs) -{ -return drm_gem_fb_create_with_funcs (dev, file_priv, mode_cmd, funcs); -} -EXPORT_SYMBOL_GPL (drm_fb_cma_create_with_funcs); - -/** -* drm_fb_cma_create() - &drm_mode_config_funcs.fb_create callback function -* @dev: DRM device -* @file_priv: drm file for the ioctl call -* @mode_cmd: metadata from the userspace fb creation request -* -* If your hardware has special alignment or pitch requirements these should be -* checked before calling this function. Use drm_fb_cma_create_with_funcs() if -* you need to set &drm_framebuffer_funcs.dirty. -*/ -struct drm_framebuffer *drm_fb_cma_create (struct drm_device *dev, -struct drm_file *file_priv,const struct drm_mode_fb_cmd2 *mode_cmd) -{ -return drm_gem_fb_create (dev, file_priv, mode_cmd); -} -EXPORT_SYMBOL_GPL (drm_fb_cma_create); -/** * drm_fb_cma_get_gem_obj() - Get CMA GEM object for framebuffer * @fb: The framebuffer
@@ -181,26 +130,6 @@ dma_addr_t drm_fb_cma_get_gem_addr(struct drm_framebuffer *fb, }EXPORT_SYMBOL_GPL (drm_fb_cma_get_gem_addr); -/** -* drm_fb_cma_prepare_fb() - Prepare CMA framebuffer -* @plane: Which plane -* @state: Plane state attach fence to -* -* This should be set as the &struct drm_plane_helper_funcs.prepare_fb hook. -* -* This function checks 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. -* -* There is no need for cleanup_fb for CMA based framebuffer drivers. -*/ -int drm_fb_cma_prepare_fb (struct drm_plane *plane, -struct drm_plane_state *state) -{ -return drm_gem_fb_prepare_fb (plane, state); -} -EXPORT_SYMBOL_GPL (drm_fb_cma_prepare_fb); -#ifdef CONFIG_DEBUG_FS static void drm_fb_cma_describe (struct drm_framebuffer *fb,struct seq_file *m) {
include/drm/drm_fb_cma_helper.h +0 -13
@@ -28,16 +28,6 @@ void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, bool state);void drm_fbdev_cma_set_suspend_unlocked (struct drm_fbdev_cma *fbdev_cma,bool state); -void drm_fb_cma_destroy (struct drm_framebuffer *fb); -int drm_fb_cma_create_handle (struct drm_framebuffer *fb, -struct drm_file *file_priv,unsigned int *handle); - -struct drm_framebuffer *drm_fb_cma_create_with_funcs (struct drm_device *dev, -struct drm_file *file_priv,const struct drm_mode_fb_cmd2 *mode_cmd, -const struct drm_framebuffer_funcs *funcs); -struct drm_framebuffer *drm_fb_cma_create (struct drm_device *dev, -struct drm_file *file_priv,const struct drm_mode_fb_cmd2 *mode_cmd); -struct drm_gem_cma_object *drm_fb_cma_get_gem_obj (struct drm_framebuffer *fb,unsigned int plane);
@@ -45,9 +35,6 @@ dma_addr_t drm_fb_cma_get_gem_addr(struct drm_framebuffer *fb,struct drm_plane_state *state, unsigned int plane); -int drm_fb_cma_prepare_fb (struct drm_plane *plane, -struct drm_plane_state *state); -#ifdef CONFIG_DEBUG_FS struct seq_file ;
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v4 10/10] drm/fb-cma-helper: Remove unused functions
Quoted 7 lines · Noralf Trønnes
The cma drivers use the
drm_gem_framebuffer_helperfunctions now, so removedrm_fb_cma_destroy,drm_fb_cma_create_handle,drm_fb_cma_create_with_funcs,drm_fb_cma_createanddrm_fb_cma_prepare_fb.Signed-off-by Noralf Trønnes <[email protected]>Reviewed-by Eric Anholt <[email protected]>
Yours,
Linus Walleij
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Noralf Trønnes
This adds helpers for drivers that don't subclass
drm_framebufferand are backed bydrm_gem_object(s).drm_fb_cma_helperis converted to use the helpers.Ack's have been trickling in the last month but seem to have stopped now, so these are the ones left plus a new one: tve200
This series is:
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Den 25.09.2017 18.25, skrev Eric Anholt:
Quoted 11 lines
Quoted 6 lines · Noralf Trønnes
This adds helpers for drivers that don't subclass
drm_framebufferand are backed bydrm_gem_object(s).drm_fb_cma_helperis converted to use the helpers.Ack's have been trickling in the last month but seem to have stopped now, so these are the ones left plus a new one: tve200
This series is:
Reviewed-by Eric Anholt <[email protected]>
Thanks! Series applied to drm-misc.
Noralf.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel