Re: [PATCH 4/5] media: iris: Preserve timestamps on error buffers

From: Vishnu Reddy

Date: Fri Nov 27 2026 - 04:46:29 EST



On 10/29/2026 9:28 AM, Xilin Wu wrote:
> 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")
> Signed-off-by: Xilin Wu <sophon@xxxxxxxxx>
> ---
> 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;
> }

Reviewed-by: Vishnu Reddy <busanna.reddy@xxxxxxxxxxxxxxxx>