mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
accel/ivpu: Drop MTL interrupt clear-with-zero workaround
Early MTL steppings needed a runtime check for BTRS interrupt status registers that cleared by writing 0 instead of the usual write-1-to-clear flow. Those pre-production steppings are no longer supported. Remove the workaround flag, probe helper, and conditional IRQ clear path, and always clear handled MTL BTRS interrupt status bits by writing the interrupt status value. Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com> Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com> Link: https://patch.msgid.link/20260930160348.1562800-1-andrzej.kacprowski@linux.intel.com
This commit is contained in:
parent
6cf6439914
commit
34e9ab0182
|
|
@ -114,7 +114,6 @@ enum vpu_hw_btrs {
|
|||
struct ivpu_wa_table {
|
||||
bool punit_disabled;
|
||||
bool clear_runtime_mem;
|
||||
bool interrupt_clear_with_0;
|
||||
bool disable_clock_relinquish;
|
||||
bool wp0_during_power_up;
|
||||
bool disable_d0i2;
|
||||
|
|
|
|||
|
|
@ -67,9 +67,6 @@ static void wa_init(struct ivpu_device *vdev)
|
|||
vdev->wa.punit_disabled = false;
|
||||
vdev->wa.clear_runtime_mem = false;
|
||||
|
||||
if (ivpu_hw_btrs_gen(vdev) == IVPU_HW_BTRS_MTL)
|
||||
vdev->wa.interrupt_clear_with_0 = ivpu_hw_btrs_irqs_clear_with_0_mtl(vdev);
|
||||
|
||||
if ((ivpu_device_id(vdev) == PCI_DEVICE_ID_LNL &&
|
||||
ivpu_revision(vdev) < IVPU_HW_IP_REV_LNL_B0) ||
|
||||
(ivpu_device_id(vdev) == PCI_DEVICE_ID_NVL &&
|
||||
|
|
@ -90,7 +87,6 @@ static void wa_init(struct ivpu_device *vdev)
|
|||
|
||||
IVPU_PRINT_WA(punit_disabled);
|
||||
IVPU_PRINT_WA(clear_runtime_mem);
|
||||
IVPU_PRINT_WA(interrupt_clear_with_0);
|
||||
IVPU_PRINT_WA(disable_clock_relinquish);
|
||||
IVPU_PRINT_WA(wp0_during_power_up);
|
||||
IVPU_PRINT_WA(disable_d0i2);
|
||||
|
|
|
|||
|
|
@ -24,9 +24,6 @@
|
|||
(REG_FLD(VPU_HW_BTRS_LNL_INTERRUPT_STAT, IMR1_ERR)) | \
|
||||
(REG_FLD(VPU_HW_BTRS_LNL_INTERRUPT_STAT, SURV_ERR)))
|
||||
|
||||
#define BTRS_MTL_ALL_IRQ_MASK (BTRS_MTL_IRQ_MASK | (REG_FLD(VPU_HW_BTRS_MTL_INTERRUPT_STAT, \
|
||||
FREQ_CHANGE)))
|
||||
|
||||
#define BTRS_IRQ_DISABLE_MASK ((u32)-1)
|
||||
|
||||
#define BTRS_LNL_ALL_IRQ_MASK ((u32)-1)
|
||||
|
|
@ -59,18 +56,6 @@
|
|||
#define DCT_ENABLE 0x1
|
||||
#define DCT_DISABLE 0x0
|
||||
|
||||
int ivpu_hw_btrs_irqs_clear_with_0_mtl(struct ivpu_device *vdev)
|
||||
{
|
||||
REGB_WR32(VPU_HW_BTRS_MTL_INTERRUPT_STAT, BTRS_MTL_ALL_IRQ_MASK);
|
||||
if (REGB_RD32(VPU_HW_BTRS_MTL_INTERRUPT_STAT) == BTRS_MTL_ALL_IRQ_MASK) {
|
||||
/* Writing 1s does not clear the interrupt status register */
|
||||
REGB_WR32(VPU_HW_BTRS_MTL_INTERRUPT_STAT, 0x0);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void freq_ratios_init_mtl(struct ivpu_device *vdev)
|
||||
{
|
||||
struct ivpu_hw_info *hw = vdev->hw;
|
||||
|
|
@ -729,14 +714,7 @@ bool ivpu_hw_btrs_irq_handler_mtl(struct ivpu_device *vdev, int irq)
|
|||
}
|
||||
|
||||
/* This must be done after interrupts are cleared at the source. */
|
||||
if (IVPU_WA(interrupt_clear_with_0))
|
||||
/*
|
||||
* Writing 1 triggers an interrupt, so we can't perform read update write.
|
||||
* Clear local interrupt status by writing 0 to all bits.
|
||||
*/
|
||||
REGB_WR32(VPU_HW_BTRS_MTL_INTERRUPT_STAT, 0x0);
|
||||
else
|
||||
REGB_WR32(VPU_HW_BTRS_MTL_INTERRUPT_STAT, status);
|
||||
REGB_WR32(VPU_HW_BTRS_MTL_INTERRUPT_STAT, status);
|
||||
|
||||
if (schedule_recovery)
|
||||
ivpu_pm_trigger_recovery(vdev, "Buttress IRQ");
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
int ivpu_hw_btrs_info_init(struct ivpu_device *vdev);
|
||||
void ivpu_hw_btrs_freq_ratios_init(struct ivpu_device *vdev);
|
||||
int ivpu_hw_btrs_irqs_clear_with_0_mtl(struct ivpu_device *vdev);
|
||||
int ivpu_hw_btrs_wp_drive(struct ivpu_device *vdev, bool enable);
|
||||
int ivpu_hw_btrs_wait_for_clock_res_own_ack(struct ivpu_device *vdev);
|
||||
int ivpu_hw_btrs_d0i3_enable(struct ivpu_device *vdev);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user