Skip to contentSkip to conversation

drm/tilcdc: Run DRM default client setup

PATCH [email protected] 1 participant 1 message Sep 10, 2024

lore
Share & tools
lore

[email protected]

author Acked-by
#0 lore raw
Quoted 5 lines · Thomas Zimmermann

Call drm_client_setup_with_color_mode() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client.

Quoted 8 lines

v3:
- add DRM_FBDEV_DMA_DRIVER_OPS macro

tilcdc patch looks identical to the previous version, but here is my ack again:

Best regards,
Jyri

Quoted 38 lines

---
drivers/gpu/drm/tilcdc/tilcdc_drv.c | 5 ++++-

1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/tilcdc/tilcdc_drv.c +3 -1
index cd5eefa06060..8c9f3705aa6c 100644
@@ -14,6 +14,7 @@
 #include <linux/pm_runtime.h>
 
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_client_setup.h>
 #include <drm/drm_debugfs.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_fbdev_dma.h>
@@ -374,7 +375,8 @@ static int tilcdc_init(const struct drm_driver *ddrv, struct device *dev)
 goto init_failed;
 priv->is_registered = true;
 
- drm_fbdev_dma_setup(ddev, bpp);
+ drm_client_setup_with_color_mode(ddev, bpp);
+
 return 0;
 

init_failed:

drivers/gpu/drm/tilcdc/tilcdc_drv.c +1 -0
@@ -472,6 +474,7 @@ DEFINE_DRM_GEM_DMA_FOPS(fops);
 static const struct drm_driver tilcdc_driver = {
 .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
 DRM_GEM_DMA_DRIVER_OPS,
+ DRM_FBDEV_DMA_DRIVER_OPS,
 #ifdef CONFIG_DEBUG_FS
 .debugfs_init = tilcdc_debugfs_init,
 #endif
Signature · 1 line
2.46.0