Skip to content

Commit 677a7cf

Browse files
author
Thomas Zimmermann
committed
drm/hisilicon/hibmc: Run DRM default client setup
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 <[email protected]> Cc: Xinliang Liu <[email protected]> Cc: Tian Tao <[email protected]> Cc: Xinwei Kong <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Yongqin Liu <[email protected]> Cc: John Stultz <[email protected]> Acked-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 32acc28 commit 677a7cf

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/gpu/drm/hisilicon/hibmc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ config DRM_HISI_HIBMC
33
tristate "DRM Support for Hisilicon Hibmc"
44
depends on DRM && PCI && (ARM64 || COMPILE_TEST)
55
depends on MMU
6+
select DRM_CLIENT_SELECTION
67
select DRM_KMS_HELPER
78
select DRM_VRAM_HELPER
89
select DRM_TTM

drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include <drm/drm_aperture.h>
1818
#include <drm/drm_atomic_helper.h>
19+
#include <drm/drm_client_setup.h>
1920
#include <drm/drm_drv.h>
2021
#include <drm/drm_fbdev_ttm.h>
2122
#include <drm/drm_gem_framebuffer_helper.h>
@@ -63,6 +64,7 @@ static const struct drm_driver hibmc_driver = {
6364
.debugfs_init = drm_vram_mm_debugfs_init,
6465
.dumb_create = hibmc_dumb_create,
6566
.dumb_map_offset = drm_gem_ttm_dumb_map_offset,
67+
DRM_FBDEV_TTM_DRIVER_OPS,
6668
};
6769

6870
static int __maybe_unused hibmc_pm_suspend(struct device *dev)
@@ -339,7 +341,7 @@ static int hibmc_pci_probe(struct pci_dev *pdev,
339341
goto err_unload;
340342
}
341343

342-
drm_fbdev_ttm_setup(dev, 32);
344+
drm_client_setup(dev, NULL);
343345

344346
return 0;
345347

0 commit comments

Comments
 (0)