summaryrefslogtreecommitdiff
path: root/include/drm/drm_fbdev_dma.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2025-05-19 13:32:28 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-22 14:29:53 +0200
commit25998ed87f0c8772bd5faf8ee92d831f1c69e1d0 (patch)
tree5d4d7b57f6cbe7aa711d075b8629d5f801189531 /include/drm/drm_fbdev_dma.h
parentd22496de5049d9b8f5b6d8623682a56b3c3d7e18 (diff)
drm/fbdev-dma: Support struct drm_driver.fbdev_probe
commit 8998eedda2539d2528cfebdc7c17eed0ad35b714 upstream. Rework fbdev probing to support fbdev_probe in struct drm_driver and reimplement the old fb_probe callback on top of it. Provide an initializer macro for struct drm_driver that sets the callback according to the kernel configuration. This change allows the common fbdev client to run on top of DMA- based DRM drivers. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-6-tzimmermann@suse.de Signed-off-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/drm/drm_fbdev_dma.h')
-rw-r--r--include/drm/drm_fbdev_dma.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/drm/drm_fbdev_dma.h b/include/drm/drm_fbdev_dma.h
index 2da7ee784133..6ae4de46497c 100644
--- a/include/drm/drm_fbdev_dma.h
+++ b/include/drm/drm_fbdev_dma.h
@@ -4,12 +4,24 @@
#define DRM_FBDEV_DMA_H
struct drm_device;
+struct drm_fb_helper;
+struct drm_fb_helper_surface_size;
#ifdef CONFIG_DRM_FBDEV_EMULATION
+int drm_fbdev_dma_driver_fbdev_probe(struct drm_fb_helper *fb_helper,
+ struct drm_fb_helper_surface_size *sizes);
+
+#define DRM_FBDEV_DMA_DRIVER_OPS \
+ .fbdev_probe = drm_fbdev_dma_driver_fbdev_probe
+
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)
{ }
+
+#define DRM_FBDEV_DMA_DRIVER_OPS \
+ .fbdev_probe = NULL
+
#endif
#endif