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.

Signed-off-by: Thomas Zimmermann <tzimmerm...@suse.de>
Cc: Dave Airlie <airl...@redhat.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
---
 drivers/gpu/drm/qxl/qxl_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
index 5eb3f5719fdf..4ef1c134d6dd 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.c
+++ b/drivers/gpu/drm/qxl/qxl_drv.c
@@ -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),
-- 
2.46.0

Reply via email to