linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation
@ 2023-03-01 15:30 Thomas Zimmermann
  2023-03-01 15:30 ` [PATCH 01/22] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers Thomas Zimmermann
                   ` (22 more replies)
  0 siblings, 23 replies; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Add fbdev emulation that is optimized for DMA helpers, as used by most
drivers. It operates directly on GEM DMA buffers in system memory.
Memory pages are mmap'ed directly to userspace. No implicit shadow
buffers need to be allocated; as can happen with the generic fbdev
emulation. Convert drivers that fulfil the requirements.

Tested with fbcon and IGT on vc4.

Future direction: providing a dedicated fbdev emulation for GEM DMA
helpers will allow us to remove this case from the generic fbdev code.
The latter can then be simplified.

Thomas Zimmermann (22):
  drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers
  arm/hdlcd: Use GEM DMA fbdev emulation
  arm/malidp: Use GEM DMA fbdev emulation
  drm/aspeed: Use GEM DMA fbdev emulation
  drm/atmel-hlcdc: Use GEM DMA fbdev emulation
  drm/fsl-dcu: Use GEM DMA fbdev emulation
  drm/imx/dcss: Use GEM DMA fbdev emulation
  drm/imx: Use GEM DMA fbdev emulation
  drm/kmb: Use GEM DMA fbdev emulation
  drm/logicvc: Use GEM DMA fbdev emulation
  drm/meson: Use GEM DMA fbdev emulation
  drm/mxsfb/lcdif: Use GEM DMA fbdev emulation
  drm/mxsfb: Use GEM DMA fbdev emulation
  drm/sti: Use GEM DMA fbdev emulation
  drm/stm: Use GEM DMA fbdev emulation
  drm/sun4i: Use GEM DMA fbdev emulation
  drm/tidss: Use GEM DMA fbdev emulation
  drm/tilcdc: Use GEM DMA fbdev emulation
  drm/arcpgu: Use GEM DMA fbdev emulation
  drm/tve200: Use GEM DMA fbdev emulation
  drm/vc4: Use GEM DMA fbdev emulation
  drm/xlnx: Use GEM DMA fbdev emulation

 drivers/gpu/drm/Makefile                     |   1 +
 drivers/gpu/drm/arm/hdlcd_drv.c              |   4 +-
 drivers/gpu/drm/arm/malidp_drv.c             |   4 +-
 drivers/gpu/drm/aspeed/aspeed_gfx_drv.c      |   4 +-
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c |   4 +-
 drivers/gpu/drm/drm_fbdev_dma.c              | 275 +++++++++++++++++++
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c    |   4 +-
 drivers/gpu/drm/imx/dcss/dcss-kms.c          |   4 +-
 drivers/gpu/drm/imx/ipuv3/imx-drm-core.c     |   4 +-
 drivers/gpu/drm/kmb/kmb_drv.c                |   4 +-
 drivers/gpu/drm/logicvc/logicvc_drm.c        |   4 +-
 drivers/gpu/drm/meson/meson_drv.c            |   4 +-
 drivers/gpu/drm/mxsfb/lcdif_drv.c            |   4 +-
 drivers/gpu/drm/mxsfb/mxsfb_drv.c            |   4 +-
 drivers/gpu/drm/sti/sti_drv.c                |   4 +-
 drivers/gpu/drm/stm/drv.c                    |   4 +-
 drivers/gpu/drm/sun4i/sun4i_drv.c            |   4 +-
 drivers/gpu/drm/tidss/tidss_drv.c            |   4 +-
 drivers/gpu/drm/tilcdc/tilcdc_drv.c          |   4 +-
 drivers/gpu/drm/tiny/arcpgu.c                |   4 +-
 drivers/gpu/drm/tve200/tve200_drv.c          |   4 +-
 drivers/gpu/drm/vc4/vc4_drv.c                |   4 +-
 drivers/gpu/drm/xlnx/zynqmp_kms.c            |   4 +-
 include/drm/drm_fbdev_dma.h                  |  15 +
 24 files changed, 333 insertions(+), 42 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_fbdev_dma.c
 create mode 100644 include/drm/drm_fbdev_dma.h


