Skip to content

Commit 926c79a

Browse files
prliangpubalexdeucher
authored andcommitted
drm/amdgpu: promote the implicit sync to the dependent read fences
The driver doesn't want to implicitly sync on the DMA_RESV_USAGE_BOOKKEEP usage fences, and the BOOKEEP fences should be synced explicitly. So, as the VM implicit syncing only need to return and sync the dependent read fences. Signed-off-by: Prike Liang <Prike.Liang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 6edc896 commit 926c79a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,8 @@ int amdgpu_sync_resv(struct amdgpu_device *adev, struct amdgpu_sync *sync,
249249

250250
if (resv == NULL)
251251
return -EINVAL;
252-
253-
/* TODO: Use DMA_RESV_USAGE_READ here */
254-
dma_resv_for_each_fence(&cursor, resv, DMA_RESV_USAGE_BOOKKEEP, f) {
252+
/* Implicitly sync only to KERNEL, WRITE and READ */
253+
dma_resv_for_each_fence(&cursor, resv, DMA_RESV_USAGE_READ, f) {
255254
dma_fence_chain_for_each(f, f) {
256255
struct dma_fence *tmp = dma_fence_chain_contained(f);
257256

0 commit comments

Comments
 (0)