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.

v5:
- select DRM_CLIENT_SELECTION

Signed-off-by: Thomas Zimmermann <tzimmerm...@suse.de>
Cc: "Noralf Trønnes" <nor...@tronnes.org>
Acked-by: Noralf Trønnes <nor...@tronnes.org>
---
 drivers/gpu/drm/gud/Kconfig   | 1 +
 drivers/gpu/drm/gud/gud_drv.c | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/gud/Kconfig b/drivers/gpu/drm/gud/Kconfig
index 9c1e61f9eec3..b4d2136942f0 100644
--- a/drivers/gpu/drm/gud/Kconfig
+++ b/drivers/gpu/drm/gud/Kconfig
@@ -4,6 +4,7 @@ config DRM_GUD
        tristate "GUD USB Display"
        depends on DRM && USB && MMU
        select LZ4_COMPRESS
+       select DRM_CLIENT_SELECTION
        select DRM_KMS_HELPER
        select DRM_GEM_SHMEM_HELPER
        select BACKLIGHT_CLASS_DEVICE
diff --git a/drivers/gpu/drm/gud/gud_drv.c b/drivers/gpu/drm/gud/gud_drv.c
index ac6bbf920c72..09ccdc1dc1a2 100644
--- a/drivers/gpu/drm/gud/gud_drv.c
+++ b/drivers/gpu/drm/gud/gud_drv.c
@@ -15,6 +15,7 @@
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_blend.h>
+#include <drm/drm_client_setup.h>
 #include <drm/drm_damage_helper.h>
 #include <drm/drm_debugfs.h>
 #include <drm/drm_drv.h>
@@ -376,6 +377,7 @@ static const struct drm_driver gud_drm_driver = {
        .fops                   = &gud_fops,
        DRM_GEM_SHMEM_DRIVER_OPS,
        .gem_prime_import       = gud_gem_prime_import,
+       DRM_FBDEV_SHMEM_DRIVER_OPS,
 
        .name                   = "gud",
        .desc                   = "Generic USB Display",
@@ -622,7 +624,7 @@ static int gud_probe(struct usb_interface *intf, const 
struct usb_device_id *id)
 
        drm_kms_helper_poll_init(drm);
 
-       drm_fbdev_shmem_setup(drm, 0);
+       drm_client_setup(drm, NULL);
 
        return 0;
 }
-- 
2.46.0

Reply via email to