]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/hisilicon/hibmc: Run DRM default client setup
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 24 Sep 2024 07:13:04 +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 hibmc 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: Xinliang Liu <xinliang.liu@linaro.org>
Cc: Tian Tao <tiantao6@hisilicon.com>
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Yongqin Liu <yongqin.liu@linaro.org>
Cc: John Stultz <jstultz@google.com>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-67-tzimmermann@suse.de
drivers/gpu/drm/hisilicon/hibmc/Kconfig
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c

index 126504318a4f9c1190031a2213ac9238bbf0e427..80253d39664ab11405f94693fbba357da939bbdc 100644 (file)
@@ -3,6 +3,7 @@ config DRM_HISI_HIBMC
        tristate "DRM Support for Hisilicon Hibmc"
        depends on DRM && PCI && (ARM64 || COMPILE_TEST)
        depends on MMU
+       select DRM_CLIENT_SELECTION
        select DRM_KMS_HELPER
        select DRM_VRAM_HELPER
        select DRM_TTM
index 9f9b19ea05879974ea6c8ca4e675b3aef04ab288..866a9ecaf8b902de47f42e152a77f98d3f629a50 100644 (file)
@@ -16,6 +16,7 @@
 
 #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_gem_framebuffer_helper.h>
@@ -63,6 +64,7 @@ static const struct drm_driver hibmc_driver = {
        .debugfs_init           = drm_vram_mm_debugfs_init,
        .dumb_create            = hibmc_dumb_create,
        .dumb_map_offset        = drm_gem_ttm_dumb_map_offset,
+       DRM_FBDEV_TTM_DRIVER_OPS,
 };
 
 static int __maybe_unused hibmc_pm_suspend(struct device *dev)
@@ -339,7 +341,7 @@ static int hibmc_pci_probe(struct pci_dev *pdev,
                goto err_unload;
        }
 
-       drm_fbdev_ttm_setup(dev, 32);
+       drm_client_setup(dev, NULL);
 
        return 0;