From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.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+cisco@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 12/13] media: iris: accept gen1 encoder output at a non-zero offset
Date: Fri, 04 Dec 2026 20:24:53 +0200 [thread overview]
Message-ID: <20261204-iris-vp8-v2-12-462f9b48d246@oss.qualcomm.com> (raw)
In-Reply-To: <20261204-iris-vp8-v2-0-462f9b48d246@oss.qualcomm.com>
FILL_BUFFER_DONE handling looks an encoder output buffer up by its tag
and by the offset it was queued with, which is always zero, and reports
the payload from the start of the buffer. Firmware that returns the
bitstream at a non-zero offset, as the Gen1 firmware does for VP8, has
every frame dropped with "error in ftb done", and the leading bytes would
be reported as payload even if the buffer were found.
Match encoder output buffers by tag alone and report the offset through
the plane's data_offset, with bytesused covering it as V4L2 requires.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/media/platform/qcom/iris/iris_buffer.c | 3 ++-
drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/qcom/iris/iris_buffer.c b/drivers/media/platform/qcom/iris/iris_buffer.c
index b5588fd8997e..da8f3bd37f76 100644
--- a/drivers/media/platform/qcom/iris/iris_buffer.c
+++ b/drivers/media/platform/qcom/iris/iris_buffer.c
@@ -920,7 +920,8 @@ int iris_vb2_buffer_done(struct iris_inst *inst, struct iris_buffer *buf)
}
if (V4L2_TYPE_IS_CAPTURE(type)) {
- vb2_set_plane_payload(vb2, 0, buf->data_size);
+ vb2->planes[0].data_offset = buf->data_offset;
+ vb2_set_plane_payload(vb2, 0, buf->data_offset + buf->data_size);
vbuf->sequence = inst->sequence_cap++;
iris_get_ts_metadata(inst, buf->timestamp, vbuf);
} else {
diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c b/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c
index 8de6d86e7c66..4d4bd5fa92d0 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c
@@ -533,8 +533,8 @@ static void iris_hfi_gen1_session_ftb_done(struct iris_inst *inst, void *packet)
if (!(buf->attr & BUF_ATTR_QUEUED))
continue;
- found = (buf->index == output_tag &&
- buf->data_offset == offset);
+ found = buf->index == output_tag &&
+ (inst->domain == ENCODER || buf->data_offset == offset);
if (found)
break;
--
2.47.3
next prev parent reply other threads:[~2026-12-04 18:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 18:24 [PATCH v2 00/13] media: iris: enable VP8, MPEG1/MPEG2 and interlaced MPEG2 support Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 01/13] media: iris: apply the capture buffer minimum in queue_setup Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 02/13] media: iris: translate Gen1 profile/level to HFI enumerants Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 03/13] media: iris: default the Gen1 encoder level to a usable value Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 04/13] media: iris: size QC08C buffers to fit field-coded pictures Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 05/13] media: iris: split Gen2 firmware data for vpu2-generation SoCs Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 06/13] media: iris: move the decode format list into the firmware data Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 07/13] media: iris: support read-only controls Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 08/13] media: iris: add VP8 decode support on Gen1 firmware Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 09/13] media: iris: add MPEG1 and MPEG2 " Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 10/13] media: iris: support interlaced MPEG2 content Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 11/13] media: iris: move the encode format list into the firmware data Dmitry Baryshkov
2026-12-04 18:24 ` Dmitry Baryshkov [this message]
2026-12-04 18:24 ` [PATCH v2 13/13] media: iris: add VP8 encode support on Gen1 firmware Dmitry Baryshkov
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=20261204-iris-vp8-v2-12-462f9b48d246@oss.qualcomm.com \
--to=dmitry.baryshkov@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=bod@kernel.org \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=hverkuil+cisco@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--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®