aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
diff options
context:
space:
mode:
authorAndres Rodriguez <andresx7@gmail.com>2017-03-17 14:30:15 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-05-31 16:49:03 -0400
commit6065343a116fce16f7523ab10841efd942ce612d (patch)
treec21ee48ee40775c1705cdd931b28ddb643be8f91 /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
parent795f2813e628bcf57a69f2dfe413360d14a1d7f4 (diff)
drm/amdgpu: guarantee bijective mapping of ring ids for LRU v3
Depending on usage patterns, the current LRU policy may create a non-injective mapping between userspace ring ids and kernel rings. This behaviour is undesired as apps that attempt to fill all HW blocks would be unable to reach some of them. This change forces the LRU policy to create bijective mappings only. v2: compress ring_blacklist v3: simplify amdgpu_ring_is_blacklisted() logic Signed-off-by: Andres Rodriguez <andresx7@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
index 577528a9af0b..a1dd9077c064 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
@@ -201,8 +201,8 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
201 unsigned ring_size, struct amdgpu_irq_src *irq_src, 201 unsigned ring_size, struct amdgpu_irq_src *irq_src,
202 unsigned irq_type); 202 unsigned irq_type);
203void amdgpu_ring_fini(struct amdgpu_ring *ring); 203void amdgpu_ring_fini(struct amdgpu_ring *ring);
204int amdgpu_ring_lru_get(struct amdgpu_device *adev, int hw_ip, 204int amdgpu_ring_lru_get(struct amdgpu_device *adev, int type, int *blacklist,
205 struct amdgpu_ring **ring); 205 int num_blacklist, struct amdgpu_ring **ring);
206void amdgpu_ring_lru_touch(struct amdgpu_device *adev, struct amdgpu_ring *ring); 206void amdgpu_ring_lru_touch(struct amdgpu_device *adev, struct amdgpu_ring *ring);
207static inline void amdgpu_ring_clear_ring(struct amdgpu_ring *ring) 207static inline void amdgpu_ring_clear_ring(struct amdgpu_ring *ring)
208{ 208{