aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/etnaviv
diff options
context:
space:
mode:
authorGravatar Lucas Stach <l.stach@pengutronix.de> 2023-06-07 14:58:41 +0200
committerGravatar Lucas Stach <l.stach@pengutronix.de> 2024-01-23 10:20:20 +0100
commitb0da08559c749ddc0e9a6e378b292ffa6845fb01 (patch)
tree27558a987c15b7fda0ddbac3f7c316ee0b20fae1 /drivers/gpu/drm/etnaviv
parentdrm/etnaviv: Drop the 'len' parameter of etnaviv_iommu_map() function (diff)
downloadlinux-b0da08559c749ddc0e9a6e378b292ffa6845fb01.tar.gz
linux-b0da08559c749ddc0e9a6e378b292ffa6845fb01.tar.bz2
linux-b0da08559c749ddc0e9a6e378b292ffa6845fb01.zip
drm/etnaviv: disable MLCG and pulse eater on GPU reset
Module level clock gating and the pulse eater might interfere with the GPU reset, as they both have the potential to stop the clock and thus reset propagation to parts of the GPU. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Diffstat (limited to 'drivers/gpu/drm/etnaviv')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gpu.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 9276756e1397..1dcfa23db3be 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -513,8 +513,19 @@ static int etnaviv_hw_reset(struct etnaviv_gpu *gpu)
timeout = jiffies + msecs_to_jiffies(1000);
while (time_is_after_jiffies(timeout)) {
- /* enable clock */
unsigned int fscale = 1 << (6 - gpu->freq_scale);
+ u32 pulse_eater = 0x01590880;
+
+ /* disable clock gating */
+ gpu_write_power(gpu, VIVS_PM_POWER_CONTROLS, 0x0);
+
+ /* disable pulse eater */
+ pulse_eater |= BIT(17);
+ gpu_write_power(gpu, VIVS_PM_PULSE_EATER, pulse_eater);
+ pulse_eater |= BIT(0);
+ gpu_write_power(gpu, VIVS_PM_PULSE_EATER, pulse_eater);
+
+ /* enable clock */
control = VIVS_HI_CLOCK_CONTROL_FSCALE_VAL(fscale);
etnaviv_gpu_load_clock(gpu, control);