[PATCH 3/5] drm/amdgpu: shadow BOs don't need any alignment

Zhang, Jerry(Junwei) Jerry.Zhang at amd.com
Thu Sep 13 09:30:03 UTC 2018


On 09/11/2018 05:56 PM, Christian König wrote:
> They aren't directly used by the hardware.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 7db0040ca145..3a6f92de5504 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -516,7 +516,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev,
>   }
>   
>   static int amdgpu_bo_create_shadow(struct amdgpu_device *adev,
> -				   unsigned long size, int byte_align,
> +				   unsigned long size,
>   				   struct amdgpu_bo *bo)
>   {
>   	struct amdgpu_bo_param bp;
> @@ -527,7 +527,6 @@ static int amdgpu_bo_create_shadow(struct amdgpu_device *adev,
>   
>   	memset(&bp, 0, sizeof(bp));
>   	bp.size = size;
> -	bp.byte_align = byte_align;
>   	bp.domain = AMDGPU_GEM_DOMAIN_GTT;
>   	bp.flags = AMDGPU_GEM_CREATE_CPU_GTT_USWC |
>   		AMDGPU_GEM_CREATE_SHADOW;
> @@ -576,7 +575,7 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
>   			WARN_ON(reservation_object_lock((*bo_ptr)->tbo.resv,
>   							NULL));
>   
> -		r = amdgpu_bo_create_shadow(adev, bp->size, bp->byte_align, (*bo_ptr));
> +		r = amdgpu_bo_create_shadow(adev, bp->size, *bo_ptr);
>   
>   		if (!bp->resv)
>   			reservation_object_unlock((*bo_ptr)->tbo.resv);



More information about the amd-gfx mailing list