Skip to content

Commit 1339120

Browse files
committed
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 <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
1 parent 92c1354 commit 1339120

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/gpu/drm/vboxvideo/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
config DRM_VBOXVIDEO
33
tristate "Virtual Box Graphics Card"
44
depends on DRM && X86 && PCI
5+
select DRM_CLIENT_SELECTION
56
select DRM_KMS_HELPER
67
select DRM_VRAM_HELPER
78
select DRM_TTM

drivers/gpu/drm/vboxvideo/vbox_drv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include <drm/drm_aperture.h>
1515
#include <drm/drm_atomic_helper.h>
16+
#include <drm/drm_client_setup.h>
1617
#include <drm/drm_drv.h>
1718
#include <drm/drm_fbdev_ttm.h>
1819
#include <drm/drm_file.h>
@@ -80,7 +81,7 @@ static int vbox_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
8081
if (ret)
8182
goto err_irq_fini;
8283

83-
drm_fbdev_ttm_setup(&vbox->ddev, 32);
84+
drm_client_setup(&vbox->ddev, NULL);
8485

8586
return 0;
8687

@@ -193,6 +194,7 @@ static const struct drm_driver driver = {
193194
.patchlevel = DRIVER_PATCHLEVEL,
194195

195196
DRM_GEM_VRAM_DRIVER,
197+
DRM_FBDEV_TTM_DRIVER_OPS,
196198
};
197199

198200
drm_module_pci_driver_if_modeset(vbox_pci_driver, vbox_modeset);

0 commit comments

Comments
 (0)