[PATCH v5 70/80] drm/vboxvideo: Run DRM default client setup
Thomas Zimmermann
tzimmermann at suse.de
Tue Sep 24 07:13:08 UTC 2024
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 at suse.de>
Cc: Hans de Goede <hdegoede at redhat.com>
Acked-by: Javier Martinez Canillas <javierm at redhat.com>
---
drivers/gpu/drm/vboxvideo/Kconfig | 1 +
drivers/gpu/drm/vboxvideo/vbox_drv.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vboxvideo/Kconfig b/drivers/gpu/drm/vboxvideo/Kconfig
index 45fe135d6e43..180e30b82ab9 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 ef36834c8673..49dc337b3e01 100644
--- a/drivers/gpu/drm/vboxvideo/vbox_drv.c
+++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c
@@ -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);
--
2.46.0
More information about the Intel-gfx
mailing list