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)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 7 Apr 2020 04:37:49 +0000 (14:37 +1000)
commit822cab6150d3002952407a8297ff5a0d32bb7b54
tree44a2cf84efff5405d84335be93bde96c24d8d0a8
parentb92103b559c77abc5f8b7bec269230a219c880b7
drm/nouveau/svm: check for SVM initialized before migrating

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>
drivers/gpu/drm/nouveau/nouveau_svm.c