Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 47b596b

Browse files
Thomas ZimmermannCarlos Llamas
authored andcommitted
UPSTREAM: drm/nouveau: Run DRM default client setup
[ Upstream commit ef35089 ] 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 Change-Id: I97eb0debf054ba4b440e6ba49541e5ac76832df1 Signed-off-by: Thomas Zimmermann <[email protected]> Cc: Karol Herbst <[email protected]> Cc: Lyude Paul <[email protected]> Cc: Danilo Krummrich <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Stable-dep-of: 6b481ab ("drm/nouveau: select FW caching") Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 7fc4fd8) Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0ec7636 commit 47b596b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

drivers/gpu/drm/nouveau/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ config DRM_NOUVEAU
44
depends on DRM && PCI && MMU
55
select IOMMU_API
66
select FW_LOADER
7+
select DRM_CLIENT_SELECTION
78
select DRM_DISPLAY_DP_HELPER
89
select DRM_DISPLAY_HDMI_HELPER
910
select DRM_DISPLAY_HELPER

drivers/gpu/drm/nouveau/nouveau_drm.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <linux/dynamic_debug.h>
3232

3333
#include <drm/drm_aperture.h>
34+
#include <drm/drm_client_setup.h>
3435
#include <drm/drm_drv.h>
3536
#include <drm/drm_fbdev_ttm.h>
3637
#include <drm/drm_gem_ttm_helper.h>
@@ -836,6 +837,7 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
836837
{
837838
struct nvkm_device *device;
838839
struct nouveau_drm *drm;
840+
const struct drm_format_info *format;
839841
int ret;
840842

841843
if (vga_switcheroo_client_probe_defer(pdev))
@@ -873,9 +875,11 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
873875
goto fail_pci;
874876

875877
if (drm->client.device.info.ram_size <= 32 * 1024 * 1024)
876-
drm_fbdev_ttm_setup(drm->dev, 8);
878+
format = drm_format_info(DRM_FORMAT_C8);
877879
else
878-
drm_fbdev_ttm_setup(drm->dev, 32);
880+
format = NULL;
881+
882+
drm_client_setup(drm->dev, format);
879883

880884
quirk_broken_nv_runpm(pdev);
881885
return 0;
@@ -1318,6 +1322,8 @@ driver_stub = {
13181322
.dumb_create = nouveau_display_dumb_create,
13191323
.dumb_map_offset = drm_gem_ttm_dumb_map_offset,
13201324

1325+
DRM_FBDEV_TTM_DRIVER_OPS,
1326+
13211327
.name = DRIVER_NAME,
13221328
.desc = DRIVER_DESC,
13231329
#ifdef GIT_REVISION

0 commit comments

Comments
 (0)