On 2017-11-24 11:46 AM, Christian König wrote:
> Never try to move pinned BOs during CS.
> 
> Signed-off-by: Christian König <christian.koe...@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index dbae7411e754..d15836b4826a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -414,6 +414,10 @@ static bool amdgpu_cs_try_evict(struct amdgpu_cs_parser 
> *p,
>               if (candidate->robj == validated)
>                       break;
>  
> +             /* We can't move pinned BOs here */
> +             if (bo->pin_count)
> +                     continue;
> +
>               other = amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type);
>  
>               /* Check if this BO is in one of the domains we need space for 
> */
> 

Reviewed-by: Michel Dänzer <michel.daen...@amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to