drm/nouveau/svm: check for SVM initialized before migrating
authorRalph Campbell <rcampbell@nvidia.com>
Wed, 4 Mar 2020 00:13:37 +0000 (16:13 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Apr 2020 08:36:36 +0000 (10:36 +0200)
commitf3955f1e58bec57ee2176aa81e6521461e977454
tree0530bd36f72490d88a3186cb95876459fd4aecc0
parenta825ce86ebeddcb8467528297c5425fc5cd5edd8
drm/nouveau/svm: check for SVM initialized before migrating

[ Upstream commit 822cab6150d3002952407a8297ff5a0d32bb7b54 ]

When migrating system memory to GPU memory, check that SVM has been
enabled. Even though most errors can be ignored since migration is
a performance optimization, return an error because this is a violation
of the API.

Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/nouveau/nouveau_svm.c