|
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>
|
@@ -836,6 +837,7 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
|
836 | 837 | {
|
837 | 838 | struct nvkm_device *device;
|
838 | 839 | struct nouveau_drm *drm;
|
| 840 | + const struct drm_format_info *format; |
839 | 841 | int ret;
|
840 | 842 |
|
841 | 843 | if (vga_switcheroo_client_probe_defer(pdev))
|
@@ -873,9 +875,11 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
|
873 | 875 | goto fail_pci;
|
874 | 876 |
|
875 | 877 | 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); |
877 | 879 | else
|
878 |
| - drm_fbdev_ttm_setup(drm->dev, 32); |
| 880 | + format = NULL; |
| 881 | + |
| 882 | + drm_client_setup(drm->dev, format); |
879 | 883 |
|
880 | 884 | quirk_broken_nv_runpm(pdev);
|
881 | 885 | return 0;
|
@@ -1317,6 +1321,8 @@ driver_stub = {
|
1317 | 1321 | .dumb_create = nouveau_display_dumb_create,
|
1318 | 1322 | .dumb_map_offset = drm_gem_ttm_dumb_map_offset,
|
1319 | 1323 |
|
| 1324 | + DRM_FBDEV_TTM_DRIVER_OPS, |
| 1325 | + |
1320 | 1326 | .name = DRIVER_NAME,
|
1321 | 1327 | .desc = DRIVER_DESC,
|
1322 | 1328 | #ifdef GIT_REVISION
|
|
0 commit comments