base-commit: 734cd918122f6ec06e4c9366fb3283b29b1c7ea5
prerequisite-patch-id: 0aa359f6144c4015c140c8a6750be19099c676fb
prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
prerequisite-patch-id: 3f204510fcbf9530d6540bd8e6128cce598988b6
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* [PATCH 01/22] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:04   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 02/22] arm/hdlcd: Use GEM DMA fbdev emulation Thomas Zimmermann
                   ` (21 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Implement fbdev emulation that is optimized for drivers that use
DMA helpers. The buffers may no tbe moveable, may not require damage
handling and have to be located in system memory. This allows fbdev
emulation to operate directly on the buffer and mmap it to userspace.

Besides those constraints, the emulation works like in the generic
code. As an internal DRM client provides, it receives hotplug, restore
and unregister events. The DRM client is independent from the fbdev
probing, which runs on the first successful hotplug event.

The emulation is part of the DMA helper module and not build unless
DMA helpers and fbdev emulation has been configured.

Tested with vc4.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/Makefile        |   1 +
 drivers/gpu/drm/drm_fbdev_dma.c | 275 ++++++++++++++++++++++++++++++++
 include/drm/drm_fbdev_dma.h     |  15 ++
 3 files changed, 291 insertions(+)
 create mode 100644 drivers/gpu/drm/drm_fbdev_dma.c
 create mode 100644 include/drm/drm_fbdev_dma.h

diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index ab4460fcd63f..0d53d0c265f8 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -82,6 +82,7 @@ obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o
 obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o
 
 drm_dma_helper-y := drm_gem_dma_helper.o
+drm_dma_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_dma.o
 drm_dma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_dma_helper.o
 obj-$(CONFIG_DRM_GEM_DMA_HELPER) += drm_dma_helper.o
 
diff --git a/drivers/gpu/drm/drm_fbdev_dma.c b/drivers/gpu/drm/drm_fbdev_dma.c
new file mode 100644
index 000000000000..cf553ac12a0f
--- /dev/null
+++ b/drivers/gpu/drm/drm_fbdev_dma.c
@@ -0,0 +1,275 @@
+// SPDX-License-Identifier: MIT
+
+#include <drm/drm_crtc_helper.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_fb_helper.h>
+#include <drm/drm_framebuffer.h>
+#include <drm/drm_gem_dma_helper.h>
+
+#include <drm/drm_fbdev_dma.h>
+
+/*
+ * struct fb_ops
+ */
+
+static int drm_fbdev_dma_fb_open(struct fb_info *info, int user)
+{
+	struct drm_fb_helper *fb_helper = info->par;
+
+	/* No need to take a ref for fbcon because it unbinds on unregister */
+	if (user && !try_module_get(fb_helper->dev->driver->fops->owner))
+		return -ENODEV;
+
+	return 0;
+}
+
+static int drm_fbdev_dma_fb_release(struct fb_info *info, int user)
+{
+	struct drm_fb_helper *fb_helper = info->par;
+
+	if (user)
+		module_put(fb_helper->dev->driver->fops->owner);
+
+	return 0;
+}
+
+static void drm_fbdev_dma_fb_destroy(struct fb_info *info)
+{
+	struct drm_fb_helper *fb_helper = info->par;
+
+	if (!fb_helper->dev)
+		return;
+
+	drm_fb_helper_fini(fb_helper);
+
+	drm_client_buffer_vunmap(fb_helper->buffer);
+	drm_client_framebuffer_delete(fb_helper->buffer);
+	drm_client_release(&fb_helper->client);
+	drm_fb_helper_unprepare(fb_helper);
+	kfree(fb_helper);
+}
+
+static int drm_fbdev_dma_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
+{
+	struct drm_fb_helper *fb_helper = info->par;
+	struct drm_device *dev = fb_helper->dev;
+
+	if (drm_WARN_ON_ONCE(dev, !fb_helper->dev->driver->gem_prime_mmap))
+		return -ENODEV;
+
+	return fb_helper->dev->driver->gem_prime_mmap(fb_helper->buffer->gem, vma);
+}
+
+static const struct fb_ops drm_fbdev_dma_fb_ops = {
+	.owner = THIS_MODULE,
+	.fb_open = drm_fbdev_dma_fb_open,
+	.fb_release = drm_fbdev_dma_fb_release,
+	.fb_read = drm_fb_helper_sys_read,
+	.fb_write = drm_fb_helper_sys_write,
+	DRM_FB_HELPER_DEFAULT_OPS,
+	.fb_fillrect = drm_fb_helper_sys_fillrect,
+	.fb_copyarea = drm_fb_helper_sys_copyarea,
+	.fb_imageblit = drm_fb_helper_sys_imageblit,
+	.fb_destroy = drm_fbdev_dma_fb_destroy,
+	.fb_mmap = drm_fbdev_dma_fb_mmap,
+};
+
+/*
+ * struct drm_fb_helper
+ */
+
+static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper,
+					 struct drm_fb_helper_surface_size *sizes)
+{
+	struct drm_client_dev *client = &fb_helper->client;
+	struct drm_device *dev = fb_helper->dev;
+	struct drm_client_buffer *buffer;
+	struct drm_gem_dma_object *dma_obj;
+	struct drm_framebuffer *fb;
+	struct fb_info *info;
+	u32 format;
+	struct iosys_map map;
+	int ret;
+
+	drm_dbg_kms(dev, "surface width(%d), height(%d) and bpp(%d)\n",
+		    sizes->surface_width, sizes->surface_height,
+		    sizes->surface_bpp);
+
+	format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth);
+	buffer = drm_client_framebuffer_create(client, sizes->surface_width,
+					       sizes->surface_height, format);
+	if (IS_ERR(buffer))
+		return PTR_ERR(buffer);
+	dma_obj = to_drm_gem_dma_obj(buffer->gem);
+
+	fb = buffer->fb;
+	if (drm_WARN_ON(dev, fb->funcs->dirty)) {
+		ret = -ENODEV; /* damage handling not supported; use generic emulation */
+		goto err_drm_client_buffer_delete;
+	}
+
+	ret = drm_client_buffer_vmap(buffer, &map);
+	if (ret) {
+		goto err_drm_client_buffer_delete;
+	} else if (drm_WARN_ON(dev, map.is_iomem)) {
+		ret = -ENODEV; /* I/O memory not supported; use generic emulation */
+		goto err_drm_client_buffer_delete;
+	}
+
+	fb_helper->buffer = buffer;
+	fb_helper->fb = buffer->fb;
+
+	info = drm_fb_helper_alloc_info(fb_helper);
+	if (IS_ERR(info)) {
+		ret = PTR_ERR(info);
+		goto err_drm_client_buffer_vunmap;
+	}
+
+	drm_fb_helper_fill_info(info, fb_helper, sizes);
+
+	info->fbops = &drm_fbdev_dma_fb_ops;
+	info->flags = FBINFO_DEFAULT;
+
+	/* screen */
+	info->flags |= FBINFO_VIRTFB; /* system memory */
+	if (dma_obj->map_noncoherent)
+		info->flags |= FBINFO_READS_FAST; /* signal caching */
+	info->screen_size = sizes->surface_height * fb->pitches[0];
+	info->screen_buffer = map.vaddr;
+	info->fix.smem_len = info->screen_size;
+
+#if IS_ENABLED(CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM)
+	/*
+	 * Shamelessly leak the physical address to user-space.
+	 */
+	if (fb_helper->hint_leak_smem_start && !info->fix.smem_start)
+		info->fix.smem_start = page_to_phys(virt_to_page(info->screen_buffer));
+#endif
+
+	return 0;
+
+err_drm_client_buffer_vunmap:
+	fb_helper->fb = NULL;
+	fb_helper->buffer = NULL;
+	drm_client_buffer_vunmap(buffer);
+err_drm_client_buffer_delete:
+	drm_client_framebuffer_delete(buffer);
+	return ret;
+}
+
+static const struct drm_fb_helper_funcs drm_fbdev_dma_helper_funcs = {
+	.fb_probe = drm_fbdev_dma_helper_fb_probe,
+};
+
+/*
+ * struct drm_client_funcs
+ */
+
+static void drm_fbdev_dma_client_unregister(struct drm_client_dev *client)
+{
+	struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
+
+	if (fb_helper->info) {
+		drm_fb_helper_unregister_info(fb_helper);
+	} else {
+		drm_client_release(&fb_helper->client);
+		drm_fb_helper_unprepare(fb_helper);
+		kfree(fb_helper);
+	}
+}
+
+static int drm_fbdev_dma_client_restore(struct drm_client_dev *client)
+{
+	drm_fb_helper_lastclose(client->dev);
+
+	return 0;
+}
+
+static int drm_fbdev_dma_client_hotplug(struct drm_client_dev *client)
+{
+	struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
+	struct drm_device *dev = client->dev;
+	int ret;
+
+	if (dev->fb_helper)
+		return drm_fb_helper_hotplug_event(dev->fb_helper);
+
+	ret = drm_fb_helper_init(dev, fb_helper);
+	if (ret)
+		goto err_drm_err;
+
+	if (!drm_drv_uses_atomic_modeset(dev))
+		drm_helper_disable_unused_functions(dev);
+
+	ret = drm_fb_helper_initial_config(fb_helper);
+	if (ret)
+		goto err_drm_fb_helper_fini;
+
+	return 0;
+
+err_drm_fb_helper_fini:
+	drm_fb_helper_fini(fb_helper);
+err_drm_err:
+	drm_err(dev, "fbdev-dma: Failed to setup generic emulation (ret=%d)\n", ret);
+	return ret;
+}
+
+static const struct drm_client_funcs drm_fbdev_dma_client_funcs = {
+	.owner		= THIS_MODULE,
+	.unregister	= drm_fbdev_dma_client_unregister,
+	.restore	= drm_fbdev_dma_client_restore,
+	.hotplug	= drm_fbdev_dma_client_hotplug,
+};
+
+/**
+ * drm_fbdev_dma_setup() - Setup fbdev emulation for GEM DMA helpers
+ * @dev: DRM device
+ * @preferred_bpp: Preferred bits per pixel for the device.
+ *                 @dev->mode_config.preferred_depth is used if this is zero.
+ *
+ * This function sets up fbdev emulation for GEM DMA drivers that support
+ * dumb buffers with a virtual address and that can be mmap'ed.
+ * drm_fbdev_dma_setup() shall be called after the DRM driver registered
+ * the new DRM device with drm_dev_register().
+ *
+ * Restore, hotplug events and teardown are all taken care of. Drivers that do
+ * suspend/resume need to call drm_fb_helper_set_suspend_unlocked() themselves.
+ * Simple drivers might use drm_mode_config_helper_suspend().
+ *
+ * This function is safe to call even when there are no connectors present.
+ * Setup will be retried on the next hotplug event.
+ *
+ * The fbdev is destroyed by drm_dev_unregister().
+ */
+void drm_fbdev_dma_setup(struct drm_device *dev, unsigned int preferred_bpp)
+{
+	struct drm_fb_helper *fb_helper;
+	int ret;
+
+	drm_WARN(dev, !dev->registered, "Device has not been registered.\n");
+	drm_WARN(dev, dev->fb_helper, "fb_helper is already set!\n");
+
+	fb_helper = kzalloc(sizeof(*fb_helper), GFP_KERNEL);
+	if (!fb_helper)
+		return;
+	drm_fb_helper_prepare(dev, fb_helper, preferred_bpp, &drm_fbdev_dma_helper_funcs);
+
+	ret = drm_client_init(dev, &fb_helper->client, "fbdev", &drm_fbdev_dma_client_funcs);
+	if (ret) {
+		drm_err(dev, "Failed to register client: %d\n", ret);
+		goto err_drm_client_init;
+	}
+
+	ret = drm_fbdev_dma_client_hotplug(&fb_helper->client);
+	if (ret)
+		drm_dbg_kms(dev, "client hotplug ret=%d\n", ret);
+
+	drm_client_register(&fb_helper->client);
+
+	return;
+
+err_drm_client_init:
+	drm_fb_helper_unprepare(fb_helper);
+	kfree(fb_helper);
+}
+EXPORT_SYMBOL(drm_fbdev_dma_setup);
diff --git a/include/drm/drm_fbdev_dma.h b/include/drm/drm_fbdev_dma.h
new file mode 100644
index 000000000000..2da7ee784133
--- /dev/null
+++ b/include/drm/drm_fbdev_dma.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: MIT */
+
+#ifndef DRM_FBDEV_DMA_H
+#define DRM_FBDEV_DMA_H
+
+struct drm_device;
+
+#ifdef CONFIG_DRM_FBDEV_EMULATION
+void drm_fbdev_dma_setup(struct drm_device *dev, unsigned int preferred_bpp);
+#else
+static inline void drm_fbdev_dma_setup(struct drm_device *dev, unsigned int preferred_bpp)
+{ }
+#endif
+
+#endif
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 02/22] arm/hdlcd: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
  2023-03-01 15:30 ` [PATCH 01/22] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:17   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 03/22] arm/malidp: " Thomas Zimmermann
                   ` (20 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/arm/hdlcd_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
index e3507dd6f82a..a554c79dcd39 100644
--- a/drivers/gpu/drm/arm/hdlcd_drv.c
+++ b/drivers/gpu/drm/arm/hdlcd_drv.c
@@ -26,7 +26,7 @@
 #include <drm/drm_crtc.h>
 #include <drm/drm_debugfs.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_modeset_helper.h>
@@ -301,7 +301,7 @@ static int hdlcd_drm_bind(struct device *dev)
 	if (ret)
 		goto err_register;
 
-	drm_fbdev_generic_setup(drm, 32);
+	drm_fbdev_dma_setup(drm, 32);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 03/22] arm/malidp: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
  2023-03-01 15:30 ` [PATCH 01/22] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers Thomas Zimmermann
  2023-03-01 15:30 ` [PATCH 02/22] arm/hdlcd: Use GEM DMA fbdev emulation Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:18   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 04/22] drm/aspeed: " Thomas Zimmermann
                   ` (19 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/arm/malidp_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
index cf040e2e9efe..0597e6ad56e7 100644
--- a/drivers/gpu/drm/arm/malidp_drv.c
+++ b/drivers/gpu/drm/arm/malidp_drv.c
@@ -19,7 +19,7 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_fourcc.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
@@ -852,7 +852,7 @@ static int malidp_bind(struct device *dev)
 	if (ret)
 		goto register_fail;
 
-	drm_fbdev_generic_setup(drm, 32);
+	drm_fbdev_dma_setup(drm, 32);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 04/22] drm/aspeed: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (2 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 03/22] arm/malidp: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:20   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 05/22] drm/atmel-hlcdc: " Thomas Zimmermann
                   ` (18 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
index ecfb060d2557..c8c7f8215155 100644
--- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
+++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
@@ -15,7 +15,7 @@
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_device.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_module.h>
@@ -341,7 +341,7 @@ static int aspeed_gfx_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_unload;
 
-	drm_fbdev_generic_setup(&priv->drm, 32);
+	drm_fbdev_dma_setup(&priv->drm, 32);
 	return 0;
 
 err_unload:
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 05/22] drm/atmel-hlcdc: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (3 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 04/22] drm/aspeed: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-02 19:47   ` Sam Ravnborg
  2023-03-09 11:20   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 06/22] drm/fsl-dcu: " Thomas Zimmermann
                   ` (17 subsequent siblings)
  22 siblings, 2 replies; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
index 4e806b06d35d..29603561d501 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
@@ -19,7 +19,7 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_module.h>
@@ -760,7 +760,7 @@ static int atmel_hlcdc_dc_drm_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_unload;
 
-	drm_fbdev_generic_setup(ddev, 24);
+	drm_fbdev_dma_setup(ddev, 24);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 06/22] drm/fsl-dcu: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (4 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 05/22] drm/atmel-hlcdc: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:20   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 07/22] drm/imx/dcss: " Thomas Zimmermann
                   ` (16 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
index 8579c7629f5e..c09ba019ba5e 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
@@ -20,7 +20,7 @@
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_modeset_helper.h>
 #include <drm/drm_module.h>
@@ -333,7 +333,7 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev)
 	if (ret < 0)
 		goto put;
 
