Skip to content

Commit 156872b

Browse files
John Clementsalexdeucher
authored andcommitted
drm/amdgpu: Clear RAS interrupt status on aldebaran
Resolve incorrect register address Reviewed-by: Candice Li <[email protected]> Signed-off-by: John Clements <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent e5b310f commit 156872b

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,14 @@
8585
#define mmRCC_DEV0_EPF0_STRAP0_ALDE 0x0015
8686
#define mmRCC_DEV0_EPF0_STRAP0_ALDE_BASE_IDX 2
8787

88-
#define mmBIF_DOORBELL_INT_CNTL_ALDE 0x3878
88+
#define mmBIF_DOORBELL_INT_CNTL_ALDE 0x00fe
8989
#define mmBIF_DOORBELL_INT_CNTL_ALDE_BASE_IDX 2
9090
#define BIF_DOORBELL_INT_CNTL_ALDE__DOORBELL_INTERRUPT_DISABLE__SHIFT 0x18
9191
#define BIF_DOORBELL_INT_CNTL_ALDE__DOORBELL_INTERRUPT_DISABLE_MASK 0x01000000L
9292

93+
#define mmBIF_INTR_CNTL_ALDE 0x0101
94+
#define mmBIF_INTR_CNTL_ALDE_BASE_IDX 2
95+
9396
static void nbio_v7_4_query_ras_error_count(struct amdgpu_device *adev,
9497
void *ras_error_status);
9598

@@ -440,14 +443,23 @@ static int nbio_v7_4_set_ras_controller_irq_state(struct amdgpu_device *adev,
440443
*/
441444
uint32_t bif_intr_cntl;
442445

443-
bif_intr_cntl = RREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL);
446+
if (adev->asic_type == CHIP_ALDEBARAN)
447+
bif_intr_cntl = RREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL_ALDE);
448+
else
449+
bif_intr_cntl = RREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL);
450+
444451
if (state == AMDGPU_IRQ_STATE_ENABLE) {
445452
/* set interrupt vector select bit to 0 to select
446453
* vetcor 1 for bare metal case */
447454
bif_intr_cntl = REG_SET_FIELD(bif_intr_cntl,
448455
BIF_INTR_CNTL,
449456
RAS_INTR_VEC_SEL, 0);
450-
WREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL, bif_intr_cntl);
457+
458+
if (adev->asic_type == CHIP_ALDEBARAN)
459+
WREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL_ALDE, bif_intr_cntl);
460+
else
461+
WREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL, bif_intr_cntl);
462+
451463
}
452464

453465
return 0;
@@ -476,14 +488,22 @@ static int nbio_v7_4_set_ras_err_event_athub_irq_state(struct amdgpu_device *ade
476488
*/
477489
uint32_t bif_intr_cntl;
478490

479-
bif_intr_cntl = RREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL);
491+
if (adev->asic_type == CHIP_ALDEBARAN)
492+
bif_intr_cntl = RREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL_ALDE);
493+
else
494+
bif_intr_cntl = RREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL);
495+
480496
if (state == AMDGPU_IRQ_STATE_ENABLE) {
481497
/* set interrupt vector select bit to 0 to select
482498
* vetcor 1 for bare metal case */
483499
bif_intr_cntl = REG_SET_FIELD(bif_intr_cntl,
484500
BIF_INTR_CNTL,
485501
RAS_INTR_VEC_SEL, 0);
486-
WREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL, bif_intr_cntl);
502+
503+
if (adev->asic_type == CHIP_ALDEBARAN)
504+
WREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL_ALDE, bif_intr_cntl);
505+
else
506+
WREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL, bif_intr_cntl);
487507
}
488508

489509
return 0;

0 commit comments

Comments
 (0)