From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Valerii Sokolov <valerii.sokolov@pm.me>
Cc: Bingbu Cao <bingbu.cao@intel.com>,
Tianshu Qiu <tian.shu.qiu@intel.com>,
Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>,
Antti Laakso <antti.laakso@linux.intel.com>,
Sarang Sapre <sarang.sapre@intel.com>,
Divyamani Tripathi <divyamani.tripathi@intel.com>,
Manik Bajpai <manik.bajpai@intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 11/11] media: intel/ipu6: fix EOF sequence logging in ipu6_isys_isr_one()
Date: Wed, 4 Nov 2026 15:35:33 +0200 [thread overview]
Message-ID: <aus0pXClb3bGAV_7@kekkonen.localdomain> (raw)
In-Reply-To: <20261103211031.1573726-12-valerii.sokolov@pm.me>
Hi Valerii,
On Tue, Nov 03, 2026 at 09:11:21PM +0000, Valerii Sokolov wrote:
> 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")
> Reviewed-by: Antti Laakso <antti.laakso@linux.intel.com>
> Signed-off-by: Valerii Sokolov <valerii.sokolov@pm.me>
> ---
> 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);
Except for this one.
The IPU firmware works based on timestamps and you could obtain the
sequence based on the timestamp but I don't think it's worth it here. I'd
just omit printing the sequence number which is unreliable.
> break;
> case IPU6_FW_ISYS_RESP_TYPE_STATS_DATA_READY:
> break;
--
Regards,
Sakari Ailus
prev parent reply other threads:[~2026-11-04 13:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 21:10 [PATCH v2 00/11] media: intel/ipu6: bounds, leak, and error handling fixes Valerii Sokolov
2026-11-03 21:10 ` [PATCH v2 01/11] media: intel/ipu6: move busy check to ipu6_isys_vidioc_s_fmt_vid_cap() Valerii Sokolov
2026-11-03 21:10 ` [PATCH v2 02/11] media: intel/ipu6: fix firmware message buffer leak on send failure Valerii Sokolov
2026-11-03 21:10 ` [PATCH v2 03/11] media: intel/ipu6: check pin bounds in ipu6_isys_fw_pin_cfg() Valerii Sokolov
2026-11-03 21:10 ` [PATCH v2 04/11] media: intel/ipu6: clamp crop top offset in ipu6_isys_csi2_set_sel() Valerii Sokolov
2026-11-03 21:10 ` [PATCH v2 05/11] media: intel/ipu6: check irq_status mask before calling subdevice ISR Valerii Sokolov
2026-11-03 21:10 ` [PATCH v2 06/11] media: intel/ipu6: clean up fwctx on ipu6_fw_com_open() failure Valerii Sokolov
2026-11-03 21:11 ` [PATCH v2 07/11] media: intel/ipu6: fix IOVA leak on first entry failure in ipu6_dma_map_sg() Valerii Sokolov
2026-11-04 13:02 ` Sakari Ailus
2026-11-03 21:11 ` [PATCH v2 08/11] media: intel/ipu6: return an error from ipu6_dma_map_sg() on failure Valerii Sokolov
2026-11-03 21:11 ` [PATCH v2 09/11] media: intel/ipu6: unmap the dummy L2 page table in ipu6_mmu_destroy() Valerii Sokolov
2026-11-03 21:11 ` [PATCH v2 10/11] media: intel/ipu6: pass the device to dev_err() in ipu6_mmu_unmap() Valerii Sokolov
2026-11-03 21:11 ` [PATCH v2 11/11] media: intel/ipu6: fix EOF sequence logging in ipu6_isys_isr_one() Valerii Sokolov
2026-11-04 13:35 ` Sakari Ailus [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aus0pXClb3bGAV_7@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=antti.laakso@linux.intel.com \
--cc=bingbu.cao@intel.com \
--cc=divyamani.tripathi@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=manik.bajpai@intel.com \
--cc=mchehab@kernel.org \
--cc=sarang.sapre@intel.com \
--cc=stanislaw.gruszka@linux.intel.com \
--cc=tian.shu.qiu@intel.com \
--cc=valerii.sokolov@pm.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®