-	drm_fbdev_generic_setup(drm, legacyfb_depth);
+	drm_fbdev_dma_setup(drm, legacyfb_depth);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 07/22] drm/imx/dcss: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (5 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 06/22] drm/fsl-dcu: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:20   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 08/22] drm/imx: " Thomas Zimmermann
                   ` (15 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/imx/dcss/dcss-kms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.c b/drivers/gpu/drm/imx/dcss/dcss-kms.c
index dab5e664920d..896de946f8df 100644
--- a/drivers/gpu/drm/imx/dcss/dcss-kms.c
+++ b/drivers/gpu/drm/imx/dcss/dcss-kms.c
@@ -7,7 +7,7 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_bridge_connector.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_of.h>
@@ -145,7 +145,7 @@ struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss)
 	if (ret)
 		goto cleanup_crtc;
 
-	drm_fbdev_generic_setup(drm, 32);
+	drm_fbdev_dma_setup(drm, 32);
 
 	return kms;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 08/22] drm/imx: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (6 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 07/22] drm/imx/dcss: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:21   ` Javier Martinez Canillas
  2023-03-09 11:22   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 09/22] drm/kmb: " Thomas Zimmermann
                   ` (14 subsequent siblings)
  22 siblings, 2 replies; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/imx/ipuv3/imx-drm-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c b/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c
index e060fa6cbcb9..4a866ac60fff 100644
--- a/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c
+++ b/drivers/gpu/drm/imx/ipuv3/imx-drm-core.c
@@ -16,7 +16,7 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_managed.h>
@@ -249,7 +249,7 @@ static int imx_drm_bind(struct device *dev)
 	if (ret)
 		goto err_poll_fini;
 
-	drm_fbdev_generic_setup(drm, legacyfb_depth);
+	drm_fbdev_dma_setup(drm, legacyfb_depth);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 09/22] drm/kmb: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (7 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 08/22] drm/imx: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-06 17:18   ` Chrisanthus, Anitha
  2023-03-09 11:21   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 10/22] drm/logicvc: " Thomas Zimmermann
                   ` (13 subsequent siblings)
  22 siblings, 2 replies; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/kmb/kmb_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/kmb/kmb_drv.c b/drivers/gpu/drm/kmb/kmb_drv.c
index d29c678f6c91..24035b53441c 100644
--- a/drivers/gpu/drm/kmb/kmb_drv.c
+++ b/drivers/gpu/drm/kmb/kmb_drv.c
@@ -15,7 +15,7 @@
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_module.h>
@@ -562,7 +562,7 @@ static int kmb_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_register;
 
-	drm_fbdev_generic_setup(&kmb->drm, 0);
+	drm_fbdev_dma_setup(&kmb->drm, 0);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 10/22] drm/logicvc: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (8 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 09/22] drm/kmb: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:23   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 11/22] drm/meson: " Thomas Zimmermann
                   ` (12 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/logicvc/logicvc_drm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/logicvc/logicvc_drm.c b/drivers/gpu/drm/logicvc/logicvc_drm.c
index 2fb23697740a..c35c453fd025 100644
--- a/drivers/gpu/drm/logicvc/logicvc_drm.c
+++ b/drivers/gpu/drm/logicvc/logicvc_drm.c
@@ -17,7 +17,7 @@
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_print.h>
 
@@ -449,7 +449,7 @@ static int logicvc_drm_probe(struct platform_device *pdev)
 		preferred_bpp = 32;
 		break;
 	}
-	drm_fbdev_generic_setup(drm_dev, preferred_bpp);
+	drm_fbdev_dma_setup(drm_dev, preferred_bpp);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 11/22] drm/meson: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (9 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 10/22] drm/logicvc: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-04 21:53   ` Martin Blumenstingl
  2023-03-09 11:22   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 12/22] drm/mxsfb/lcdif: " Thomas Zimmermann
                   ` (11 subsequent siblings)
  22 siblings, 2 replies; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/meson/meson_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
index 79bfe3938d3c..6608a251106b 100644
--- a/drivers/gpu/drm/meson/meson_drv.c
+++ b/drivers/gpu/drm/meson/meson_drv.c
@@ -18,7 +18,7 @@
 #include <drm/drm_aperture.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_modeset_helper_vtables.h>
@@ -353,7 +353,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
 	if (ret)
 		goto uninstall_irq;
 
-	drm_fbdev_generic_setup(drm, 32);
+	drm_fbdev_dma_setup(drm, 32);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 12/22] drm/mxsfb/lcdif: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (10 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 11/22] drm/meson: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:24   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 13/22] drm/mxsfb: " Thomas Zimmermann
                   ` (10 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/mxsfb/lcdif_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.c b/drivers/gpu/drm/mxsfb/lcdif_drv.c
index cc2ceb301b96..6fb5b469ee5a 100644
--- a/drivers/gpu/drm/mxsfb/lcdif_drv.c
+++ b/drivers/gpu/drm/mxsfb/lcdif_drv.c
@@ -16,7 +16,7 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_bridge.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_mode_config.h>
@@ -220,7 +220,7 @@ static int lcdif_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_unload;
 
-	drm_fbdev_generic_setup(drm, 32);
+	drm_fbdev_dma_setup(drm, 32);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 13/22] drm/mxsfb: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (11 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 12/22] drm/mxsfb/lcdif: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:25   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 14/22] drm/sti: " Thomas Zimmermann
                   ` (9 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index b3ab86ad1b36..368b1fbd8305 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -20,7 +20,7 @@
 #include <drm/drm_bridge.h>
 #include <drm/drm_connector.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_fourcc.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
@@ -365,7 +365,7 @@ static int mxsfb_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_unload;
 
-	drm_fbdev_generic_setup(drm, 32);
+	drm_fbdev_dma_setup(drm, 32);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 14/22] drm/sti: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (12 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 13/22] drm/mxsfb: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:26   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 15/22] drm/stm: " Thomas Zimmermann
                   ` (8 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/sti/sti_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
index ef6a4e63198f..1b87b5899f9e 100644
--- a/drivers/gpu/drm/sti/sti_drv.c
+++ b/drivers/gpu/drm/sti/sti_drv.c
@@ -14,7 +14,7 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_debugfs.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_of.h>
@@ -199,7 +199,7 @@ static int sti_bind(struct device *dev)
 
 	drm_mode_config_reset(ddev);
 
-	drm_fbdev_generic_setup(ddev, 32);
+	drm_fbdev_dma_setup(ddev, 32);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 15/22] drm/stm: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (13 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 14/22] drm/sti: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:26   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 16/22] drm/sun4i: " Thomas Zimmermann
                   ` (7 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/stm/drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c
index 50410bd99dfe..422220df7d8c 100644
--- a/drivers/gpu/drm/stm/drv.c
+++ b/drivers/gpu/drm/stm/drv.c
@@ -18,7 +18,7 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_module.h>
@@ -203,7 +203,7 @@ static int stm_drm_platform_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_put;
 
-	drm_fbdev_generic_setup(ddev, 16);
+	drm_fbdev_dma_setup(ddev, 16);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 16/22] drm/sun4i: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (14 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 15/22] drm/stm: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:26   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 17/22] drm/tidss: " Thomas Zimmermann
                   ` (6 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/sun4i/sun4i_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index cc94efbbf2d4..dd283a3a4e36 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -17,7 +17,7 @@
 #include <drm/drm_aperture.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_module.h>
 #include <drm/drm_of.h>
@@ -111,7 +111,7 @@ static int sun4i_drv_bind(struct device *dev)
 	if (ret)
 		goto finish_poll;
 
-	drm_fbdev_generic_setup(drm, 32);
+	drm_fbdev_dma_setup(drm, 32);
 
 	dev_set_drvdata(dev, drm);
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 17/22] drm/tidss: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (15 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 16/22] drm/sun4i: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:27   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 18/22] drm/tilcdc: " Thomas Zimmermann
                   ` (5 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/tidss/tidss_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c
index 2dac8727d2f4..3f5f27fb6ebc 100644
--- a/drivers/gpu/drm/tidss/tidss_drv.c
+++ b/drivers/gpu/drm/tidss/tidss_drv.c
@@ -13,7 +13,7 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_managed.h>
 #include <drm/drm_module.h>
@@ -179,7 +179,7 @@ static int tidss_probe(struct platform_device *pdev)
 		goto err_irq_uninstall;
 	}
 
