]> git.baikalelectronics.ru Git - kernel.git/commit
nouveau: simplify nouveau_dmem_migrate_vma
authorChristoph Hellwig <hch@lst.de>
Wed, 14 Aug 2019 07:59:25 +0000 (09:59 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 20 Aug 2019 12:35:03 +0000 (09:35 -0300)
commit12bcf5c1d7a4ab78cbd589c7452d791aee1dc57b
treecaf65df64a1218e944affc98ef691c0f959a18ed
parent6fe648a49abdc7a9cbc8f92f72f23769938177b8
nouveau: simplify nouveau_dmem_migrate_vma

Factor the main copy page to vram routine out into a helper that acts
on a single page and which doesn't require the nouveau_dmem_migrate
structure for argument passing.  As an added benefit the new version
only allocates the dma address array once and reuses it for each
subsequent chunk of work.

Link: https://lore.kernel.org/r/20190814075928.23766-8-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com>
Tested-by: Ralph Campbell <rcampbell@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/gpu/drm/nouveau/nouveau_dmem.c