[PATCH v1 9/9] media: chips-media: wave5: Stop FrameBuf Reset During Seek
From: Jackson.lee
Date: Tue Oct 06 2026 - 22:02:42 EST
From: Brandon Brnich <b-brnich@xxxxxx>
A seek drains the capture queue via stop_streaming without stopping the
m2m_ctx. streamoff_capture checks needs_reallocation which will always
be true after the first sequence initialization. This will trigger a
DEC_RESET_FRAMEBUF_INFO which will go through and deallocate all of the
frame and auxiliary buffers.
Video output can have corruption if the firmware is still referencing the
buffers that just got reset. Clear needs_reallocation in wave5_prepare_fb
once the new buffers are registered.
Fixes: 9707a6254a8a ("media: chips-media: wave5: Add the v4l2 layer")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Brandon Brnich <b-brnich@xxxxxx>
Signed-off-by: Jackson Lee <jackson.lee@xxxxxxxxxxxxxxx>
Signed-off-by: Nas Chung <nas.chung@xxxxxxxxxxxxxxx>
---
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
index e52853e89931..5b63f4f90c7b 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
@@ -1251,6 +1251,8 @@ static int wave5_prepare_fb(struct vpu_instance *inst)
return ret;
}
+ inst->needs_reallocation = false;
+
/*
* Mark all frame buffers as out of display, to avoid using them before
* the application have them queued.
--
2.43.0