-	drm_fbdev_generic_setup(ddev, 32);
+	drm_fbdev_dma_setup(ddev, 32);
 
 	dev_dbg(dev, "%s done\n", __func__);
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 18/22] drm/tilcdc: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (16 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 17/22] drm/tidss: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:27   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 19/22] drm/arcpgu: " Thomas Zimmermann
                   ` (4 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 4ca426007dc8..fe56beea3e93 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -16,7 +16,7 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_debugfs.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_fourcc.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
@@ -384,7 +384,7 @@ static int tilcdc_init(const struct drm_driver *ddrv, struct device *dev)
 		goto init_failed;
 	priv->is_registered = true;
 
-	drm_fbdev_generic_setup(ddev, bpp);
+	drm_fbdev_dma_setup(ddev, bpp);
 	return 0;
 
 init_failed:
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 19/22] drm/arcpgu: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (17 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 18/22] drm/tilcdc: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-09 11:28   ` Javier Martinez Canillas
  2023-03-01 15:30 ` [PATCH 20/22] drm/tve200: " Thomas Zimmermann
                   ` (3 subsequent siblings)
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/tiny/arcpgu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tiny/arcpgu.c b/drivers/gpu/drm/tiny/arcpgu.c
index 611bbee15071..e5b10e41554a 100644
--- a/drivers/gpu/drm/tiny/arcpgu.c
+++ b/drivers/gpu/drm/tiny/arcpgu.c
@@ -12,7 +12,7 @@
 #include <drm/drm_drv.h>
 #include <drm/drm_edid.h>
 #include <drm/drm_fb_dma_helper.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_fourcc.h>
 #include <drm/drm_framebuffer.h>
 #include <drm/drm_gem_dma_helper.h>
@@ -394,7 +394,7 @@ static int arcpgu_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_unload;
 
-	drm_fbdev_generic_setup(&arcpgu->drm, 16);
+	drm_fbdev_dma_setup(&arcpgu->drm, 16);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 20/22] drm/tve200: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (18 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 19/22] drm/arcpgu: " Thomas Zimmermann
@ 2023-03-01 15:30 ` Thomas Zimmermann
  2023-03-06 22:19   ` Linus Walleij
  2023-03-09 11:28   ` Javier Martinez Canillas
  2023-03-01 15:31 ` [PATCH 21/22] drm/vc4: " Thomas Zimmermann
                   ` (2 subsequent siblings)
  22 siblings, 2 replies; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:30 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/tve200/tve200_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c
index 0d05c386d303..abd557332b28 100644
--- a/drivers/gpu/drm/tve200/tve200_drv.c
+++ b/drivers/gpu/drm/tve200/tve200_drv.c
@@ -40,7 +40,7 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_bridge.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_module.h>
@@ -227,7 +227,7 @@ static int tve200_probe(struct platform_device *pdev)
 	 * Passing in 16 here will make the RGB565 mode the default
 	 * Passing in 32 will use XRGB8888 mode
 	 */
-	drm_fbdev_generic_setup(drm, 16);
+	drm_fbdev_dma_setup(drm, 16);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 21/22] drm/vc4: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (19 preceding siblings ...)
  2023-03-01 15:30 ` [PATCH 20/22] drm/tve200: " Thomas Zimmermann
@ 2023-03-01 15:31 ` Thomas Zimmermann
  2023-03-09 11:28   ` Javier Martinez Canillas
  2023-03-01 15:31 ` [PATCH 22/22] drm/xlnx: " Thomas Zimmermann
  2023-03-06 22:19 ` [PATCH 00/22] drm/dma-helper: Add dedicated " Linus Walleij
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:31 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/vc4/vc4_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index 0ccaee57fe9a..c8bf954042e0 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -33,7 +33,7 @@
 #include <drm/drm_aperture.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_vblank.h>
 
 #include <soc/bcm2835/raspberrypi-firmware.h>
@@ -387,7 +387,7 @@ static int vc4_drm_bind(struct device *dev)
 	if (ret < 0)
 		goto unbind_all;
 
-	drm_fbdev_generic_setup(drm, 16);
+	drm_fbdev_dma_setup(drm, 16);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 22/22] drm/xlnx: Use GEM DMA fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (20 preceding siblings ...)
  2023-03-01 15:31 ` [PATCH 21/22] drm/vc4: " Thomas Zimmermann
@ 2023-03-01 15:31 ` Thomas Zimmermann
  2023-03-09 11:29   ` Javier Martinez Canillas
  2023-03-06 22:19 ` [PATCH 00/22] drm/dma-helper: Add dedicated " Linus Walleij
  22 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-01 15:31 UTC (permalink / raw)
  To: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/xlnx/zynqmp_kms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xlnx/zynqmp_kms.c b/drivers/gpu/drm/xlnx/zynqmp_kms.c
index 776ef5480206..a7f8611be6f4 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_kms.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_kms.c
@@ -19,7 +19,7 @@
 #include <drm/drm_device.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_encoder.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
 #include <drm/drm_fourcc.h>
 #include <drm/drm_framebuffer.h>
 #include <drm/drm_gem_dma_helper.h>
@@ -515,7 +515,7 @@ int zynqmp_dpsub_drm_init(struct zynqmp_dpsub *dpsub)
 		goto err_poll_fini;
 
 	/* Initialize fbdev generic emulation. */
-	drm_fbdev_generic_setup(drm, 24);
+	drm_fbdev_dma_setup(drm, 24);
 
 	return 0;
 
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 55+ messages in thread

* Re: [PATCH 05/22] drm/atmel-hlcdc: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 05/22] drm/atmel-hlcdc: " Thomas Zimmermann
@ 2023-03-02 19:47   ` Sam Ravnborg
  2023-03-09 11:20   ` Javier Martinez Canillas
  1 sibling, 0 replies; 55+ messages in thread
From: Sam Ravnborg @ 2023-03-02 19:47 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	linus.walleij, hyun.kwon, laurent.pinchart, linux-aspeed,
	dri-devel, linux-stm32, linux-amlogic, linux-sunxi,
	linux-arm-kernel

On Wed, Mar 01, 2023 at 04:30:44PM +0100, Thomas Zimmermann wrote:
> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> index 4e806b06d35d..29603561d501 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> @@ -19,7 +19,7 @@
>  #include <drm/drm_atomic.h>
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_drv.h>
> -#include <drm/drm_fbdev_generic.h>
> +#include <drm/drm_fbdev_dma.h>
>  #include <drm/drm_gem_dma_helper.h>
>  #include <drm/drm_gem_framebuffer_helper.h>
>  #include <drm/drm_module.h>
> @@ -760,7 +760,7 @@ static int atmel_hlcdc_dc_drm_probe(struct platform_device *pdev)
>  	if (ret)
>  		goto err_unload;
>  
> -	drm_fbdev_generic_setup(ddev, 24);
> +	drm_fbdev_dma_setup(ddev, 24);
>  
>  	return 0;
>  
> -- 
> 2.39.2

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 11/22] drm/meson: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 11/22] drm/meson: " Thomas Zimmermann
@ 2023-03-04 21:53   ` Martin Blumenstingl
  2023-03-09 11:22   ` Javier Martinez Canillas
  1 sibling, 0 replies; 55+ messages in thread
From: Martin Blumenstingl @ 2023-03-04 21:53 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, alain.volmat, yannick.fertre, raphael.gallais-pou,
	philippe.cornu, mcoquelin.stm32, alexandre.torgue, jernej.skrabec,
	samuel, jyri.sarha, tomba, linus.walleij, hyun.kwon,
	laurent.pinchart, dri-devel, linux-aspeed, linux-arm-kernel,
	linux-amlogic, linux-stm32, linux-sunxi

On Wed, Mar 1, 2023 at 4:31 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* RE: [PATCH 09/22] drm/kmb: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 09/22] drm/kmb: " Thomas Zimmermann
@ 2023-03-06 17:18   ` Chrisanthus, Anitha
  2023-03-09 11:21   ` Javier Martinez Canillas
  1 sibling, 0 replies; 55+ messages in thread
From: Chrisanthus, Anitha @ 2023-03-06 17:18 UTC (permalink / raw)
  To: Thomas Zimmermann, javierm@redhat.com,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	airlied@gmail.com, daniel@ffwll.ch, andrew@aj.id.au,
	laurentiu.palcu@oss.nxp.com, l.stach@pengutronix.de,
	shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
	p.zabel@pengutronix.de, edmund.j.dea@intel.com,
	khilman@baylibre.com, jbrunet@baylibre.com,
	martin.blumenstingl@googlemail.com, alain.volmat@foss.st.com,
	yannick.fertre@foss.st.com, raphael.gallais-pou@foss.st.com,
	philippe.cornu@foss.st.com, mcoquelin.stm32@gmail.com,
	alexandre.torgue@foss.st.com, jernej.skrabec@gmail.com,
	samuel@sholland.org, jyri.sarha@iki.fi, tomba@kernel.org,
	linus.walleij@linaro.org, hyun.kwon@xilinx.com,
	laurent.pinchart@ideasonboard.com
  Cc: dri-devel@lists.freedesktop.org, linux-aspeed@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-sunxi@lists.linux.dev

Acked-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>

