aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_svm.h
diff options
context:
space:
mode:
authorJérôme Glisse <jglisse@redhat.com>2018-08-07 16:13:16 -0400
committerBen Skeggs <bskeggs@redhat.com>2019-02-20 09:00:03 +1000
commitf180bf12ac061f093abb9247505f661817973cae (patch)
tree657b1189e1e51a9280d6d66d41b5335a85eb5e80 /drivers/gpu/drm/nouveau/nouveau_svm.h
parentdrm/nouveau/dmem: device memory helpers for SVM (diff)
downloadlinux-dev-f180bf12ac061f093abb9247505f661817973cae.tar.xz
linux-dev-f180bf12ac061f093abb9247505f661817973cae.zip
drm/nouveau/svm: new ioctl to migrate process memory to GPU memory
This add an ioctl to migrate a range of process address space to the device memory. On platform without cache coherent bus (x86, ARM, ...) this means that CPU can not access that range directly, instead CPU will fault which will migrate the memory back to system memory. This is behind a staging flag so that we can evolve the API. Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_svm.h')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_svm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.h b/drivers/gpu/drm/nouveau/nouveau_svm.h
index 0379a1c316ca..e839d8189461 100644
--- a/drivers/gpu/drm/nouveau/nouveau_svm.h
+++ b/drivers/gpu/drm/nouveau/nouveau_svm.h
@@ -17,6 +17,7 @@ int nouveau_svmm_init(struct drm_device *, void *, struct drm_file *);
void nouveau_svmm_fini(struct nouveau_svmm **);
int nouveau_svmm_join(struct nouveau_svmm *, u64 inst);
void nouveau_svmm_part(struct nouveau_svmm *, u64 inst);
+int nouveau_svmm_bind(struct drm_device *, void *, struct drm_file *);
#else /* IS_ENABLED(CONFIG_DRM_NOUVEAU_SVM) */
static inline void nouveau_svm_init(struct nouveau_drm *drm) {}
static inline void nouveau_svm_fini(struct nouveau_drm *drm) {}
@@ -37,5 +38,11 @@ static inline int nouveau_svmm_join(struct nouveau_svmm *svmm, u64 inst)
}
static inline void nouveau_svmm_part(struct nouveau_svmm *svmm, u64 inst) {}
+
+static inline int nouveau_svmm_bind(struct drm_device *device, void *p,
+ struct drm_file *file)
+{
+ return -ENOSYS;
+}
#endif /* IS_ENABLED(CONFIG_DRM_NOUVEAU_SVM) */
#endif