]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/vboxvideo: Run DRM default client setup
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 24 Sep 2024 07:13:08 +0000 (09:13 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 26 Sep 2024 07:31:28 +0000 (09:31 +0200)
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 <tzimmermann@suse.de>
Cc: Hans de Goede <hdegoede@redhat.com>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-71-tzimmermann@suse.de
drivers/gpu/drm/vboxvideo/Kconfig
drivers/gpu/drm/vboxvideo/vbox_drv.c

index 45fe135d6e436e83606a4f99fb55df29f3733738..180e30b82ab974d01b5e7964f645d70eed655217 100644 (file)
@@ -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
index ef36834c8673c93585710adb74a3777392615f0a..49dc337b3e01e56760988e387cff0365afbcacba 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <drm/drm_aperture.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_client_setup.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_fbdev_ttm.h>
 #include <drm/drm_file.h>
@@ -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);