drm/amdkfd: Improve function get_sdma_rlc_reg_offset() (v2)
authorYong Zhao <Yong.Zhao@amd.com>
Fri, 13 Dec 2019 16:31:48 +0000 (11:31 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Jan 2020 15:17:05 +0000 (10:17 -0500)
commita434b94c5a6c56ea7078d43d932284005e08ed62
tree3ae31b5c61c08ee325ca557b3082553e42519c70
parent1fc636c9b3b251d065dbf04eb2293fb6de9fdcf9
drm/amdkfd: Improve function get_sdma_rlc_reg_offset() (v2)

The SOC15_REG_OFFSET() macro needs to dereference adev->reg_offset[IP]
pointer, which is sometimes NULL when there are fewer than 8 sdma engines.
Avoid that by not initializing the array regardless.

v2: squash in warning fixes

Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c