drm/amdkfd: fix the wrong sdma instance query for renoir
authorHuang Rui <ray.huang@amd.com>
Tue, 11 Aug 2020 05:54:56 +0000 (13:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:29:37 +0000 (11:29 +0200)
commit3636ca3d046f436e44ce5e8b8e3a4b82cdb5dd19
tree27b3c401dc09f0d26c73b8fa73ebcd33f6a39a27
parenteb9f5a5bf4022d93dea362f7c4c12177fa8fe664
drm/amdkfd: fix the wrong sdma instance query for renoir

[ Upstream commit 34174b89bfa495bed9cddcc504fb38feca90fab7 ]

Renoir only has one sdma instance, it will get failed once query the
sdma1 registers. So use switch-case instead of static register array.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c