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

Configure Feed

Select the types of activity you want to include in your feed.

drm/ofdrm: Use DRM default client setup

Call drm_client_setup() 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

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-58-tzimmermann@suse.de

+4 -6
+1
drivers/gpu/drm/tiny/Kconfig
··· 57 57 tristate "Open Firmware display driver" 58 58 depends on DRM && MMU && OF && (PPC || COMPILE_TEST) 59 59 select APERTURE_HELPERS 60 + select DRM_CLIENT_SELECTION 60 61 select DRM_GEM_SHMEM_HELPER 61 62 select DRM_KMS_HELPER 62 63 help
+3 -6
drivers/gpu/drm/tiny/ofdrm.c
··· 7 7 #include <drm/drm_aperture.h> 8 8 #include <drm/drm_atomic.h> 9 9 #include <drm/drm_atomic_state_helper.h> 10 + #include <drm/drm_client_setup.h> 10 11 #include <drm/drm_connector.h> 11 12 #include <drm/drm_damage_helper.h> 12 13 #include <drm/drm_device.h> ··· 1345 1344 1346 1345 static struct drm_driver ofdrm_driver = { 1347 1346 DRM_GEM_SHMEM_DRIVER_OPS, 1347 + DRM_FBDEV_SHMEM_DRIVER_OPS, 1348 1348 .name = DRIVER_NAME, 1349 1349 .desc = DRIVER_DESC, 1350 1350 .date = DRIVER_DATE, ··· 1363 1361 { 1364 1362 struct ofdrm_device *odev; 1365 1363 struct drm_device *dev; 1366 - unsigned int color_mode; 1367 1364 int ret; 1368 1365 1369 1366 odev = ofdrm_device_create(&ofdrm_driver, pdev); ··· 1374 1373 if (ret) 1375 1374 return ret; 1376 1375 1377 - color_mode = drm_format_info_bpp(odev->format, 0); 1378 - if (color_mode == 16) 1379 - color_mode = odev->format->depth; // can be 15 or 16 1380 - 1381 - drm_fbdev_shmem_setup(dev, color_mode); 1376 + drm_client_setup(dev, odev->format); 1382 1377 1383 1378 return 0; 1384 1379 }