mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xilin Wu <sophon@radxa.com>
To: Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	 Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
	 Abhinav Kumar <abhinav.kumar@linux.dev>,
	Bryan O'Donoghue <bod@kernel.org>,
	 Mauro Carvalho Chehab <mchehab@kernel.org>,
	 Hans Verkuil <hverkuil@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	 dragon@radxa.com, Chris Obbard <chris.obbard@oss.qualcomm.com>,
	 Deepak Sikri <sikrid@qti.qualcomm.com>,
	 Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	 Loic Minier <loic.minier@oss.qualcomm.com>,
	 Jason Pettit <jason.pettit@oss.qualcomm.com>,
	Xilin Wu <sophon@radxa.com>,  sakimidare <ssmzhn@163.com>,
	Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Subject: [PATCH v2 4/5] media: iris: Preserve timestamps on error buffers
Date: Fri, 27 Nov 2026 19:40:57 +0800	[thread overview]
Message-ID: <20261127-iris-va-fixes-v2-4-385e8636c22d@radxa.com> (raw)
In-Reply-To: <20261127-iris-va-fixes-v2-0-385e8636c22d@radxa.com>

Clearing timestamps on error buffers prevents clients such as libva-v4l2
from identifying the failed picture and can cause synchronization timeouts.

Preserve the firmware-provided timestamp when returning an error buffer.

Fixes: b791dcfcba3a ("media: iris: Add handling for corrupt and drop frames")
Tested-by: sakimidare <ssmzhn@163.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Signed-off-by: Xilin Wu <sophon@radxa.com>
---
 drivers/media/platform/qcom/iris/iris_buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/iris/iris_buffer.c b/drivers/media/platform/qcom/iris/iris_buffer.c
index eb8de60c1177..f790483d13d4 100644
--- a/drivers/media/platform/qcom/iris/iris_buffer.c
+++ b/drivers/media/platform/qcom/iris/iris_buffer.c
@@ -899,7 +899,8 @@ int iris_vb2_buffer_done(struct iris_inst *inst, struct iris_buffer *buf)
 	if (buf->flags & V4L2_BUF_FLAG_ERROR) {
 		state = VB2_BUF_STATE_ERROR;
 		vb2_set_plane_payload(vb2, 0, 0);
-		vb2->timestamp = 0;
+		/* Allow userspace to associate the error with the input frame. */
+		vb2->timestamp = buf->timestamp;
 		v4l2_m2m_buf_done(vbuf, state);
 		return 0;
 	}

-- 
2.56.1


  parent reply	other threads:[~2026-11-27 11:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 11:40 [PATCH v2 0/5] media: iris: HFI gen2 features and fixes for VA-API Xilin Wu
2026-11-27 11:40 ` [PATCH v2 1/5] media: iris: support decode-order output on HFI gen2 Xilin Wu
2026-11-27 13:21   ` Vikash Garodia
2026-11-27 11:40 ` [PATCH v2 2/5] media: iris: allow larger capture buffer pools " Xilin Wu
2026-11-27 13:31   ` Vikash Garodia
2026-11-27 11:40 ` [PATCH v2 3/5] media: iris: Add deblocking filter controls for " Xilin Wu
2026-11-27 11:40 ` Xilin Wu [this message]
2026-11-27 13:44   ` [PATCH v2 4/5] media: iris: Preserve timestamps on error buffers Vikash Garodia
2026-11-27 11:40 ` [PATCH v2 5/5] media: iris: Recycle decoder buffers for non-display pictures Xilin Wu

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=20261127-iris-va-fixes-v2-4-385e8636c22d@radxa.com \
    --to=sophon@radxa.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=bod@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=busanna.reddy@oss.qualcomm.com \
    --cc=chris.obbard@oss.qualcomm.com \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dragon@radxa.com \
    --cc=hverkuil@kernel.org \
    --cc=jason.pettit@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=loic.minier@oss.qualcomm.com \
    --cc=mchehab@kernel.org \
    --cc=sikrid@qti.qualcomm.com \
    --cc=ssmzhn@163.com \
    --cc=vikash.garodia@oss.qualcomm.com \
    /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®