aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/v3d/v3d_irq.c
diff options
context:
space:
mode:
authorMaíra Canal <mcanal@igalia.com>2024-09-23 10:55:06 -0300
committerMaíra Canal <mcanal@igalia.com>2024-09-25 08:40:18 -0300
commitd2fb8811108b2c1285c56f4fba4fff8fe3525593 (patch)
tree60bd89759fc4b90f663f3329d0fb8af8e61ad6ae /drivers/gpu/drm/v3d/v3d_irq.c
parentdrm/v3d: Address race-condition in MMU flush (diff)
downloadlinux-d2fb8811108b2c1285c56f4fba4fff8fe3525593.tar.gz
linux-d2fb8811108b2c1285c56f4fba4fff8fe3525593.zip
drm/v3d: Flush the MMU before we supply more memory to the binner
We must ensure that the MMU is flushed before we supply more memory to the binner, otherwise we might end up with invalid MMU accesses by the GPU. Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+") Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240923141348.2422499-3-mcanal@igalia.com
Diffstat (limited to 'drivers/gpu/drm/v3d/v3d_irq.c')
-rw-r--r--drivers/gpu/drm/v3d/v3d_irq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_irq.c b/drivers/gpu/drm/v3d/v3d_irq.c
index d469bda52c1a..20bf33702c3c 100644
--- a/drivers/gpu/drm/v3d/v3d_irq.c
+++ b/drivers/gpu/drm/v3d/v3d_irq.c
@@ -70,6 +70,8 @@ v3d_overflow_mem_work(struct work_struct *work)
list_add_tail(&bo->unref_head, &v3d->bin_job->render->unref_list);
spin_unlock_irqrestore(&v3d->job_lock, irqflags);
+ v3d_mmu_flush_all(v3d);
+
V3D_CORE_WRITE(0, V3D_PTB_BPOA, bo->node.start << V3D_MMU_PAGE_SHIFT);
V3D_CORE_WRITE(0, V3D_PTB_BPOS, obj->size);