Skip to content

Commit ad61f5f

Browse files
Ralph CampbellBen Skeggs
authored andcommitted
drm/nouveau/svm: fix migrate page regression
The patch to add zero page migration to GPU memory inadvertently included part of a future change which broke normal page migration to GPU memory by copying too much data and corrupting GPU memory. Fix this by only copying one page instead of a byte count. Fixes: 9d4296a ("drm/nouveau/nouveau/hmm: fix migrate zero page to GPU") Signed-off-by: Ralph Campbell <[email protected]> Reviewed-by: John Hubbard <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
1 parent 0156e76 commit ad61f5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/nouveau/nouveau_dmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ static unsigned long nouveau_dmem_migrate_copy_one(struct nouveau_drm *drm,
550550
DMA_BIDIRECTIONAL);
551551
if (dma_mapping_error(dev, *dma_addr))
552552
goto out_free_page;
553-
if (drm->dmem->migrate.copy_func(drm, page_size(spage),
553+
if (drm->dmem->migrate.copy_func(drm, 1,
554554
NOUVEAU_APER_VRAM, paddr, NOUVEAU_APER_HOST, *dma_addr))
555555
goto out_dma_unmap;
556556
} else {

0 commit comments

Comments
 (0)