* [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation
@ 2023-03-13 15:51 Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 01/25] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers Thomas Zimmermann
` (26 more replies)
0 siblings, 27 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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.
v2:
* update mcde and pl111 as well (Linus)
Linus Walleij (1):
drm/mcde: Do not use dirty GEM FB handling
Thomas Zimmermann (24):
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
drm/mcde: Use GEM DMA fbdev emulation
drm/pl111: 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/mcde/mcde_drv.c | 6 +-
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/pl111/pl111_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 +
26 files changed, 338 insertions(+), 47 deletions(-)
create mode 100644 drivers/gpu/drm/drm_fbdev_dma.c
create mode 100644 include/drm/drm_fbdev_dma.h
base-commit: b21ced77ae1dbc3d8b01d3aef3c99bba7377a69b
prerequisite-patch-id: 0aa359f6144c4015c140c8a6750be19099c676fb
prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
prerequisite-patch-id: 3f204510fcbf9530d6540bd8e6128cce598988b6
prerequisite-patch-id: 75f2ebf12693f23508f00d574b2b57488723e474
prerequisite-patch-id: 718531bf5cf15716834cfaf3008ea0e2366ec927
prerequisite-patch-id: a793aa283cf41f290d970404881f24bffc48caff
prerequisite-patch-id: e74f259d1923247a74d5bf7d996afb0e6ca01883
prerequisite-patch-id: a1d12b9548110b1f5e9aa3803b21e2a7f9f8c19d
prerequisite-patch-id: 033f10da72f10d82f113a5066a3b3a7ff91d13aa
prerequisite-patch-id: 976264fafbd69d0996209a90a3d546d9be3f3779
prerequisite-patch-id: 617c74af5e16717898a23ced9c8badfff1e0ade7
prerequisite-patch-id: 5e0cfa9c81aa7ceb2cc48c5cbc9934496251fac4
prerequisite-patch-id: 13594c3cc8102960bb195bc7f572fefba8eb19d7
prerequisite-patch-id: 99d9da7e08369050d135c23d32dead811bb9cf97
prerequisite-patch-id: 833f9d8341a287961ee653b04730da57ce987b06
prerequisite-patch-id: 5d5c9caaf9489a6c2f688d632a57a0fb65fcb5f7
prerequisite-patch-id: b64758ecd64ec0c0acd96d0766ba891378c5c539
prerequisite-patch-id: 37a7d3e9fb3e4e2b7ebeac3f77da6610f12beea3
prerequisite-patch-id: 99073429dafdc98cdd31464ce28e795696a149f9
prerequisite-patch-id: c2247eca44927569cd2b6d9f370195965346adb4
--
2.39.2
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 01/25] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 02/25] arm/hdlcd: Use GEM DMA fbdev emulation Thomas Zimmermann
` (25 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
---
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 1e04d135e866..a33257d2bc7f 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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 02/25] arm/hdlcd: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 01/25] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 03/25] arm/malidp: " Thomas Zimmermann
` (24 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 03/25] arm/malidp: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 01/25] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 02/25] arm/hdlcd: Use GEM DMA fbdev emulation Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 04/25] drm/aspeed: " Thomas Zimmermann
` (23 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 04/25] drm/aspeed: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (2 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 03/25] arm/malidp: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 05/25] drm/atmel-hlcdc: " Thomas Zimmermann
` (22 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 05/25] drm/atmel-hlcdc: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (3 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 04/25] drm/aspeed: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 06/25] drm/fsl-dcu: " Thomas Zimmermann
` (21 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 06/25] drm/fsl-dcu: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (4 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 05/25] drm/atmel-hlcdc: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 07/25] drm/imx/dcss: " Thomas Zimmermann
` (20 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 07/25] drm/imx/dcss: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (5 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 06/25] drm/fsl-dcu: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 08/25] drm/imx: " Thomas Zimmermann
` (19 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 08/25] drm/imx: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (6 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 07/25] drm/imx/dcss: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 09/25] drm/kmb: " Thomas Zimmermann
` (18 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 09/25] drm/kmb: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (7 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 08/25] drm/imx: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 10/25] drm/logicvc: " Thomas Zimmermann
` (17 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
Acked-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 10/25] drm/logicvc: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (8 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 09/25] drm/kmb: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 11/25] drm/meson: " Thomas Zimmermann
` (16 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 11/25] drm/meson: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (9 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 10/25] drm/logicvc: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 12/25] drm/mxsfb/lcdif: " Thomas Zimmermann
` (15 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 12/25] drm/mxsfb/lcdif: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (10 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 11/25] drm/meson: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 13/25] drm/mxsfb: " Thomas Zimmermann
` (14 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 13/25] drm/mxsfb: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (11 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 12/25] drm/mxsfb/lcdif: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 14/25] drm/sti: " Thomas Zimmermann
` (13 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 14/25] drm/sti: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (12 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 13/25] drm/mxsfb: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 15/25] drm/stm: " Thomas Zimmermann
` (12 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 15/25] drm/stm: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (13 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 14/25] drm/sti: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 16/25] drm/sun4i: " Thomas Zimmermann
` (11 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 16/25] drm/sun4i: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (14 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 15/25] drm/stm: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 17/25] drm/tidss: " Thomas Zimmermann
` (10 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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 d6c741716167..e49f78a6a8cf 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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 17/25] drm/tidss: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (15 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 16/25] drm/sun4i: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 18/25] drm/tilcdc: " Thomas Zimmermann
` (9 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 18/25] drm/tilcdc: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (16 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 17/25] drm/tidss: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 19/25] drm/arcpgu: " Thomas Zimmermann
` (8 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 19/25] drm/arcpgu: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (17 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 18/25] drm/tilcdc: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 20/25] drm/tve200: " Thomas Zimmermann
` (7 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 20/25] drm/tve200: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (18 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 19/25] drm/arcpgu: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 21/25] drm/vc4: " Thomas Zimmermann
` (6 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 21/25] drm/vc4: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (19 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 20/25] drm/tve200: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 22/25] drm/xlnx: " Thomas Zimmermann
` (5 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 22/25] drm/xlnx: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (20 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 21/25] drm/vc4: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 23/25] drm/mcde: Do not use dirty GEM FB handling Thomas Zimmermann
` (4 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
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>
---
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
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 23/25] drm/mcde: Do not use dirty GEM FB handling
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (21 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 22/25] drm/xlnx: " Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 24/25] drm/mcde: Use GEM DMA fbdev emulation Thomas Zimmermann
` (3 subsequent siblings)
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
From: Linus Walleij <linus.walleij@linaro.org>
This driver has no way to handle damage, the reason the
drm_gem_fb_create_with_dirty() was used 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 been worthwhile.
So we are just setting up continuous updates.
Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/dri-devel/0e789778-03ca-e3cb-9c94-e8b55573894c at suse.de/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/mcde/mcde_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c
index 4aedb050d2a5..a592ad0d7886 100644
--- a/drivers/gpu/drm/mcde/mcde_drv.c
+++ b/drivers/gpu/drm/mcde/mcde_drv.c
@@ -94,7 +94,7 @@
#define MCDE_PID_MAJOR_VERSION_MASK 0xFF000000
static const struct drm_mode_config_funcs mcde_mode_config_funcs = {
- .fb_create = drm_gem_fb_create_with_dirty,
+ .fb_create = drm_gem_fb_create,
.atomic_check = drm_atomic_helper_check,
.atomic_commit = drm_atomic_helper_commit,
};
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 24/25] drm/mcde: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (22 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 23/25] drm/mcde: Do not use dirty GEM FB handling Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 21:40 ` Linus Walleij
2023-03-13 15:51 ` [PATCH v2 25/25] drm/pl111: " Thomas Zimmermann
` (2 subsequent siblings)
26 siblings, 1 reply; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.
Reported-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/dri-devel/CACRpkdawSQsNqKJkSSoSw3HmMHyNXFUywxkdszpTC-a_uZA+tQ at mail.gmail.com/
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/mcde/mcde_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c
index a592ad0d7886..a8cd86c06c14 100644
--- a/drivers/gpu/drm/mcde/mcde_drv.c
+++ b/drivers/gpu/drm/mcde/mcde_drv.c
@@ -69,7 +69,7 @@
#include <drm/drm_bridge.h>
#include <drm/drm_drv.h>
#include <drm/drm_fb_dma_helper.h>
-#include <drm/drm_fbdev_generic.h>
+#include <drm/drm_fbdev_dma.h>
#include <drm/drm_gem.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
@@ -237,7 +237,7 @@ static int mcde_drm_bind(struct device *dev)
if (ret < 0)
goto unbind;
- drm_fbdev_generic_setup(drm, 32);
+ drm_fbdev_dma_setup(drm, 32);
return 0;
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 25/25] drm/pl111: Use GEM DMA fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (23 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 24/25] drm/mcde: Use GEM DMA fbdev emulation Thomas Zimmermann
@ 2023-03-13 15:51 ` Thomas Zimmermann
2023-03-13 21:41 ` Linus Walleij
2023-03-13 21:37 ` [PATCH v2 00/25] drm/dma-helper: Add dedicated " Linus Walleij
2023-03-14 16:09 ` Thomas Zimmermann
26 siblings, 1 reply; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-13 15:51 UTC (permalink / raw)
To: linux-aspeed
Use the fbdev emulation that is optimized for DMA helpers. Avoids
possible shadow buffering and makes the code simpler.
Reported-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/dri-devel/CACRpkdawSQsNqKJkSSoSw3HmMHyNXFUywxkdszpTC-a_uZA+tQ at mail.gmail.com/
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/pl111/pl111_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c
index 00deba0b7271..4b2a9e9753f6 100644
--- a/drivers/gpu/drm/pl111/pl111_drv.c
+++ b/drivers/gpu/drm/pl111/pl111_drv.c
@@ -48,7 +48,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_fourcc.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
@@ -308,7 +308,7 @@ static int pl111_amba_probe(struct amba_device *amba_dev,
if (ret < 0)
goto dev_put;
- drm_fbdev_generic_setup(drm, priv->variant->fb_bpp);
+ drm_fbdev_dma_setup(drm, priv->variant->fb_bpp);
return 0;
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (24 preceding siblings ...)
2023-03-13 15:51 ` [PATCH v2 25/25] drm/pl111: " Thomas Zimmermann
@ 2023-03-13 21:37 ` Linus Walleij
2023-03-14 16:09 ` Thomas Zimmermann
26 siblings, 0 replies; 30+ messages in thread
From: Linus Walleij @ 2023-03-13 21:37 UTC (permalink / raw)
To: linux-aspeed
On Mon, Mar 13, 2023 at 4:51?PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
> Tested with fbcon and IGT on vc4.
Also tested on the U8500 MCDE on Samsung GT-I8190 (Golden)
successfully.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 24/25] drm/mcde: Use GEM DMA fbdev emulation
2023-03-13 15:51 ` [PATCH v2 24/25] drm/mcde: Use GEM DMA fbdev emulation Thomas Zimmermann
@ 2023-03-13 21:40 ` Linus Walleij
0 siblings, 0 replies; 30+ messages in thread
From: Linus Walleij @ 2023-03-13 21:40 UTC (permalink / raw)
To: linux-aspeed
On Mon, Mar 13, 2023 at 4:51?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.
>
> Reported-by: Linus Walleij <linus.walleij@linaro.org>
> Link: https://lore.kernel.org/dri-devel/CACRpkdawSQsNqKJkSSoSw3HmMHyNXFUywxkdszpTC-a_uZA+tQ at mail.gmail.com/
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 25/25] drm/pl111: Use GEM DMA fbdev emulation
2023-03-13 15:51 ` [PATCH v2 25/25] drm/pl111: " Thomas Zimmermann
@ 2023-03-13 21:41 ` Linus Walleij
0 siblings, 0 replies; 30+ messages in thread
From: Linus Walleij @ 2023-03-13 21:41 UTC (permalink / raw)
To: linux-aspeed
On Mon, Mar 13, 2023 at 4:51?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.
>
> Reported-by: Linus Walleij <linus.walleij@linaro.org>
> Link: https://lore.kernel.org/dri-devel/CACRpkdawSQsNqKJkSSoSw3HmMHyNXFUywxkdszpTC-a_uZA+tQ at mail.gmail.com/
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
` (25 preceding siblings ...)
2023-03-13 21:37 ` [PATCH v2 00/25] drm/dma-helper: Add dedicated " Linus Walleij
@ 2023-03-14 16:09 ` Thomas Zimmermann
26 siblings, 0 replies; 30+ messages in thread
From: Thomas Zimmermann @ 2023-03-14 16:09 UTC (permalink / raw)
To: linux-aspeed
Merged into drm-misc-next. Thanks a lot for reviews and comments.
Am 13.03.23 um 16:51 schrieb 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.
>
> v2:
> * update mcde and pl111 as well (Linus)
>
> Linus Walleij (1):
> drm/mcde: Do not use dirty GEM FB handling
>
> Thomas Zimmermann (24):
> 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
> drm/mcde: Use GEM DMA fbdev emulation
> drm/pl111: 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/mcde/mcde_drv.c | 6 +-
> 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/pl111/pl111_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 +
> 26 files changed, 338 insertions(+), 47 deletions(-)
> create mode 100644 drivers/gpu/drm/drm_fbdev_dma.c
> create mode 100644 include/drm/drm_fbdev_dma.h
>
>
> base-commit: b21ced77ae1dbc3d8b01d3aef3c99bba7377a69b
> prerequisite-patch-id: 0aa359f6144c4015c140c8a6750be19099c676fb
> prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
> prerequisite-patch-id: 3f204510fcbf9530d6540bd8e6128cce598988b6
> prerequisite-patch-id: 75f2ebf12693f23508f00d574b2b57488723e474
> prerequisite-patch-id: 718531bf5cf15716834cfaf3008ea0e2366ec927
> prerequisite-patch-id: a793aa283cf41f290d970404881f24bffc48caff
> prerequisite-patch-id: e74f259d1923247a74d5bf7d996afb0e6ca01883
> prerequisite-patch-id: a1d12b9548110b1f5e9aa3803b21e2a7f9f8c19d
> prerequisite-patch-id: 033f10da72f10d82f113a5066a3b3a7ff91d13aa
> prerequisite-patch-id: 976264fafbd69d0996209a90a3d546d9be3f3779
> prerequisite-patch-id: 617c74af5e16717898a23ced9c8badfff1e0ade7
> prerequisite-patch-id: 5e0cfa9c81aa7ceb2cc48c5cbc9934496251fac4
> prerequisite-patch-id: 13594c3cc8102960bb195bc7f572fefba8eb19d7
> prerequisite-patch-id: 99d9da7e08369050d135c23d32dead811bb9cf97
> prerequisite-patch-id: 833f9d8341a287961ee653b04730da57ce987b06
> prerequisite-patch-id: 5d5c9caaf9489a6c2f688d632a57a0fb65fcb5f7
> prerequisite-patch-id: b64758ecd64ec0c0acd96d0766ba891378c5c539
> prerequisite-patch-id: 37a7d3e9fb3e4e2b7ebeac3f77da6610f12beea3
> prerequisite-patch-id: 99073429dafdc98cdd31464ce28e795696a149f9
> prerequisite-patch-id: c2247eca44927569cd2b6d9f370195965346adb4
--
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20230314/c6d848ed/attachment.sig>
^ permalink raw reply [flat|nested] 30+ messages in thread
end of thread, other threads:[~2023-03-14 16:09 UTC | newest]
Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-13 15:51 [PATCH v2 00/25] drm/dma-helper: Add dedicated fbdev emulation Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 01/25] drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 02/25] arm/hdlcd: Use GEM DMA fbdev emulation Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 03/25] arm/malidp: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 04/25] drm/aspeed: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 05/25] drm/atmel-hlcdc: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 06/25] drm/fsl-dcu: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 07/25] drm/imx/dcss: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 08/25] drm/imx: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 09/25] drm/kmb: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 10/25] drm/logicvc: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 11/25] drm/meson: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 12/25] drm/mxsfb/lcdif: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 13/25] drm/mxsfb: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 14/25] drm/sti: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 15/25] drm/stm: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 16/25] drm/sun4i: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 17/25] drm/tidss: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 18/25] drm/tilcdc: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 19/25] drm/arcpgu: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 20/25] drm/tve200: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 21/25] drm/vc4: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 22/25] drm/xlnx: " Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 23/25] drm/mcde: Do not use dirty GEM FB handling Thomas Zimmermann
2023-03-13 15:51 ` [PATCH v2 24/25] drm/mcde: Use GEM DMA fbdev emulation Thomas Zimmermann
2023-03-13 21:40 ` Linus Walleij
2023-03-13 15:51 ` [PATCH v2 25/25] drm/pl111: " Thomas Zimmermann
2023-03-13 21:41 ` Linus Walleij
2023-03-13 21:37 ` [PATCH v2 00/25] drm/dma-helper: Add dedicated " Linus Walleij
2023-03-14 16:09 ` Thomas Zimmermann
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).