From: Thomas Zimmermann Date: Tue, 24 Sep 2024 07:13:08 +0000 (+0200) Subject: drm/vboxvideo: Run DRM default client setup X-Git-Tag: v6.13-rc1~122^2~22^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=13391209a1226226631292316316462afd034540;p=thirdparty%2Flinux.git drm/vboxvideo: Run 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. The vboxvideo driver specifies a preferred color mode of 32. As this is the default if no format has been given, leave it out entirely. v5: - select DRM_CLIENT_SELECTION Signed-off-by: Thomas Zimmermann Cc: Hans de Goede Acked-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-71-tzimmermann@suse.de --- diff --git a/drivers/gpu/drm/vboxvideo/Kconfig b/drivers/gpu/drm/vboxvideo/Kconfig index 45fe135d6e436..180e30b82ab97 100644 --- a/drivers/gpu/drm/vboxvideo/Kconfig +++ b/drivers/gpu/drm/vboxvideo/Kconfig @@ -2,6 +2,7 @@ config DRM_VBOXVIDEO tristate "Virtual Box Graphics Card" depends on DRM && X86 && PCI + select DRM_CLIENT_SELECTION select DRM_KMS_HELPER select DRM_VRAM_HELPER select DRM_TTM diff --git a/drivers/gpu/drm/vboxvideo/vbox_drv.c b/drivers/gpu/drm/vboxvideo/vbox_drv.c index ef36834c8673c..49dc337b3e01e 100644 --- a/drivers/gpu/drm/vboxvideo/vbox_drv.c +++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -80,7 +81,7 @@ static int vbox_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (ret) goto err_irq_fini; - drm_fbdev_ttm_setup(&vbox->ddev, 32); + drm_client_setup(&vbox->ddev, NULL); return 0; @@ -193,6 +194,7 @@ static const struct drm_driver driver = { .patchlevel = DRIVER_PATCHLEVEL, DRM_GEM_VRAM_DRIVER, + DRM_FBDEV_TTM_DRIVER_OPS, }; drm_module_pci_driver_if_modeset(vbox_pci_driver, vbox_modeset);