Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+12 -1
+12 -1
drivers/gpu/drm/etnaviv/etnaviv_gpu.c
··· 513 513 timeout = jiffies + msecs_to_jiffies(1000); 514 514 515 515 while (time_is_after_jiffies(timeout)) { 516 - /* enable clock */ 517 516 unsigned int fscale = 1 << (6 - gpu->freq_scale); 517 + u32 pulse_eater = 0x01590880; 518 + 519 + /* disable clock gating */ 520 + gpu_write_power(gpu, VIVS_PM_POWER_CONTROLS, 0x0); 521 + 522 + /* disable pulse eater */ 523 + pulse_eater |= BIT(17); 524 + gpu_write_power(gpu, VIVS_PM_PULSE_EATER, pulse_eater); 525 + pulse_eater |= BIT(0); 526 + gpu_write_power(gpu, VIVS_PM_PULSE_EATER, pulse_eater); 527 + 528 + /* enable clock */ 518 529 control = VIVS_HI_CLOCK_CONTROL_FSCALE_VAL(fscale); 519 530 etnaviv_gpu_load_clock(gpu, control); 520 531