]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/aspeed: Run DRM default client setup
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 24 Sep 2024 07:12:08 +0000 (09:12 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 26 Sep 2024 06:27:56 +0000 (08:27 +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 aspeed 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
v3:
- add DRM_FBDEV_DMA_DRIVER_OPS macro

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-11-tzimmermann@suse.de
drivers/gpu/drm/aspeed/Kconfig
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c

index 8137c39b057bb386a8a109d6ce0d817e91e341ac..6e68f20aac21b1dfb7e5d2c2630abf2b9cf3396f 100644 (file)
@@ -4,6 +4,7 @@ config DRM_ASPEED_GFX
        depends on DRM && OF
        depends on (COMPILE_TEST || ARCH_ASPEED)
        depends on MMU
+       select DRM_CLIENT_SELECTION
        select DRM_KMS_HELPER
        select DRM_GEM_DMA_HELPER
        select DMA_CMA if HAVE_DMA_CONTIGUOUS
index a7a6b70220eb8cc95919e97216d95a9690c82bd9..109023815fa2c6d072bda03eef5ec07658e4e2c8 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/reset.h>
 
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_client_setup.h>
 #include <drm/drm_device.h>
 #include <drm/drm_fbdev_dma.h>
 #include <drm/drm_gem_dma_helper.h>
@@ -247,6 +248,7 @@ DEFINE_DRM_GEM_DMA_FOPS(fops);
 static const struct drm_driver aspeed_gfx_driver = {
        .driver_features        = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
        DRM_GEM_DMA_DRIVER_OPS,
+       DRM_FBDEV_DMA_DRIVER_OPS,
        .fops = &fops,
        .name = "aspeed-gfx-drm",
        .desc = "ASPEED GFX DRM",
@@ -339,7 +341,7 @@ static int aspeed_gfx_probe(struct platform_device *pdev)
        if (ret)
                goto err_unload;
 
-       drm_fbdev_dma_setup(&priv->drm, 32);
+       drm_client_setup(&priv->drm, NULL);
        return 0;
 
 err_unload: