浏览代码

drm/amdgpu: don't try to move pinned BOs

Never try to move pinned BOs during CS.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Christian König 8 年之前
父节点
当前提交
6edc6910ba
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

+ 4 - 0
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

@@ -409,6 +409,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 */