]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/v3d: Clean caches before runtime suspend
authorMaíra Canal <mcanal@igalia.com>
Sat, 30 May 2026 18:37:44 +0000 (15:37 -0300)
committerMaíra Canal <mcanal@igalia.com>
Mon, 1 Jun 2026 21:40:55 +0000 (18:40 -0300)
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: 458f2a712ab4 ("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>
drivers/gpu/drm/v3d/v3d_power.c

index 769e90032b042ab3471259d3f0ddd7c8a3f3f7b2..f7df6393d38fe3a83a4aa3e517c6b7a6add3c481 100644 (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);