diff options
author | 2022-10-19 23:29:34 +1100 | |
---|---|---|
committer | 2022-10-21 16:02:35 -0400 | |
commit | 1beca7f1471e14802f7f6730ac9ac0a3de7c8f8b (patch) | |
tree | 9139b53e524bce226557ce787dd9edcd668a689b /drivers/gpu/drm/nouveau/nouveau_dmem.c | |
parent | drm/panel-edp: Add INX N116BGE-EA2 (HW: C4) (diff) | |
download | linux-1beca7f1471e14802f7f6730ac9ac0a3de7c8f8b.tar.gz linux-1beca7f1471e14802f7f6730ac9ac0a3de7c8f8b.tar.bz2 linux-1beca7f1471e14802f7f6730ac9ac0a3de7c8f8b.zip |
nouveau: Fix migrate_to_ram() for faulting page
Commit 16ce101db85d ("mm/memory.c: fix race when faulting a device private
page") changed the migrate_to_ram() callback to take a reference on the
device page to ensure it can't be freed while handling the fault.
Unfortunately the corresponding update to Nouveau to accommodate this
change was inadvertently dropped from that patch causing GPU to CPU
migration to fail so add it here.
Signed-off-by: Alistair Popple <apopple@nvidia.com>
Fixes: 16ce101db85d ("mm/memory.c: fix race when faulting a device private page")
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221019122934.866205-1-apopple@nvidia.com
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_dmem.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_dmem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c index 5fe209107246..20fe53815b20 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dmem.c +++ b/drivers/gpu/drm/nouveau/nouveau_dmem.c @@ -176,6 +176,7 @@ static vm_fault_t nouveau_dmem_migrate_to_ram(struct vm_fault *vmf) .src = &src, .dst = &dst, .pgmap_owner = drm->dev, + .fault_page = vmf->page, .flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE, }; |