Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/tve200: Run DRM default client setup

Call drm_client_setup_with_fourcc() 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.

v5:
- select DRM_CLIENT_SELECTION
v2:
- use drm_client_setup_with_fourcc()

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-46-tzimmermann@suse.de

+5 -5
+1
drivers/gpu/drm/tve200/Kconfig
··· 6 6 depends on ARM || COMPILE_TEST 7 7 depends on OF 8 8 select DRM_BRIDGE 9 + select DRM_CLIENT_SELECTION 9 10 select DRM_PANEL_BRIDGE 10 11 select DRM_KMS_HELPER 11 12 select DRM_GEM_DMA_HELPER
+4 -5
drivers/gpu/drm/tve200/tve200_drv.c
··· 39 39 40 40 #include <drm/drm_atomic_helper.h> 41 41 #include <drm/drm_bridge.h> 42 + #include <drm/drm_client_setup.h> 42 43 #include <drm/drm_drv.h> 43 44 #include <drm/drm_fbdev_dma.h> 45 + #include <drm/drm_fourcc.h> 44 46 #include <drm/drm_gem_dma_helper.h> 45 47 #include <drm/drm_gem_framebuffer_helper.h> 46 48 #include <drm/drm_module.h> ··· 151 149 .minor = 0, 152 150 .patchlevel = 0, 153 151 DRM_GEM_DMA_DRIVER_OPS, 152 + DRM_FBDEV_DMA_DRIVER_OPS, 154 153 }; 155 154 156 155 static int tve200_probe(struct platform_device *pdev) ··· 224 221 if (ret < 0) 225 222 goto clk_disable; 226 223 227 - /* 228 - * Passing in 16 here will make the RGB565 mode the default 229 - * Passing in 32 will use XRGB8888 mode 230 - */ 231 - drm_fbdev_dma_setup(drm, 16); 224 + drm_client_setup_with_fourcc(drm, DRM_FORMAT_RGB565); 232 225 233 226 return 0; 234 227