Commit 886f1816 authored by Alex Deucher's avatar Alex Deucher

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

For consistency with newer asics.
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e9ff000b
...@@ -267,7 +267,7 @@ static void vega20_ih_reroute_ih(struct amdgpu_device *adev) ...@@ -267,7 +267,7 @@ static void vega20_ih_reroute_ih(struct amdgpu_device *adev)
/* vega20 ih reroute will go through psp this /* vega20 ih reroute will go through psp this
* function is used for newer asics starting arcturus * function is used for newer asics starting arcturus
*/ */
if (adev->asic_type >= CHIP_ARCTURUS) { if (adev->ip_versions[OSSSYS_HWIP][0] >= IP_VERSION(4, 2, 1)) {
/* Reroute to IH ring 1 for VMC */ /* Reroute to IH ring 1 for VMC */
WREG32_SOC15(OSSSYS, 0, mmIH_CLIENT_CFG_INDEX, 0x12); WREG32_SOC15(OSSSYS, 0, mmIH_CLIENT_CFG_INDEX, 0x12);
tmp = RREG32_SOC15(OSSSYS, 0, mmIH_CLIENT_CFG_DATA); tmp = RREG32_SOC15(OSSSYS, 0, mmIH_CLIENT_CFG_DATA);
...@@ -308,7 +308,7 @@ static int vega20_ih_irq_init(struct amdgpu_device *adev) ...@@ -308,7 +308,7 @@ static int vega20_ih_irq_init(struct amdgpu_device *adev)
adev->nbio.funcs->ih_control(adev); adev->nbio.funcs->ih_control(adev);
if (adev->asic_type == CHIP_ARCTURUS && if ((adev->ip_versions[OSSSYS_HWIP][0] == IP_VERSION(4, 2, 1)) &&
adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT) { adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT) {
ih_chicken = RREG32_SOC15(OSSSYS, 0, mmIH_CHICKEN); ih_chicken = RREG32_SOC15(OSSSYS, 0, mmIH_CHICKEN);
if (adev->irq.ih.use_bus_addr) { if (adev->irq.ih.use_bus_addr) {
...@@ -321,7 +321,7 @@ static int vega20_ih_irq_init(struct amdgpu_device *adev) ...@@ -321,7 +321,7 @@ static int vega20_ih_irq_init(struct amdgpu_device *adev)
/* psp firmware won't program IH_CHICKEN for aldebaran /* psp firmware won't program IH_CHICKEN for aldebaran
* driver needs to program it properly according to * driver needs to program it properly according to
* MC_SPACE type in IH_RB_CNTL */ * MC_SPACE type in IH_RB_CNTL */
if (adev->asic_type == CHIP_ALDEBARAN) { if (adev->ip_versions[OSSSYS_HWIP][0] == IP_VERSION(4, 4, 0)) {
ih_chicken = RREG32_SOC15(OSSSYS, 0, mmIH_CHICKEN_ALDEBARAN); ih_chicken = RREG32_SOC15(OSSSYS, 0, mmIH_CHICKEN_ALDEBARAN);
if (adev->irq.ih.use_bus_addr) { if (adev->irq.ih.use_bus_addr) {
ih_chicken = REG_SET_FIELD(ih_chicken, IH_CHICKEN, ih_chicken = REG_SET_FIELD(ih_chicken, IH_CHICKEN,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment