Skip to content

Commit 4269f5c

Browse files
author
Thomas Zimmermann
committed
drm/loongson: 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 loongson 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: Sui Jingfeng <[email protected]> Acked-by: Sui Jingfeng <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 677a7cf commit 4269f5c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/gpu/drm/loongson/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ config DRM_LOONGSON
44
tristate "DRM support for Loongson Graphics"
55
depends on DRM && PCI && MMU
66
depends on LOONGARCH || MIPS || COMPILE_TEST
7+
select DRM_CLIENT_SELECTION
78
select DRM_KMS_HELPER
89
select DRM_TTM
910
select DRM_TTM_HELPER

drivers/gpu/drm/loongson/lsdc_drv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <drm/drm_aperture.h>
1010
#include <drm/drm_atomic.h>
1111
#include <drm/drm_atomic_helper.h>
12+
#include <drm/drm_client_setup.h>
1213
#include <drm/drm_drv.h>
1314
#include <drm/drm_fbdev_ttm.h>
1415
#include <drm/drm_gem_framebuffer_helper.h>
@@ -47,6 +48,7 @@ static const struct drm_driver lsdc_drm_driver = {
4748
.dumb_create = lsdc_dumb_create,
4849
.dumb_map_offset = lsdc_dumb_map_offset,
4950
.gem_prime_import_sg_table = lsdc_prime_import_sg_table,
51+
DRM_FBDEV_TTM_DRIVER_OPS,
5052
};
5153

5254
static const struct drm_mode_config_funcs lsdc_mode_config_funcs = {
@@ -314,7 +316,7 @@ static int lsdc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
314316
if (ret)
315317
return ret;
316318

317-
drm_fbdev_ttm_setup(ddev, 32);
319+
drm_client_setup(ddev, NULL);
318320

319321
return 0;
320322
}

0 commit comments

Comments
 (0)