> -----Original Message-----
> From: Thomas Zimmermann <tzimmermann@suse.de>
> Sent: Wednesday, March 1, 2023 7:31 AM
> To: javierm@redhat.com; maarten.lankhorst@linux.intel.com;
> mripard@kernel.org; airlied@gmail.com; daniel@ffwll.ch; andrew@aj.id.au;
> laurentiu.palcu@oss.nxp.com; l.stach@pengutronix.de;
> shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de;
> festevam@gmail.com; linux-imx@nxp.com; p.zabel@pengutronix.de;
> Chrisanthus, Anitha <anitha.chrisanthus@intel.com>;
> edmund.j.dea@intel.com; khilman@baylibre.com; jbrunet@baylibre.com;
> martin.blumenstingl@googlemail.com; alain.volmat@foss.st.com;
> yannick.fertre@foss.st.com; raphael.gallais-pou@foss.st.com;
> philippe.cornu@foss.st.com; mcoquelin.stm32@gmail.com;
> alexandre.torgue@foss.st.com; jernej.skrabec@gmail.com;
> samuel@sholland.org; jyri.sarha@iki.fi; tomba@kernel.org;
> linus.walleij@linaro.org; hyun.kwon@xilinx.com;
> laurent.pinchart@ideasonboard.com
> Cc: dri-devel@lists.freedesktop.org; linux-aspeed@lists.ozlabs.org; linux-arm-
> kernel@lists.infradead.org; linux-amlogic@lists.infradead.org; linux-
> stm32@st-md-mailman.stormreply.com; linux-sunxi@lists.linux.dev; Thomas
> Zimmermann <tzimmermann@suse.de>
> Subject: [PATCH 09/22] drm/kmb: Use GEM DMA fbdev emulation
> 
> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/gpu/drm/kmb/kmb_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/kmb/kmb_drv.c
> b/drivers/gpu/drm/kmb/kmb_drv.c
> index d29c678f6c91..24035b53441c 100644
> --- a/drivers/gpu/drm/kmb/kmb_drv.c
> +++ b/drivers/gpu/drm/kmb/kmb_drv.c
> @@ -15,7 +15,7 @@
> 
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_drv.h>
> -#include <drm/drm_fbdev_generic.h>
> +#include <drm/drm_fbdev_dma.h>
>  #include <drm/drm_gem_dma_helper.h>
>  #include <drm/drm_gem_framebuffer_helper.h>
>  #include <drm/drm_module.h>
> @@ -562,7 +562,7 @@ static int kmb_probe(struct platform_device *pdev)
>  	if (ret)
>  		goto err_register;
> 
> -	drm_fbdev_generic_setup(&kmb->drm, 0);
> +	drm_fbdev_dma_setup(&kmb->drm, 0);
> 
>  	return 0;
> 
> --
> 2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 20/22] drm/tve200: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 20/22] drm/tve200: " Thomas Zimmermann
@ 2023-03-06 22:19   ` Linus Walleij
  2023-03-09 11:28   ` Javier Martinez Canillas
  1 sibling, 0 replies; 55+ messages in thread
From: Linus Walleij @ 2023-03-06 22:19 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	hyun.kwon, laurent.pinchart, dri-devel, linux-aspeed,
	linux-arm-kernel, linux-amlogic, linux-stm32, linux-sunxi

On Wed, Mar 1, 2023 at 4:31 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>

That sounds neat:
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation
  2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
                   ` (21 preceding siblings ...)
  2023-03-01 15:31 ` [PATCH 22/22] drm/xlnx: " Thomas Zimmermann
@ 2023-03-06 22:19 ` Linus Walleij
  2023-03-07  8:55   ` Thomas Zimmermann
  22 siblings, 1 reply; 55+ messages in thread
From: Linus Walleij @ 2023-03-06 22:19 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	hyun.kwon, laurent.pinchart, dri-devel, linux-aspeed,
	linux-arm-kernel, linux-amlogic, linux-stm32, linux-sunxi

On Wed, Mar 1, 2023 at 4:31 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:

> Add fbdev emulation that is optimized for DMA helpers, as used by most
> drivers. It operates directly on GEM DMA buffers in system memory.
> Memory pages are mmap'ed directly to userspace. No implicit shadow
> buffers need to be allocated; as can happen with the generic fbdev
> emulation. Convert drivers that fulfil the requirements.
>
> Tested with fbcon and IGT on vc4.
>
> Future direction: providing a dedicated fbdev emulation for GEM DMA
> helpers will allow us to remove this case from the generic fbdev code.
> The latter can then be simplified.

1) I love your work.

2) Why isn't this DRM driver changed?
drivers/gpu/drm/mcde/mcde_drv.c
AFAICT it also uses GEM buffers in system memory.

3) This one:
drivers/gpu/drm/pl111/pl111_drv.c
is also very similar, but can sometimes use a dedicated
RAM memory for allocations using CMA, does that make
it not a candidate?

They aren't much different in how they work from the TVE200.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation
  2023-03-06 22:19 ` [PATCH 00/22] drm/dma-helper: Add dedicated " Linus Walleij
@ 2023-03-07  8:55   ` Thomas Zimmermann
  2023-03-09  8:17     ` Linus Walleij
  0 siblings, 1 reply; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-07  8:55 UTC (permalink / raw)
  To: Linus Walleij
  Cc: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	hyun.kwon, laurent.pinchart, dri-devel, linux-aspeed,
	linux-arm-kernel, linux-amlogic, linux-stm32, linux-sunxi


[-- Attachment #1.1.1: Type: text/plain, Size: 2015 bytes --]

Hi

Am 06.03.23 um 23:19 schrieb Linus Walleij:
> On Wed, Mar 1, 2023 at 4:31 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
> 
>> Add fbdev emulation that is optimized for DMA helpers, as used by most
>> drivers. It operates directly on GEM DMA buffers in system memory.
>> Memory pages are mmap'ed directly to userspace. No implicit shadow
>> buffers need to be allocated; as can happen with the generic fbdev
>> emulation. Convert drivers that fulfil the requirements.
>>
>> Tested with fbcon and IGT on vc4.
>>
>> Future direction: providing a dedicated fbdev emulation for GEM DMA
>> helpers will allow us to remove this case from the generic fbdev code.
>> The latter can then be simplified.
> 
> 1) I love your work.

Thank you. :)

> 
> 2) Why isn't this DRM driver changed?
> drivers/gpu/drm/mcde/mcde_drv.c
> AFAICT it also uses GEM buffers in system memory.

This driver requires damage handling

 
https://elixir.bootlin.com/linux/v6.2/source/drivers/gpu/drm/mcde/mcde_drv.c#L97

for which we have to call the framebuffer's dirty callback

 
https://elixir.bootlin.com/linux/v6.2/source/drivers/gpu/drm/drm_gem_framebuffer_helper.c#L285

after each write.

Doing this with fbdev emulation requires tracking of mmap'ed pages via 
fbdev's deferred-I/O mechanisms. That makes the fbdev-emulation code 
more complex. AFAICT, the existing generic fbdev emulation already 
implements this case 'good enough.'

> 
> 3) This one:
> drivers/gpu/drm/pl111/pl111_drv.c
> is also very similar, but can sometimes use a dedicated
> RAM memory for allocations using CMA, does that make
> it not a candidate?

Thanks, I think I simply missed pl111.

Best regards
Thomas

> 
> They aren't much different in how they work from the TVE200.
> 
> Yours,
> Linus Walleij

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation
  2023-03-07  8:55   ` Thomas Zimmermann
@ 2023-03-09  8:17     ` Linus Walleij
  0 siblings, 0 replies; 55+ messages in thread
From: Linus Walleij @ 2023-03-09  8:17 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: javierm, maarten.lankhorst, mripard, airlied, daniel, andrew,
	laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel, festevam,
	linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea, khilman,
	jbrunet, martin.blumenstingl, alain.volmat, yannick.fertre,
	raphael.gallais-pou, philippe.cornu, mcoquelin.stm32,
	alexandre.torgue, jernej.skrabec, samuel, jyri.sarha, tomba,
	hyun.kwon, laurent.pinchart, dri-devel, linux-aspeed,
	linux-arm-kernel, linux-amlogic, linux-stm32, linux-sunxi

On Tue, Mar 7, 2023 at 9:55 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
> Am 06.03.23 um 23:19 schrieb Linus Walleij:

> > 2) Why isn't this DRM driver changed?
> > drivers/gpu/drm/mcde/mcde_drv.c
> > AFAICT it also uses GEM buffers in system memory.
>
> This driver requires damage handling
> https://elixir.bootlin.com/linux/v6.2/source/drivers/gpu/drm/mcde/mcde_drv.c#L97
>
> for which we have to call the framebuffer's dirty callback

Oh that one is on me ... I no longer remember exactly why I used
drm_gem_fb_create_with_dirty() but I think it was because I had the
ambition that the driver would only send out updates to DSI command
displays whenever something changed, so as to minimize traffic.

It turns out this ambition with command mode isn't working in
practice because all the MCDE does is to create a continuous stream
of DSI commands and while it is possible to send single frame
updates with it, it's not working in practice. So we are just setting
up continuous updates. We turn of the VBLANK IRQs a bit, but I
guess the DRM framework does that for us when nothing goes on.

I tested to replace this with drm_gem_fb_create and it works just
fine. I'll send out a patch so you can make this change also to the
MCDE driver.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 01/22] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers
  2023-03-01 15:30 ` [PATCH 01/22] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers Thomas Zimmermann
