[PATCH 1/2] drm/amd/amdgpu: set allow_reserved_eviction and resv when bo allocation and cs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2017-12-14 09:12 AM, Roger He wrote:
> Change-Id: I0c6571c2a64e6c5bdad80ccbcccb40eba1c20b4e
> Signed-off-by: Roger He <Hongbo.He at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c     | 6 +++++-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 7 ++++++-
>  2 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index 44523a8..ace6152 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -343,7 +343,11 @@ static int amdgpu_cs_bo_validate(struct amdgpu_cs_parser *p,
>  				 struct amdgpu_bo *bo)
>  {
>  	struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
> -	struct ttm_operation_ctx ctx = { true, false };
> +	struct ttm_operation_ctx ctx = {
> +		.interruptible = true,
> +		.no_wait_gpu = false,
> +		.resv = bo->tbo.resv
> +	};

Might be better to explicitly initialize

		.allow_reserved_eviction = false,

here as well.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux