diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2021-05-25 17:10:50 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2021-05-26 20:56:23 +0200 |
commit | 71df0368e9b66afeb1fdb92a88be1a98cc25f310 (patch) | |
tree | 2b88575bed5e07fca072d28a77c9cffa151953a3 /drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h | |
parent | ccd9fe972c4d083b8716205dc56acf55fd837ea0 (diff) | |
download | linux-stable-71df0368e9b66afeb1fdb92a88be1a98cc25f310.tar.gz linux-stable-71df0368e9b66afeb1fdb92a88be1a98cc25f310.tar.bz2 linux-stable-71df0368e9b66afeb1fdb92a88be1a98cc25f310.zip |
drm/amdgpu: Implement mmap as GEM object function
Moving the driver-specific mmap code into a GEM object function allows
for using DRM helpers for various mmap callbacks.
This change resolves several inconsistencies between regular mmap and
prime-based mmap. The vm_ops field in vma is now set for all mmap'ed
areas. Previously it way only set for regular mmap calls, prime-based
mmap used TTM's default vm_ops. The function amdgpu_verify_access() is
no longer being called and therefore removed by this patch.
As a side effect, amdgpu_ttm_vm_ops and amdgpu_ttm_fault() are now
implemented in amdgpu's GEM code.
v4:
* rebased
v3:
* rename mmap function to amdgpu_gem_object_mmap() (Christian)
* remove unnecessary checks from mmap (Christian)
v2:
* rename amdgpu_ttm_vm_ops and amdgpu_ttm_fault() to
amdgpu_gem_vm_ops and amdgpu_gem_fault() (Christian)
* the check for kfd_bo has meanwhile been removed
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210525151055.8174-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h index 39b5b9616fd8..3e93b9b407a9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h @@ -31,8 +31,6 @@ struct drm_gem_object *amdgpu_gem_prime_import(struct drm_device *dev, struct dma_buf *dma_buf); bool amdgpu_dmabuf_is_xgmi_accessible(struct amdgpu_device *adev, struct amdgpu_bo *bo); -int amdgpu_gem_prime_mmap(struct drm_gem_object *obj, - struct vm_area_struct *vma); extern const struct dma_buf_ops amdgpu_dmabuf_ops; |