@ 2023-03-09 11:04   ` Javier Martinez Canillas
  2023-03-09 11:14     ` Javier Martinez Canillas
  2023-03-10 13:54     ` Thomas Zimmermann
  0 siblings, 2 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:04 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Implement fbdev emulation that is optimized for drivers that use
> DMA helpers. The buffers may no tbe moveable, may not require damage

"may not be"

Is may the correct verb here though? I guess you meant "shall not".

> handling and have to be located in system memory. This allows fbdev
> emulation to operate directly on the buffer and mmap it to userspace.
>
> Besides those constraints, the emulation works like in the generic
> code. As an internal DRM client provides, it receives hotplug, restore
> and unregister events. The DRM client is independent from the fbdev
> probing, which runs on the first successful hotplug event.
>
> The emulation is part of the DMA helper module and not build unless
> DMA helpers and fbdev emulation has been configured.
>
> Tested with vc4.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

[...]

> +static int drm_fbdev_dma_fb_open(struct fb_info *info, int user)
> +{
> +	struct drm_fb_helper *fb_helper = info->par;
> +
> +	/* No need to take a ref for fbcon because it unbinds on unregister */
> +	if (user && !try_module_get(fb_helper->dev->driver->fops->owner))
> +		return -ENODEV;
> +
> +	return 0;
> +}
> +
> +static int drm_fbdev_dma_fb_release(struct fb_info *info, int user)
> +{
> +	struct drm_fb_helper *fb_helper = info->par;
> +
> +	if (user)
> +		module_put(fb_helper->dev->driver->fops->owner);
> +
> +	return 0;
> +}
> +

These two functions are the same than what's used by the generic fbdev
emulation. Maybe they could be moved to drivers/gpu/drm/drm_fb_helper.c
and be reused ?

> +static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper,
> +					 struct drm_fb_helper_surface_size *sizes)
> +{
> +	struct drm_client_dev *client = &fb_helper->client;
> +	struct drm_device *dev = fb_helper->dev;
> +	struct drm_client_buffer *buffer;
> +	struct drm_gem_dma_object *dma_obj;
> +	struct drm_framebuffer *fb;
> +	struct fb_info *info;
> +	u32 format;
> +	struct iosys_map map;
> +	int ret;
> +
> +	drm_dbg_kms(dev, "surface width(%d), height(%d) and bpp(%d)\n",
> +		    sizes->surface_width, sizes->surface_height,
> +		    sizes->surface_bpp);
> +
> +	format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth);
> +	buffer = drm_client_framebuffer_create(client, sizes->surface_width,
> +					       sizes->surface_height, format);
> +	if (IS_ERR(buffer))
> +		return PTR_ERR(buffer);
> +	dma_obj = to_drm_gem_dma_obj(buffer->gem);
> +
> +	fb = buffer->fb;
> +	if (drm_WARN_ON(dev, fb->funcs->dirty)) {
> +		ret = -ENODEV; /* damage handling not supported; use generic emulation */
> +		goto err_drm_client_buffer_delete;
> +	}

Should we have a similar check for drm_fbdev_use_shadow_fb(fb_helper)
and warn on ?

> +
> +	ret = drm_client_buffer_vmap(buffer, &map);
> +	if (ret) {
> +		goto err_drm_client_buffer_delete;
> +	} else if (drm_WARN_ON(dev, map.is_iomem)) {
> +		ret = -ENODEV; /* I/O memory not supported; use generic emulation */

I also wonder if here and above instead of the warn on, there should
just be a normal check and print more verbose warning messages.

[...]

> +static void drm_fbdev_dma_client_unregister(struct drm_client_dev *client)
> +{
> +	struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
> +
> +	if (fb_helper->info) {
> +		drm_fb_helper_unregister_info(fb_helper);
> +	} else {
> +		drm_client_release(&fb_helper->client);
> +		drm_fb_helper_unprepare(fb_helper);
> +		kfree(fb_helper);
> +	}
> +}

This is again the same than drm_fbdev_client_unregister() so I think
that can be made a helper and shared bewteen the two implementations.

> +
> +static int drm_fbdev_dma_client_restore(struct drm_client_dev *client)
> +{
> +	drm_fb_helper_lastclose(client->dev);
> +
> +	return 0;
> +}

Same for this one.

> +
> +static int drm_fbdev_dma_client_hotplug(struct drm_client_dev *client)
> +{
> +	struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
> +	struct drm_device *dev = client->dev;
> +	int ret;
> +
> +	if (dev->fb_helper)
> +		return drm_fb_helper_hotplug_event(dev->fb_helper);
> +
> +	ret = drm_fb_helper_init(dev, fb_helper);
> +	if (ret)
> +		goto err_drm_err;
> +
> +	if (!drm_drv_uses_atomic_modeset(dev))
> +		drm_helper_disable_unused_functions(dev);
> +
> +	ret = drm_fb_helper_initial_config(fb_helper);
> +	if (ret)
> +		goto err_drm_fb_helper_fini;
> +
> +	return 0;
> +
> +err_drm_fb_helper_fini:
> +	drm_fb_helper_fini(fb_helper);
> +err_drm_err:
> +	drm_err(dev, "fbdev-dma: Failed to setup generic emulation (ret=%d)\n", ret);
> +	return ret;
> +}

And this one.

> +/**
> + * drm_fbdev_dma_setup() - Setup fbdev emulation for GEM DMA helpers
> + * @dev: DRM device
> + * @preferred_bpp: Preferred bits per pixel for the device.
> + *                 @dev->mode_config.preferred_depth is used if this is zero.
> + *
> + * This function sets up fbdev emulation for GEM DMA drivers that support
> + * dumb buffers with a virtual address and that can be mmap'ed.
> + * drm_fbdev_dma_setup() shall be called after the DRM driver registered
> + * the new DRM device with drm_dev_register().
> + *
> + * Restore, hotplug events and teardown are all taken care of. Drivers that do
> + * suspend/resume need to call drm_fb_helper_set_suspend_unlocked() themselves.
> + * Simple drivers might use drm_mode_config_helper_suspend().
> + *
> + * This function is safe to call even when there are no connectors present.
> + * Setup will be retried on the next hotplug event.
> + *
> + * The fbdev is destroyed by drm_dev_unregister().
> + */
> +void drm_fbdev_dma_setup(struct drm_device *dev, unsigned int preferred_bpp)
> +{
> +	struct drm_fb_helper *fb_helper;
> +	int ret;
> +
> +	drm_WARN(dev, !dev->registered, "Device has not been registered.\n");
> +	drm_WARN(dev, dev->fb_helper, "fb_helper is already set!\n");
> +
> +	fb_helper = kzalloc(sizeof(*fb_helper), GFP_KERNEL);
> +	if (!fb_helper)
> +		return;
> +	drm_fb_helper_prepare(dev, fb_helper, preferred_bpp, &drm_fbdev_dma_helper_funcs);
> +
> +	ret = drm_client_init(dev, &fb_helper->client, "fbdev", &drm_fbdev_dma_client_funcs);
> +	if (ret) {
> +		drm_err(dev, "Failed to register client: %d\n", ret);
> +		goto err_drm_client_init;
> +	}
> +
> +	ret = drm_fbdev_dma_client_hotplug(&fb_helper->client);
> +	if (ret)
> +		drm_dbg_kms(dev, "client hotplug ret=%d\n", ret);
> +
> +	drm_client_register(&fb_helper->client);
> +
> +	return;
> +
> +err_drm_client_init:
> +	drm_fb_helper_unprepare(fb_helper);
> +	kfree(fb_helper);
> +}
> +EXPORT_SYMBOL(drm_fbdev_dma_setup);

And this one could also be shared AFAICT if drm_fbdev_client_hotplug()
is used instead.

> diff --git a/include/drm/drm_fbdev_dma.h b/include/drm/drm_fbdev_dma.h
> new file mode 100644
> index 000000000000..2da7ee784133
> --- /dev/null
> +++ b/include/drm/drm_fbdev_dma.h
> @@ -0,0 +1,15 @@
> +/* SPDX-License-Identifier: MIT */
> +
> +#ifndef DRM_FBDEV_DMA_H
> +#define DRM_FBDEV_DMA_H
> +
> +struct drm_device;
> +
> +#ifdef CONFIG_DRM_FBDEV_EMULATION
> +void drm_fbdev_dma_setup(struct drm_device *dev, unsigned int preferred_bpp);
> +#else
> +static inline void drm_fbdev_dma_setup(struct drm_device *dev, unsigned int preferred_bpp)
> +{ }
> +#endif
> +
> +#endif
> -- 

And you should be able to drop this header too if split the common
helpers from drm_fbdev_generic.c or maybe I'm missing something ?

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 01/22] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers
  2023-03-09 11:04   ` Javier Martinez Canillas
@ 2023-03-09 11:14     ` Javier Martinez Canillas
  2023-03-10 13:54     ` Thomas Zimmermann
  1 sibling, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:14 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Javier Martinez Canillas <javierm@redhat.com> writes:

[...]

>> +	drm_fb_helper_prepare(dev, fb_helper, preferred_bpp, &drm_fbdev_dma_helper_funcs);
>> +
>> +	ret = drm_client_init(dev, &fb_helper->client, "fbdev", &drm_fbdev_dma_client_funcs);
>> +	if (ret) {
>> +		drm_err(dev, "Failed to register client: %d\n", ret);
>> +		goto err_drm_client_init;
>> +	}
>> +
>> +	ret = drm_fbdev_dma_client_hotplug(&fb_helper->client);
>> +	if (ret)
>> +		drm_dbg_kms(dev, "client hotplug ret=%d\n", ret);
>> +
>> +	drm_client_register(&fb_helper->client);
>> +
>> +	return;
>> +
>> +err_drm_client_init:
>> +	drm_fb_helper_unprepare(fb_helper);
>> +	kfree(fb_helper);
>> +}
>> +EXPORT_SYMBOL(drm_fbdev_dma_setup);
>
> And this one could also be shared AFAICT if drm_fbdev_client_hotplug()
> is used instead.
>

Scratch this one, you need the custom setup function to pass the 
drm_fbdev_dma_helper_funcs to drm_client_init(). But I think the
other comments this apply.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 02/22] arm/hdlcd: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 02/22] arm/hdlcd: Use GEM DMA fbdev emulation Thomas Zimmermann
@ 2023-03-09 11:17   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:17 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 03/22] arm/malidp: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 03/22] arm/malidp: " Thomas Zimmermann
@ 2023-03-09 11:18   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:18 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 04/22] drm/aspeed: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 04/22] drm/aspeed: " Thomas Zimmermann
@ 2023-03-09 11:20   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:20 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 05/22] drm/atmel-hlcdc: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 05/22] drm/atmel-hlcdc: " Thomas Zimmermann
  2023-03-02 19:47   ` Sam Ravnborg
@ 2023-03-09 11:20   ` Javier Martinez Canillas
  1 sibling, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:20 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 06/22] drm/fsl-dcu: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 06/22] drm/fsl-dcu: " Thomas Zimmermann
