diff options
author | Marek Olšák <marek.olsak@amd.com> | 2018-04-03 13:05:03 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-05-15 14:43:32 -0400 |
commit | d240cd9eddd943dbe0267d081697195ff1e90b65 (patch) | |
tree | ff9648c93738e223b8da42489f5d64aa8caa9895 /drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |
parent | 3f188453faf7ba5b59e8064df4afffbc946e25ec (diff) |
drm/amdgpu: optionally do a writeback but don't invalidate TC for IB fences
There is a new IB flag that enables this new behavior.
Full invalidation is unnecessary for RELEASE_MEM and doesn't make sense
when draw calls from two adjacent gfx IBs run in parallel. This will be
the new default for Mesa.
v2: bump the version
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 97449e06a242..d09fcab2398f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |||
@@ -131,7 +131,8 @@ static u32 amdgpu_fence_read(struct amdgpu_ring *ring) | |||
131 | * Emits a fence command on the requested ring (all asics). | 131 | * Emits a fence command on the requested ring (all asics). |
132 | * Returns 0 on success, -ENOMEM on failure. | 132 | * Returns 0 on success, -ENOMEM on failure. |
133 | */ | 133 | */ |
134 | int amdgpu_fence_emit(struct amdgpu_ring *ring, struct dma_fence **f) | 134 | int amdgpu_fence_emit(struct amdgpu_ring *ring, struct dma_fence **f, |
135 | unsigned flags) | ||
135 | { | 136 | { |
136 | struct amdgpu_device *adev = ring->adev; | 137 | struct amdgpu_device *adev = ring->adev; |
137 | struct amdgpu_fence *fence; | 138 | struct amdgpu_fence *fence; |
@@ -149,7 +150,7 @@ int amdgpu_fence_emit(struct amdgpu_ring *ring, struct dma_fence **f) | |||
149 | adev->fence_context + ring->idx, | 150 | adev->fence_context + ring->idx, |
150 | seq); | 151 | seq); |
151 | amdgpu_ring_emit_fence(ring, ring->fence_drv.gpu_addr, | 152 | amdgpu_ring_emit_fence(ring, ring->fence_drv.gpu_addr, |
152 | seq, AMDGPU_FENCE_FLAG_INT); | 153 | seq, flags | AMDGPU_FENCE_FLAG_INT); |
153 | 154 | ||
154 | ptr = &ring->fence_drv.fences[seq & ring->fence_drv.num_fences_mask]; | 155 | ptr = &ring->fence_drv.fences[seq & ring->fence_drv.num_fences_mask]; |
155 | /* This function can't be called concurrently anyway, otherwise | 156 | /* This function can't be called concurrently anyway, otherwise |