Skip to content

Commit 5c88e3b

Browse files
JinzhouSualexdeucher
authored andcommitted
drm/amdgpu: Add mem sync flag for IB allocated by SA
The buffer of SA bo will be used by many cases. So it's better to invalidate the cache of indirect buffer allocated by SA before commit the IB. Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent ceb47e0 commit 5c88e3b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ int amdgpu_ib_get(struct amdgpu_device *adev, struct amdgpu_vm *vm,
7676
}
7777

7878
ib->ptr = amdgpu_sa_bo_cpu_addr(ib->sa_bo);
79+
/* flush the cache before commit the IB */
80+
ib->flags = AMDGPU_IB_FLAG_EMIT_MEM_SYNC;
7981

8082
if (!vm)
8183
ib->gpu_addr = amdgpu_sa_bo_gpu_addr(ib->sa_bo);

0 commit comments

Comments
 (0)