@ 2023-03-09 11:20   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:20 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 07/22] drm/imx/dcss: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 07/22] drm/imx/dcss: " Thomas Zimmermann
@ 2023-03-09 11:20   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:20 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 08/22] drm/imx: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 08/22] drm/imx: " Thomas Zimmermann
@ 2023-03-09 11:21   ` Javier Martinez Canillas
  2023-03-09 11:22   ` Javier Martinez Canillas
  1 sibling, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:21 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 09/22] drm/kmb: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 09/22] drm/kmb: " Thomas Zimmermann
  2023-03-06 17:18   ` Chrisanthus, Anitha
@ 2023-03-09 11:21   ` Javier Martinez Canillas
  1 sibling, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:21 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 08/22] drm/imx: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 08/22] drm/imx: " Thomas Zimmermann
  2023-03-09 11:21   ` Javier Martinez Canillas
@ 2023-03-09 11:22   ` Javier Martinez Canillas
  1 sibling, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:22 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 11/22] drm/meson: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 11/22] drm/meson: " Thomas Zimmermann
  2023-03-04 21:53   ` Martin Blumenstingl
@ 2023-03-09 11:22   ` Javier Martinez Canillas
  1 sibling, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:22 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 10/22] drm/logicvc: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 10/22] drm/logicvc: " Thomas Zimmermann
@ 2023-03-09 11:23   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:23 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 12/22] drm/mxsfb/lcdif: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 12/22] drm/mxsfb/lcdif: " Thomas Zimmermann
@ 2023-03-09 11:24   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:24 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 13/22] drm/mxsfb: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 13/22] drm/mxsfb: " Thomas Zimmermann
@ 2023-03-09 11:25   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:25 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 14/22] drm/sti: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 14/22] drm/sti: " Thomas Zimmermann
@ 2023-03-09 11:26   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:26 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 15/22] drm/stm: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 15/22] drm/stm: " Thomas Zimmermann
@ 2023-03-09 11:26   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:26 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 16/22] drm/sun4i: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 16/22] drm/sun4i: " Thomas Zimmermann
@ 2023-03-09 11:26   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:26 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 17/22] drm/tidss: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 17/22] drm/tidss: " Thomas Zimmermann
@ 2023-03-09 11:27   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:27 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 18/22] drm/tilcdc: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 18/22] drm/tilcdc: " Thomas Zimmermann
@ 2023-03-09 11:27   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:27 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 19/22] drm/arcpgu: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 19/22] drm/arcpgu: " Thomas Zimmermann
@ 2023-03-09 11:28   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:28 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 20/22] drm/tve200: Use GEM DMA fbdev emulation
  2023-03-01 15:30 ` [PATCH 20/22] drm/tve200: " Thomas Zimmermann
  2023-03-06 22:19   ` Linus Walleij
@ 2023-03-09 11:28   ` Javier Martinez Canillas
  1 sibling, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:28 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 21/22] drm/vc4: Use GEM DMA fbdev emulation
  2023-03-01 15:31 ` [PATCH 21/22] drm/vc4: " Thomas Zimmermann
@ 2023-03-09 11:28   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:28 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: linux-aspeed, dri-devel, linux-stm32, Thomas Zimmermann,
	linux-amlogic, linux-sunxi, linux-arm-kernel

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 22/22] drm/xlnx: Use GEM DMA fbdev emulation
  2023-03-01 15:31 ` [PATCH 22/22] drm/xlnx: " Thomas Zimmermann
@ 2023-03-09 11:29   ` Javier Martinez Canillas
  0 siblings, 0 replies; 55+ messages in thread
From: Javier Martinez Canillas @ 2023-03-09 11:29 UTC (permalink / raw)
  To: Thomas Zimmermann, maarten.lankhorst, mripard, airlied, daniel,
	andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer, kernel,
	festevam, linux-imx, p.zabel, anitha.chrisanthus, edmund.j.dea,
	khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi, Thomas Zimmermann

Thomas Zimmermann <tzimmermann@suse.de> writes:

> Use the fbdev emulation that is optimized for DMA helpers. Avoids
> possible shadow buffering and makes the code simpler.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 01/22] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers
  2023-03-09 11:04   ` Javier Martinez Canillas
  2023-03-09 11:14     ` Javier Martinez Canillas
