Thomas Zimmermann
2021-Apr-06 09:08 UTC
[Nouveau] [PATCH 2/8] drm/amdgpu: Remove unused function amdgpu_bo_fbdev_mmap()
Remove an unused function. Mapping the fbdev framebuffer is apparently
not supported.
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 19 -------------------
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 --
2 files changed, 21 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index b99e9d8736c2..cfc89164dee8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -1092,25 +1092,6 @@ void amdgpu_bo_fini(struct amdgpu_device *adev)
}
}
-/**
- * amdgpu_bo_fbdev_mmap - mmap fbdev memory
- * @bo: &amdgpu_bo buffer object
- * @vma: vma as input from the fbdev mmap method
- *
- * Calls ttm_fbdev_mmap() to mmap fbdev memory if it is backed by a bo.
- *
- * Returns:
- * 0 for success or a negative error code on failure.
- */
-int amdgpu_bo_fbdev_mmap(struct amdgpu_bo *bo,
- struct vm_area_struct *vma)
-{
- if (vma->vm_pgoff != 0)
- return -EACCES;
-
- return ttm_bo_mmap_obj(vma, &bo->tbo);
-}
-
/**
* amdgpu_bo_set_tiling_flags - set tiling flags
* @bo: &amdgpu_bo buffer object
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
index 54ceb065e546..46e94d413c5c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
@@ -268,8 +268,6 @@ void amdgpu_bo_unpin(struct amdgpu_bo *bo);
int amdgpu_bo_evict_vram(struct amdgpu_device *adev);
int amdgpu_bo_init(struct amdgpu_device *adev);
void amdgpu_bo_fini(struct amdgpu_device *adev);
-int amdgpu_bo_fbdev_mmap(struct amdgpu_bo *bo,
- struct vm_area_struct *vma);
int amdgpu_bo_set_tiling_flags(struct amdgpu_bo *bo, u64 tiling_flags);
void amdgpu_bo_get_tiling_flags(struct amdgpu_bo *bo, u64 *tiling_flags);
int amdgpu_bo_set_metadata (struct amdgpu_bo *bo, void *metadata,
--
2.30.2
Christian König
2021-Apr-06 09:43 UTC
[Nouveau] [PATCH 2/8] drm/amdgpu: Remove unused function amdgpu_bo_fbdev_mmap()
Am 06.04.21 um 11:08 schrieb Thomas Zimmermann:> Remove an unused function. Mapping the fbdev framebuffer is apparently > not supported. > > Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>Reviewed-by: Christian K?nig <christian.koenig at amd.com> Should I just upstream this through our internal branches? Thanks, Christian.> --- > drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 19 ------------------- > drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 -- > 2 files changed, 21 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c > index b99e9d8736c2..cfc89164dee8 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c > @@ -1092,25 +1092,6 @@ void amdgpu_bo_fini(struct amdgpu_device *adev) > } > } > > -/** > - * amdgpu_bo_fbdev_mmap - mmap fbdev memory > - * @bo: &amdgpu_bo buffer object > - * @vma: vma as input from the fbdev mmap method > - * > - * Calls ttm_fbdev_mmap() to mmap fbdev memory if it is backed by a bo. > - * > - * Returns: > - * 0 for success or a negative error code on failure. > - */ > -int amdgpu_bo_fbdev_mmap(struct amdgpu_bo *bo, > - struct vm_area_struct *vma) > -{ > - if (vma->vm_pgoff != 0) > - return -EACCES; > - > - return ttm_bo_mmap_obj(vma, &bo->tbo); > -} > - > /** > * amdgpu_bo_set_tiling_flags - set tiling flags > * @bo: &amdgpu_bo buffer object > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h > index 54ceb065e546..46e94d413c5c 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h > @@ -268,8 +268,6 @@ void amdgpu_bo_unpin(struct amdgpu_bo *bo); > int amdgpu_bo_evict_vram(struct amdgpu_device *adev); > int amdgpu_bo_init(struct amdgpu_device *adev); > void amdgpu_bo_fini(struct amdgpu_device *adev); > -int amdgpu_bo_fbdev_mmap(struct amdgpu_bo *bo, > - struct vm_area_struct *vma); > int amdgpu_bo_set_tiling_flags(struct amdgpu_bo *bo, u64 tiling_flags); > void amdgpu_bo_get_tiling_flags(struct amdgpu_bo *bo, u64 *tiling_flags); > int amdgpu_bo_set_metadata (struct amdgpu_bo *bo, void *metadata,