drm/amdgpu: Use instance lookup table for GC 9.4.3
authorLijo Lazar <lijo.lazar@amd.com>
Tue, 5 Jul 2022 04:26:41 +0000 (09:56 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:45:44 +0000 (09:45 -0400)
commit659a4ab8e27eb39cc61cb74cc714ba1a8f8c9a61
tree04d9e1fe5c26c3281eccad9f37436720c7d9c1fc
parent5d30cbb4dbf096bb964fb9c5fd4417cad13445a4
drm/amdgpu: Use instance lookup table for GC 9.4.3

Register accesses need to be based on physical instance on bare metal.
Pass the right instance using logical to physical instance lookup
table before accessing registers. Add a macro GET_INST to get the right
physical instance of an IP corresponding to a logical instance.

v2: fix gfx_v9_4_3_check_rlcg_range() (Alex)

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Le Ma <Le.Ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gc_9_4_3.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c
drivers/gpu/drm/amd/amdgpu/soc15_common.h