]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
drm/ttm: Restore ttm prefaulting
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 12 Sep 2019 18:38:54 +0000 (20:38 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 17:46:50 +0000 (18:46 +0100)
commit6bbc8fb4aa81c3774919fa84eeea703edf23695b
tree0770fb2670442733361c36b8b56cb00496524cb6
parentae66b0be086bd79d7fbf0097e2ca8fa3dee7d598
drm/ttm: Restore ttm prefaulting

BugLink: https://bugs.launchpad.net/bugs/1850456
commit 941f2f72dbbe0cf8c2d6e0b180a8021a0ec477fa upstream.

Commit 4daa4fba3a38 ("gpu: drm: ttm: Adding new return type vm_fault_t")
broke TTM prefaulting. Since vmf_insert_mixed() typically always returns
VM_FAULT_NOPAGE, prefaulting stops after the second PTE.

Restore (almost) the original behaviour. Unfortunately we can no longer
with the new vm_fault_t return type determine whether a prefaulting
PTE insertion hit an already populated PTE, and terminate the insertion
loop. Instead we continue with the pre-determined number of prefaults.

Fixes: 4daa4fba3a38 ("gpu: drm: ttm: Adding new return type vm_fault_t")
Cc: Souptick Joarder <jrdr.linux@gmail.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/330387/
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/gpu/drm/ttm/ttm_bo_vm.c