mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
drm/amdgpu: Add mem sync flag for IB allocated by SA
[ Upstream commit 5c88e3b86a ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8be5e713f7
commit
5b02d6efdb
@@ -75,6 +75,8 @@ int amdgpu_ib_get(struct amdgpu_device *adev, struct amdgpu_vm *vm,
|
||||
}
|
||||
|
||||
ib->ptr = amdgpu_sa_bo_cpu_addr(ib->sa_bo);
|
||||
/* flush the cache before commit the IB */
|
||||
ib->flags = AMDGPU_IB_FLAG_EMIT_MEM_SYNC;
|
||||
|
||||
if (!vm)
|
||||
ib->gpu_addr = amdgpu_sa_bo_gpu_addr(ib->sa_bo);
|
||||
|
||||
Reference in New Issue
Block a user