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>
28 lines
656 B
C
28 lines
656 B
C
/* SPDX-License-Identifier: MIT */
|
|
|
|
#ifndef DRM_FBDEV_DMA_H
|
|
#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
|