diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2021-07-27 22:45:41 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-10-04 21:22:59 +0200 |
commit | 7c69d6153e827576f20a954a459667c5af072f7e (patch) | |
tree | b61f0d68937b1f7fb4d68d55da5d33962e5545b4 /drivers/gpu/drm/amd/amdgpu/navi10_ih.c | |
parent | drm/amdgpu/athub2.1: convert to IP version checking (diff) | |
download | linux-7c69d6153e827576f20a954a459667c5af072f7e.tar.xz linux-7c69d6153e827576f20a954a459667c5af072f7e.zip |
drm/amdgpu/navi10_ih: convert to IP version checking
Use IP versions rather than asic_type to differentiate
IP version specific features.
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/navi10_ih.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c index 530011622801..c3f968d9cfcb 100644 --- a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c +++ b/drivers/gpu/drm/amd/amdgpu/navi10_ih.c @@ -107,7 +107,7 @@ force_update_wptr_for_self_int(struct amdgpu_device *adev, { u32 ih_cntl, ih_rb_cntl; - if (adev->asic_type < CHIP_SIENNA_CICHLID) + if (adev->ip_versions[OSSSYS_HWIP] < IP_VERSION(5, 0, 3)) return; ih_cntl = RREG32_SOC15(OSSSYS, 0, mmIH_CNTL2); @@ -332,13 +332,10 @@ static int navi10_ih_irq_init(struct amdgpu_device *adev) if (unlikely(adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT)) { if (ih[0]->use_bus_addr) { - switch (adev->asic_type) { - case CHIP_SIENNA_CICHLID: - case CHIP_NAVY_FLOUNDER: - case CHIP_VANGOGH: - case CHIP_DIMGREY_CAVEFISH: - case CHIP_BEIGE_GOBY: - case CHIP_YELLOW_CARP: + switch (adev->ip_versions[OSSSYS_HWIP]) { + case IP_VERSION(5, 0, 3): + case IP_VERSION(5, 2, 0): + case IP_VERSION(5, 2, 1): ih_chicken = RREG32_SOC15(OSSSYS, 0, mmIH_CHICKEN_Sienna_Cichlid); ih_chicken = REG_SET_FIELD(ih_chicken, IH_CHICKEN, MC_SPACE_GPA_ENABLE, 1); |