Skip to content

Commit a042bea

Browse files
tomeuvlynxeye-dev
authored andcommitted
drm/etnaviv: fix flush sequence logic
The current logic uses the flush sequence from the current address space. This is harmless when deducing the flush requirements for the current submit, as either the incoming address space is the same one as the currently active one or we switch context, in which case the flush is unconditional. However, this sequence is also stored as the current flush sequence of the GPU. If we switch context the stored flush sequence will no longer belong to the currently active address space. This incoherency can then cause missed flushes, resulting in translation errors. Fixes: 27b6727 ("drm/etnaviv: rework MMU handling") Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Link: https://lore.kernel.org/r/20251021093723.3887980-1-l.stach@pengutronix.de
1 parent e0023c8 commit a042bea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/etnaviv/etnaviv_buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, u32 exec_state,
347347
u32 link_target, link_dwords;
348348
bool switch_context = gpu->exec_state != exec_state;
349349
bool switch_mmu_context = gpu->mmu_context != mmu_context;
350-
unsigned int new_flush_seq = READ_ONCE(gpu->mmu_context->flush_seq);
350+
unsigned int new_flush_seq = READ_ONCE(mmu_context->flush_seq);
351351
bool need_flush = switch_mmu_context || gpu->flush_seq != new_flush_seq;
352352
bool has_blt = !!(gpu->identity.minor_features5 &
353353
chipMinorFeatures5_BLT_ENGINE);

0 commit comments

Comments
 (0)