drm/amdgpu: guarantee bijective mapping of ring ids for LRU v3
authorAndres Rodriguez <andresx7@gmail.com>
Fri, 17 Mar 2017 18:30:15 +0000 (14:30 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 31 May 2017 20:49:03 +0000 (16:49 -0400)
commit6065343a116fce16f7523ab10841efd942ce612d
treec21ee48ee40775c1705cdd931b28ddb643be8f91
parent795f2813e628bcf57a69f2dfe413360d14a1d7f4
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h