Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/nouveau: 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 nouveau driver specifies a preferred color mode depending on
the available video memory, with a default of 32. Adapt this for
the new client interface.

v5:
- select DRM_CLIENT_SELECTION
v2:
- style changes

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Karol Herbst <kherbst@redhat.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Danilo Krummrich <dakr@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-69-tzimmermann@suse.de

+9 -2
+1
drivers/gpu/drm/nouveau/Kconfig
··· 4 4 depends on DRM && PCI && MMU 5 5 select IOMMU_API 6 6 select FW_LOADER 7 + select DRM_CLIENT_SELECTION 7 8 select DRM_DISPLAY_DP_HELPER 8 9 select DRM_DISPLAY_HDMI_HELPER 9 10 select DRM_DISPLAY_HELPER
+8 -2
drivers/gpu/drm/nouveau/nouveau_drm.c
··· 31 31 #include <linux/dynamic_debug.h> 32 32 33 33 #include <drm/drm_aperture.h> 34 + #include <drm/drm_client_setup.h> 34 35 #include <drm/drm_drv.h> 35 36 #include <drm/drm_fbdev_ttm.h> 36 37 #include <drm/drm_gem_ttm_helper.h> ··· 837 836 { 838 837 struct nvkm_device *device; 839 838 struct nouveau_drm *drm; 839 + const struct drm_format_info *format; 840 840 int ret; 841 841 842 842 if (vga_switcheroo_client_probe_defer(pdev)) ··· 875 873 goto fail_pci; 876 874 877 875 if (drm->client.device.info.ram_size <= 32 * 1024 * 1024) 878 - drm_fbdev_ttm_setup(drm->dev, 8); 876 + format = drm_format_info(DRM_FORMAT_C8); 879 877 else 880 - drm_fbdev_ttm_setup(drm->dev, 32); 878 + format = NULL; 879 + 880 + drm_client_setup(drm->dev, format); 881 881 882 882 quirk_broken_nv_runpm(pdev); 883 883 return 0; ··· 1320 1316 1321 1317 .dumb_create = nouveau_display_dumb_create, 1322 1318 .dumb_map_offset = drm_gem_ttm_dumb_map_offset, 1319 + 1320 + DRM_FBDEV_TTM_DRIVER_OPS, 1323 1321 1324 1322 .name = DRIVER_NAME, 1325 1323 .desc = DRIVER_DESC,