linux-stable/drivers/gpu/drm/nouveau
Alistair Popple 66cee9097e nouveau/svm: Fix to migrate all requested pages
Users may request that pages from an OpenCL SVM allocation be migrated
to the GPU with clEnqueueSVMMigrateMem(). In Nouveau this will call into
nouveau_dmem_migrate_vma() to do the migration. If the total range to be
migrated exceeds SG_MAX_SINGLE_ALLOC the pages will be migrated in
chunks of size SG_MAX_SINGLE_ALLOC. However a typo in updating the
starting address means that only the first chunk will get migrated.

Fix the calculation so that the entire range will get migrated if
possible.

Signed-off-by: Alistair Popple <apopple@nvidia.com>
Fixes: e3d8b08904 ("drm/nouveau/svm: map pages after migration")
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220720062745.960701-1-apopple@nvidia.com
Cc: <stable@vger.kernel.org> # v5.8+
2022-07-28 16:43:31 -04:00
..
dispnv04 drm/nouveau/kms/nv04: use vzalloc for nv04_display 2021-11-12 23:46:04 +01:00
dispnv50 drm/nouveau: use drm_gem_plane_helper_prepare_fb 2022-05-02 09:02:54 +02:00
include drm/nouveau/subdev/bus: Ratelimit logging for fault errors 2022-05-04 14:55:49 -04:00
nvif drm/nouveau: rip out nvkm_client.super 2021-08-18 19:00:15 +10:00
nvkm drm for 5.19-rc1 2022-05-25 16:18:27 -07:00
Kbuild
Kconfig drm/display: Move SCDC helpers into display-helper library 2022-04-25 11:19:37 +02:00
nouveau_abi16.c drm/nouveau: rip out nvkm_client.super 2021-08-18 19:00:15 +10:00
nouveau_abi16.h
nouveau_acpi.c nouveau: ACPI: Use the ACPI_COMPANION() macro directly 2021-10-26 15:48:49 +02:00
nouveau_acpi.h
nouveau_backlight.c drm/nouveau: Fix a potential theorical leak in nouveau_get_backlight_name() 2022-05-06 17:35:00 -04:00
nouveau_bios.c drm/nouveau: Remove unused variable ret 2021-11-12 23:46:04 +01:00
nouveau_bios.h
nouveau_bo.c dma-buf: specify usage while adding fences to dma_resv obj v7 2022-04-07 12:53:53 +02:00
nouveau_bo.h
nouveau_bo0039.c
nouveau_bo74c1.c
nouveau_bo85b5.c
nouveau_bo90b5.c
nouveau_bo5039.c
nouveau_bo9039.c
nouveau_boa0b5.c
nouveau_chan.c drm/nouveau/ga102-: support ttm buffer moves via copy engine 2021-10-06 11:05:45 +02:00
nouveau_chan.h
nouveau_connector.c drm pull for 5.14-rc1 2021-07-01 12:53:43 -07:00
nouveau_connector.h drm: Rename dp/ to display/ 2022-04-25 11:17:45 +02:00
nouveau_crtc.h
nouveau_debugfs.c drm/nouveau: simplify the return expression of nouveau_debugfs_init() 2022-04-29 15:44:54 -04:00
nouveau_debugfs.h
nouveau_display.c drm: introduce fb_modifiers_not_supported flag in mode_config 2022-01-31 21:45:23 +01:00
nouveau_display.h drm/nouveau: Use drm_gem_ttm_dumb_map_offset() 2021-04-11 20:15:13 +02:00
nouveau_dma.c
nouveau_dma.h
nouveau_dmem.c nouveau/svm: Fix to migrate all requested pages 2022-07-28 16:43:31 -04:00
nouveau_dmem.h
nouveau_dp.c drm: Rename dp/ to display/ 2022-04-25 11:17:45 +02:00
nouveau_drm.c drm: Move nomodeset kernel parameter to the DRM subsystem 2021-11-27 13:52:22 +01:00
nouveau_drv.h drm/nouveau: Add a dedicated mutex for the clients list 2021-11-04 12:29:07 +01:00
nouveau_encoder.h drm: Rename dp/ to display/ 2022-04-25 11:17:45 +02:00
nouveau_fbcon.c drm/ttm: rename bo->mem and make it a pointer 2021-06-02 11:07:25 +02:00
nouveau_fbcon.h
nouveau_fence.c drm/nouveau: remove trace_dma_fence_emit 2022-05-04 15:15:56 -04:00
nouveau_fence.h
nouveau_gem.c dma-buf: add enum dma_resv_usage v4 2022-04-07 12:53:53 +02:00
nouveau_gem.h
nouveau_hwmon.c
nouveau_hwmon.h
nouveau_ioc32.c
nouveau_ioctl.h
nouveau_led.c
nouveau_led.h
nouveau_mem.c drm/ttm: add ttm_resource_fini v2 2022-01-26 15:23:51 +01:00
nouveau_mem.h drm/ttm: add ttm_resource_fini v2 2022-01-26 15:23:51 +01:00
nouveau_nvif.c drm/nouveau: rip out nvkm_client.super 2021-08-18 19:00:15 +10:00
nouveau_platform.c
nouveau_platform.h
nouveau_prime.c dma-buf: wait for map to complete for static attachments 2022-04-07 12:53:54 +02:00
nouveau_reg.h
nouveau_sgdma.c drm/ttm: remove ttm_tt_destroy_common v2 2021-08-23 13:54:55 +02:00
nouveau_svm.c drm for 5.18-rc1 2022-03-24 16:19:43 -07:00
nouveau_svm.h
nouveau_ttm.c drm/ttm: add back a reference to the bdev to the res manager 2022-01-26 15:29:24 +01:00
nouveau_ttm.h drm/nouveau: Implement mmap as GEM object function 2021-05-26 20:56:33 +02:00
nouveau_usif.c drm/nouveau: block a bunch of classes from userspace 2021-08-18 19:00:13 +10:00
nouveau_usif.h
nouveau_vga.c vgaarb: don't pass a cookie to vga_client_register 2021-07-21 10:29:10 +02:00
nouveau_vga.h
nouveau_vmm.c drm/ttm: rename bo->mem and make it a pointer 2021-06-02 11:07:25 +02:00
nouveau_vmm.h
nv04_fbcon.c
nv04_fence.c
nv10_fence.c
nv10_fence.h
nv17_fence.c drm/ttm: rename bo->mem and make it a pointer 2021-06-02 11:07:25 +02:00
nv50_display.h
nv50_fbcon.c
nv50_fence.c drm/ttm: rename bo->mem and make it a pointer 2021-06-02 11:07:25 +02:00
nv84_fence.c drm/nouveau/ga102-: support ttm buffer moves via copy engine 2021-10-06 11:05:45 +02:00
nvc0_fbcon.c
nvc0_fence.c