mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
drm/etnaviv: check MMUv2 status after reset
A full GPU reset is the only way to disable the MMUv2 and the driver depends on the MMU being disabled after a reset to be able to properly restart the GPU. Validate this assumption by checking that the reset actually did disable the MMU. Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Link: https://patch.msgid.link/20260511085148.652256-2-l.stach@pengutronix.de Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
This commit is contained in:
parent
1006d1f7c0
commit
4720915ab4
|
|
@ -600,6 +600,23 @@ static int etnaviv_hw_reset(struct etnaviv_gpu *gpu)
|
|||
continue;
|
||||
}
|
||||
|
||||
/* try resetting again if MMUv2 is not disabled */
|
||||
if (gpu->identity.minor_features1 & chipMinorFeatures1_MMU_VERSION) {
|
||||
if (gpu->sec_mode == ETNA_SEC_KERNEL) {
|
||||
if (gpu_read(gpu, VIVS_MMUv2_SEC_CONTROL) &
|
||||
VIVS_MMUv2_SEC_CONTROL_ENABLE) {
|
||||
dev_dbg(gpu->dev, "MMU is not disabled\n");
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (gpu_read(gpu, VIVS_MMUv2_CONTROL) &
|
||||
VIVS_MMUv2_CONTROL_ENABLE) {
|
||||
dev_dbg(gpu->dev, "MMU is not disabled\n");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* enable debug register access */
|
||||
control &= ~VIVS_HI_CLOCK_CONTROL_DISABLE_DEBUG_REGISTERS;
|
||||
gpu_write(gpu, VIVS_HI_CLOCK_CONTROL, control);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user