Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: convert vega20_ih.c to IP version checks

For consistency with newer asics.

Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+3 -3
+3 -3
drivers/gpu/drm/amd/amdgpu/vega20_ih.c
··· 267 267 /* vega20 ih reroute will go through psp this 268 268 * function is used for newer asics starting arcturus 269 269 */ 270 - if (adev->asic_type >= CHIP_ARCTURUS) { 270 + if (adev->ip_versions[OSSSYS_HWIP][0] >= IP_VERSION(4, 2, 1)) { 271 271 /* Reroute to IH ring 1 for VMC */ 272 272 WREG32_SOC15(OSSSYS, 0, mmIH_CLIENT_CFG_INDEX, 0x12); 273 273 tmp = RREG32_SOC15(OSSSYS, 0, mmIH_CLIENT_CFG_DATA); ··· 308 308 309 309 adev->nbio.funcs->ih_control(adev); 310 310 311 - if (adev->asic_type == CHIP_ARCTURUS && 311 + if ((adev->ip_versions[OSSSYS_HWIP][0] == IP_VERSION(4, 2, 1)) && 312 312 adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT) { 313 313 ih_chicken = RREG32_SOC15(OSSSYS, 0, mmIH_CHICKEN); 314 314 if (adev->irq.ih.use_bus_addr) { ··· 321 321 /* psp firmware won't program IH_CHICKEN for aldebaran 322 322 * driver needs to program it properly according to 323 323 * MC_SPACE type in IH_RB_CNTL */ 324 - if (adev->asic_type == CHIP_ALDEBARAN) { 324 + if (adev->ip_versions[OSSSYS_HWIP][0] == IP_VERSION(4, 4, 0)) { 325 325 ih_chicken = RREG32_SOC15(OSSSYS, 0, mmIH_CHICKEN_ALDEBARAN); 326 326 if (adev->irq.ih.use_bus_addr) { 327 327 ih_chicken = REG_SET_FIELD(ih_chicken, IH_CHICKEN,