[PATCH 5/6] drm/ttm: Add destroy flag in TTM BO eviction interface
Thomas Hellström (Intel)
thomas_os at shipmail.org
Wed Jun 10 10:25:52 UTC 2020
On 5/9/20 8:51 PM, Andrey Grodzovsky wrote:
> This will allow to invalidate, destroy backing storage and notify users
> of BOs when device is unpluged.
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
Please add a motivation in the commit message and use imperative wording
("Allow to invalidate..." instead of "This will allow to")
s /unpluged/unplugged/
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
> drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +-
> drivers/gpu/drm/qxl/qxl_object.c | 4 +--
> drivers/gpu/drm/radeon/radeon_object.c | 2 +-
> drivers/gpu/drm/ttm/ttm_bo.c | 41 ++++++++++++++++++-----------
> drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 6 ++---
> include/drm/ttm/ttm_bo_api.h | 2 +-
> 8 files changed, 35 insertions(+), 26 deletions(-)
>
> diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
> index b9bc1b0..9d57b8c 100644
> --- a/include/drm/ttm/ttm_bo_api.h
> +++ b/include/drm/ttm/ttm_bo_api.h
> @@ -597,7 +597,7 @@ int ttm_bo_clean_mm(struct ttm_bo_device *bdev, unsigned mem_type);
> * -ERESTARTSYS: The call was interrupted by a signal while waiting to
> * evict a buffer.
> */
Please also update the function documentation.
> -int ttm_bo_evict_mm(struct ttm_bo_device *bdev, unsigned mem_type);
> +int ttm_bo_evict_mm(struct ttm_bo_device *bdev, unsigned mem_type, bool destroy);
>
> /**
> * ttm_kmap_obj_virtual
Thanks,
Thomas
More information about the amd-gfx
mailing list