[PATCH v1 11/11] media: intel/ipu6: fix EOF sequence logging in ipu6_isys_isr_one()
From: Valerii Sokolov
Date: Fri Oct 23 2026 - 16:04:40 EST
When handling IPU6_FW_ISYS_RESP_TYPE_FRAME_SOF in ipu6_isys_isr_one(),
stream->seq[stream->seq_index] is populated with the current sequence
(atomic_read(&stream->sequence) - 1) and stream->seq_index is immediately
advanced to the next ring buffer slot.
Subsequently, when IPU6_FW_ISYS_RESP_TYPE_FRAME_EOF arrives, logging
stream->seq[stream->seq_index].sequence reads the next slot in the ring
buffer rather than the slot written at SOF (logging a stale sequence
number from IPU6_ISYS_MAX_PARALLEL_SOF - 1 frames ago, or 0 on the first
frame).
Read atomic_read(&stream->sequence) - 1 directly so the EOF debug message
logs the current frame sequence number matching SOF.
Fixes: f50c4ca0a820 ("media: intel/ipu6: add the main input system driver")
Signed-off-by: Valerii Sokolov <valerii.sokolov@xxxxx>
---
drivers/media/pci/intel/ipu6/ipu6-fw-isys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/intel/ipu6/ipu6-fw-isys.c b/drivers/media/pci/intel/ipu6/ipu6-fw-isys.c
index 5d95fb9234..ad08506b32 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-fw-isys.c
+++ b/drivers/media/pci/intel/ipu6/ipu6-fw-isys.c
@@ -651,7 +651,7 @@ int ipu6_isys_isr_one(struct ipu6_bus_device *adev)
dev_dbg(&adev->auxdev.dev,
"eof: handle %d: (index %u), timestamp 0x%16.16llx\n",
resp->stream_handle,
- stream->seq[stream->seq_index].sequence, ts);
+ atomic_read(&stream->sequence) - 1, ts);
break;
case IPU6_FW_ISYS_RESP_TYPE_STATS_DATA_READY:
break;
--
2.56.0