]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/qxl: Run DRM default client setup
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 24 Sep 2024 07:13:07 +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 qxl 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: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-70-tzimmermann@suse.de
drivers/gpu/drm/qxl/Kconfig
drivers/gpu/drm/qxl/qxl_drv.c

index ca3f51c2a8fe1a383f8a2479f04b5c0b3fb14e44..1992df4a82d278cf46d7e192f72805b63623c1a3 100644 (file)
@@ -2,6 +2,7 @@
 config DRM_QXL
        tristate "QXL virtual GPU"
        depends on DRM && PCI && MMU
+       select DRM_CLIENT_SELECTION
        select DRM_KMS_HELPER
        select DRM_TTM
        select DRM_TTM_HELPER
index 5eb3f5719fdf3cedc07f695e448c324cfeaea672..4ef1c134d6dd7e3d81c0a53aaea84798d077adfb 100644 (file)
@@ -36,6 +36,7 @@
 #include <drm/drm.h>
 #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>
@@ -118,7 +119,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (ret)
                goto modeset_cleanup;
 
-       drm_fbdev_ttm_setup(&qdev->ddev, 32);
+       drm_client_setup(&qdev->ddev, NULL);
        return 0;
 
 modeset_cleanup:
@@ -293,6 +294,7 @@ static struct drm_driver qxl_driver = {
        .debugfs_init = qxl_debugfs_init,
 #endif
        .gem_prime_import_sg_table = qxl_gem_prime_import_sg_table,
+       DRM_FBDEV_TTM_DRIVER_OPS,
        .fops = &qxl_fops,
        .ioctls = qxl_ioctls,
        .num_ioctls = ARRAY_SIZE(qxl_ioctls),