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: Dave Airlie <airl...@redhat.com>
Cc: Sean Paul <s...@poorly.run>
Cc: Thomas Zimmermann <tzimmerm...@suse.de>
Acked-by: Javier Martinez Canillas <javi...@redhat.com>
---
 drivers/gpu/drm/udl/Kconfig   | 1 +
 drivers/gpu/drm/udl/udl_drv.c | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/udl/Kconfig b/drivers/gpu/drm/udl/Kconfig
index c744175c6992..d7a6abef7d78 100644
--- a/drivers/gpu/drm/udl/Kconfig
+++ b/drivers/gpu/drm/udl/Kconfig
@@ -5,6 +5,7 @@ config DRM_UDL
        depends on USB
        depends on USB_ARCH_HAS_HCD
        depends on MMU
+       select DRM_CLIENT_SELECTION
        select DRM_GEM_SHMEM_HELPER
        select DRM_KMS_HELPER
        help
diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c
index 280a09a6e2ad..8d8ae40f945c 100644
--- a/drivers/gpu/drm/udl/udl_drv.c
+++ b/drivers/gpu/drm/udl/udl_drv.c
@@ -6,6 +6,7 @@
 #include <linux/module.h>
 
 #include <drm/drm_drv.h>
+#include <drm/drm_client_setup.h>
 #include <drm/drm_fbdev_shmem.h>
 #include <drm/drm_file.h>
 #include <drm/drm_gem_shmem_helper.h>
@@ -73,6 +74,7 @@ static const struct drm_driver driver = {
        .fops = &udl_driver_fops,
        DRM_GEM_SHMEM_DRIVER_OPS,
        .gem_prime_import = udl_driver_gem_prime_import,
+       DRM_FBDEV_SHMEM_DRIVER_OPS,
 
        .name = DRIVER_NAME,
        .desc = DRIVER_DESC,
@@ -117,7 +119,7 @@ static int udl_usb_probe(struct usb_interface *interface,
 
        DRM_INFO("Initialized udl on minor %d\n", udl->drm.primary->index);
 
-       drm_fbdev_shmem_setup(&udl->drm, 0);
+       drm_client_setup(&udl->drm, NULL);
 
        return 0;
 }
-- 
2.46.0

Reply via email to