@ 2023-03-10 13:54     ` Thomas Zimmermann
  1 sibling, 0 replies; 55+ messages in thread
From: Thomas Zimmermann @ 2023-03-10 13:54 UTC (permalink / raw)
  To: Javier Martinez Canillas, maarten.lankhorst, mripard, airlied,
	daniel, andrew, laurentiu.palcu, l.stach, shawnguo, s.hauer,
	kernel, festevam, linux-imx, p.zabel, anitha.chrisanthus,
	edmund.j.dea, khilman, jbrunet, martin.blumenstingl, alain.volmat,
	yannick.fertre, raphael.gallais-pou, philippe.cornu,
	mcoquelin.stm32, alexandre.torgue, jernej.skrabec, samuel,
	jyri.sarha, tomba, linus.walleij, hyun.kwon, laurent.pinchart
  Cc: dri-devel, linux-aspeed, linux-arm-kernel, linux-amlogic,
	linux-stm32, linux-sunxi


[-- Attachment #1.1.1: Type: text/plain, Size: 10104 bytes --]

Hi Javier,

thanks for your review.

Am 09.03.23 um 12:04 schrieb Javier Martinez Canillas:
> Thomas Zimmermann <tzimmermann@suse.de> writes:
> 
>> Implement fbdev emulation that is optimized for drivers that use
>> DMA helpers. The buffers may no tbe moveable, may not require damage
> 
> "may not be"
> 
> Is may the correct verb here though? I guess you meant "shall not".

I cannnot say for sure, but I always thought 'may not' is a nicer term 
for 'must not'. But RFC2119 disagrees wrt to the use of 'may'. I'll 
change the wording to 'must not'.

> 
>> handling and have to be located in system memory. This allows fbdev
>> emulation to operate directly on the buffer and mmap it to userspace.
>>
>> Besides those constraints, the emulation works like in the generic
>> code. As an internal DRM client provides, it receives hotplug, restore
>> and unregister events. The DRM client is independent from the fbdev
>> probing, which runs on the first successful hotplug event.
>>
>> The emulation is part of the DMA helper module and not build unless
>> DMA helpers and fbdev emulation has been configured.
>>
>> Tested with vc4.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
> 
> [...]
> 
>> +static int drm_fbdev_dma_fb_open(struct fb_info *info, int user)
>> +{
>> +	struct drm_fb_helper *fb_helper = info->par;
>> +
>> +	/* No need to take a ref for fbcon because it unbinds on unregister */
>> +	if (user && !try_module_get(fb_helper->dev->driver->fops->owner))
>> +		return -ENODEV;
>> +
>> +	return 0;
>> +}
>> +
>> +static int drm_fbdev_dma_fb_release(struct fb_info *info, int user)
>> +{
>> +	struct drm_fb_helper *fb_helper = info->par;
>> +
>> +	if (user)
>> +		module_put(fb_helper->dev->driver->fops->owner);
>> +
>> +	return 0;
>> +}
>> +
> 
> These two functions are the same than what's used by the generic fbdev
> emulation. Maybe they could be moved to drivers/gpu/drm/drm_fb_helper.c
> and be reused ?

I deliberately did not share code between the existing generic fbdev 
emulation and the new one. A number of drivers come with their own fbdev 
code and need conversion to struct drm_client. I want to see if there 
really is a pattern can can be shared in a helper.

I've done 'premature helperization' before and had to undo it later on. 
The existing fbdev code is an example of that. I'm trying to not do this 
mistake again.

> 
>> +static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper,
>> +					 struct drm_fb_helper_surface_size *sizes)
>> +{
>> +	struct drm_client_dev *client = &fb_helper->client;
>> +	struct drm_device *dev = fb_helper->dev;
>> +	struct drm_client_buffer *buffer;
>> +	struct drm_gem_dma_object *dma_obj;
>> +	struct drm_framebuffer *fb;
>> +	struct fb_info *info;
>> +	u32 format;
>> +	struct iosys_map map;
>> +	int ret;
>> +
>> +	drm_dbg_kms(dev, "surface width(%d), height(%d) and bpp(%d)\n",
>> +		    sizes->surface_width, sizes->surface_height,
>> +		    sizes->surface_bpp);
>> +
>> +	format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth);
>> +	buffer = drm_client_framebuffer_create(client, sizes->surface_width,
>> +					       sizes->surface_height, format);
>> +	if (IS_ERR(buffer))
>> +		return PTR_ERR(buffer);
>> +	dma_obj = to_drm_gem_dma_obj(buffer->gem);
>> +
>> +	fb = buffer->fb;
>> +	if (drm_WARN_ON(dev, fb->funcs->dirty)) {
>> +		ret = -ENODEV; /* damage handling not supported; use generic emulation */
>> +		goto err_drm_client_buffer_delete;
>> +	}
> 
> Should we have a similar check for drm_fbdev_use_shadow_fb(fb_helper)
> and warn on ?

That function (and several others) will go away soon. After the fbdev 
code for DMA helpers has been merged, generic fbdev will go shadow-fb-only.

> 
>> +
>> +	ret = drm_client_buffer_vmap(buffer, &map);
>> +	if (ret) {
>> +		goto err_drm_client_buffer_delete;
>> +	} else if (drm_WARN_ON(dev, map.is_iomem)) {
>> +		ret = -ENODEV; /* I/O memory not supported; use generic emulation */
> 
> I also wonder if here and above instead of the warn on, there should
> just be a normal check and print more verbose warning messages.

No, because it's a driver bug that should be fixed ASAP. The driver 
should call generic fbdev instead. A regular warning would be 
appropriate for a runtime error over which the driver has no control, 
such as a OOM.

> 
> [...]
> 
>> +static void drm_fbdev_dma_client_unregister(struct drm_client_dev *client)
>> +{
>> +	struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
>> +
>> +	if (fb_helper->info) {
>> +		drm_fb_helper_unregister_info(fb_helper);
>> +	} else {
>> +		drm_client_release(&fb_helper->client);
>> +		drm_fb_helper_unprepare(fb_helper);
>> +		kfree(fb_helper);
>> +	}
>> +}
> 
> This is again the same than drm_fbdev_client_unregister() so I think
> that can be made a helper and shared bewteen the two implementations.

I've have the same discussion with Patrik when I sent such an updte for 
gma500. These functions are the same, but I think this will change.

Here in _unregister(), the kfree() expects struct drm_fb_helper. But 
other drivers will certainly have their own structures and then require 
their own unregister helpers.

> 
>> +
>> +static int drm_fbdev_dma_client_restore(struct drm_client_dev *client)
>> +{
>> +	drm_fb_helper_lastclose(client->dev);
>> +
>> +	return 0;
>> +}
> 
> Same for this one.

Maybe more sharable, but there will be a version that supports 
vgaswitcheroo on several drivers.

> 
>> +
>> +static int drm_fbdev_dma_client_hotplug(struct drm_client_dev *client)
>> +{
>> +	struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
>> +	struct drm_device *dev = client->dev;
>> +	int ret;
>> +
>> +	if (dev->fb_helper)
>> +		return drm_fb_helper_hotplug_event(dev->fb_helper);
>> +
>> +	ret = drm_fb_helper_init(dev, fb_helper);
>> +	if (ret)
>> +		goto err_drm_err;
>> +
>> +	if (!drm_drv_uses_atomic_modeset(dev))
>> +		drm_helper_disable_unused_functions(dev);
>> +
>> +	ret = drm_fb_helper_initial_config(fb_helper);
>> +	if (ret)
>> +		goto err_drm_fb_helper_fini;
>> +
>> +	return 0;
>> +
>> +err_drm_fb_helper_fini:
>> +	drm_fb_helper_fini(fb_helper);
>> +err_drm_err:
>> +	drm_err(dev, "fbdev-dma: Failed to setup generic emulation (ret=%d)\n", ret);
>> +	return ret;
>> +}
> 
> And this one.

I think, we should try to remove drm_fb_helper_funcs and therefore merge 
probe into hotplug. Each fbdev emulation will then require its own 
_hotplug() function. So this code won't be shareable in the future.

As I outlined before, I intentionally didn't share this code because I 
expect that it will be 'un-shared' in the near future.

> 
>> +/**
>> + * drm_fbdev_dma_setup() - Setup fbdev emulation for GEM DMA helpers
>> + * @dev: DRM device
>> + * @preferred_bpp: Preferred bits per pixel for the device.
>> + *                 @dev->mode_config.preferred_depth is used if this is zero.
>> + *
>> + * This function sets up fbdev emulation for GEM DMA drivers that support
>> + * dumb buffers with a virtual address and that can be mmap'ed.
>> + * drm_fbdev_dma_setup() shall be called after the DRM driver registered
>> + * the new DRM device with drm_dev_register().
>> + *
>> + * Restore, hotplug events and teardown are all taken care of. Drivers that do
>> + * suspend/resume need to call drm_fb_helper_set_suspend_unlocked() themselves.
>> + * Simple drivers might use drm_mode_config_helper_suspend().
>> + *
>> + * This function is safe to call even when there are no connectors present.
>> + * Setup will be retried on the next hotplug event.
>> + *
>> + * The fbdev is destroyed by drm_dev_unregister().
>> + */
>> +void drm_fbdev_dma_setup(struct drm_device *dev, unsigned int preferred_bpp)
>> +{
>> +	struct drm_fb_helper *fb_helper;
>> +	int ret;
>> +
>> +	drm_WARN(dev, !dev->registered, "Device has not been registered.\n");
>> +	drm_WARN(dev, dev->fb_helper, "fb_helper is already set!\n");
>> +
>> +	fb_helper = kzalloc(sizeof(*fb_helper), GFP_KERNEL);
>> +	if (!fb_helper)
>> +		return;
>> +	drm_fb_helper_prepare(dev, fb_helper, preferred_bpp, &drm_fbdev_dma_helper_funcs);
>> +
>> +	ret = drm_client_init(dev, &fb_helper->client, "fbdev", &drm_fbdev_dma_client_funcs);
>> +	if (ret) {
>> +		drm_err(dev, "Failed to register client: %d\n", ret);
>> +		goto err_drm_client_init;
>> +	}
>> +
>> +	ret = drm_fbdev_dma_client_hotplug(&fb_helper->client);
>> +	if (ret)
>> +		drm_dbg_kms(dev, "client hotplug ret=%d\n", ret);
>> +
>> +	drm_client_register(&fb_helper->client);
>> +
>> +	return;
>> +
>> +err_drm_client_init:
>> +	drm_fb_helper_unprepare(fb_helper);
>> +	kfree(fb_helper);
>> +}
>> +EXPORT_SYMBOL(drm_fbdev_dma_setup);
> 
> And this one could also be shared AFAICT if drm_fbdev_client_hotplug()
> is used instead.
> 
>> diff --git a/include/drm/drm_fbdev_dma.h b/include/drm/drm_fbdev_dma.h
>> new file mode 100644
>> index 000000000000..2da7ee784133
>> --- /dev/null
>> +++ b/include/drm/drm_fbdev_dma.h
>> @@ -0,0 +1,15 @@
>> +/* SPDX-License-Identifier: MIT */
>> +
>> +#ifndef DRM_FBDEV_DMA_H
>> +#define DRM_FBDEV_DMA_H
>> +
>> +struct drm_device;
>> +
>> +#ifdef CONFIG_DRM_FBDEV_EMULATION
>> +void drm_fbdev_dma_setup(struct drm_device *dev, unsigned int preferred_bpp);
>> +#else
>> +static inline void drm_fbdev_dma_setup(struct drm_device *dev, unsigned int preferred_bpp)
>> +{ }
>> +#endif
>> +
>> +#endif
>> -- 
> 
> And you should be able to drop this header too if split the common
> helpers from drm_fbdev_generic.c or maybe I'm missing something ?

This is the header that drivers include to run DMA fbdev emulation. We 
cannot remove it.

Best regards
Thomas

> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2023-03-10 13:56 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-01 15:30 [PATCH 00/22] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
2023-03-01 15:30 ` [PATCH 01/22] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers Thomas Zimmermann
2023-03-09 11:04   ` Javier Martinez Canillas
2023-03-09 11:14     ` Javier Martinez Canillas
2023-03-10 13:54     ` Thomas Zimmermann
2023-03-01 15:30 ` [PATCH 02/22] arm/hdlcd: Use GEM DMA fbdev emulation Thomas Zimmermann
2023-03-09 11:17   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 03/22] arm/malidp: " Thomas Zimmermann
2023-03-09 11:18   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 04/22] drm/aspeed: " Thomas Zimmermann
2023-03-09 11:20   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 05/22] drm/atmel-hlcdc: " Thomas Zimmermann
2023-03-02 19:47   ` Sam Ravnborg
2023-03-09 11:20   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 06/22] drm/fsl-dcu: " Thomas Zimmermann
2023-03-09 11:20   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 07/22] drm/imx/dcss: " Thomas Zimmermann
2023-03-09 11:20   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 08/22] drm/imx: " Thomas Zimmermann
2023-03-09 11:21   ` Javier Martinez Canillas
2023-03-09 11:22   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 09/22] drm/kmb: " Thomas Zimmermann
2023-03-06 17:18   ` Chrisanthus, Anitha
2023-03-09 11:21   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 10/22] drm/logicvc: " Thomas Zimmermann
2023-03-09 11:23   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 11/22] drm/meson: " Thomas Zimmermann
2023-03-04 21:53   ` Martin Blumenstingl
2023-03-09 11:22   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 12/22] drm/mxsfb/lcdif: " Thomas Zimmermann
2023-03-09 11:24   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 13/22] drm/mxsfb: " Thomas Zimmermann
2023-03-09 11:25   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 14/22] drm/sti: " Thomas Zimmermann
2023-03-09 11:26   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 15/22] drm/stm: " Thomas Zimmermann
2023-03-09 11:26   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 16/22] drm/sun4i: " Thomas Zimmermann
2023-03-09 11:26   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 17/22] drm/tidss: " Thomas Zimmermann
2023-03-09 11:27   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 18/22] drm/tilcdc: " Thomas Zimmermann
2023-03-09 11:27   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 19/22] drm/arcpgu: " Thomas Zimmermann
2023-03-09 11:28   ` Javier Martinez Canillas
2023-03-01 15:30 ` [PATCH 20/22] drm/tve200: " Thomas Zimmermann
2023-03-06 22:19   ` Linus Walleij
2023-03-09 11:28   ` Javier Martinez Canillas
2023-03-01 15:31 ` [PATCH 21/22] drm/vc4: " Thomas Zimmermann
2023-03-09 11:28   ` Javier Martinez Canillas
2023-03-01 15:31 ` [PATCH 22/22] drm/xlnx: " Thomas Zimmermann
2023-03-09 11:29   ` Javier Martinez Canillas
2023-03-06 22:19 ` [PATCH 00/22] drm/dma-helper: Add dedicated " Linus Walleij
2023-03-07  8:55   ` Thomas Zimmermann
2023-03-09  8:17     ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).