drm/v3d: Clean caches before runtime suspend

On runtime suspend, clean the V3D caches before suspending so all dirty
lines are written back to memory before the power domain is shut down.

Fixes several system hangs reported in [1][2][3].

Closes: https://github.com/raspberrypi/linux/issues/7381 [1]
Closes: https://github.com/raspberrypi/linux/issues/7396 [2]
Closes: https://github.com/raspberrypi/linux/issues/7397 [3]
Fixes: 458f2a712a ("drm/v3d: Introduce Runtime Power Management")
Link: https://patch.msgid.link/20260530-v3d-fix-rpi4-freezes-v1-3-c2c8307da6ce@igalia.com
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
Maíra Canal 2026-05-30 15:37:44 -03:00
parent 257adf5ea6
commit b81e8b02e8
No known key found for this signature in database
GPG Key ID: 3FF30E8A7688FAAA

View File

@ -52,6 +52,8 @@ int v3d_power_suspend(struct device *dev)
v3d_irq_disable(v3d);
v3d_clean_caches(v3d);
ret = v3d_suspend_sms(v3d);
if (ret) {
v3d_irq_enable(v3d);