From: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
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: Re: [PATCH 2/9] media: iris: account for UBWC extradata in the QC08C buffer size
Date: Wed, 5 Aug 2026 21:28:01 +0530 [thread overview]
Message-ID: <510ae8a1-d716-cfeb-e53d-f6cacafc826b@oss.qualcomm.com> (raw)
In-Reply-To: <20260709-iris-vp8-v1-2-6af3ab578a7c@oss.qualcomm.com>
On 7/10/2026 1:06 AM, Dmitry Baryshkov wrote:
> iris_yuv_buffer_size_qc08c() sums only the luma/chroma data and metadata
> planes. The UBWC engine additionally writes a trailing extradata/scratch
> region below the frame, so the computed size is too small for the
> reconstruction (DPB) buffer. When the firmware writes that trailing region
> it overruns the buffer and triggers an IOMMU fault; this is hit when
> decoding interlaced content, where the reconstruction buffers are packed
> with a gap after each buffer.
>
> Add the trailing region to the buffer size, sized as the venus driver does
> (max of 16K and 48 luma lines).
>
> Fixes: cfd71b14b0d6 ("media: iris: Add support for QC08C format for decoder")
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.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 246ad0abbac3..f1de4442be1f 100644
> --- a/drivers/media/platform/qcom/iris/iris_buffer.c
> +++ b/drivers/media/platform/qcom/iris/iris_buffer.c
> @@ -261,7 +261,8 @@ static u32 iris_yuv_buffer_size_qc08c(struct iris_inst *inst)
> uv_plane = ALIGN(uv_stride * ALIGN(f->fmt.pix_mp.height / 2, UV_SCANLINE_ALIGN_QC08C),
> PIXELS_4K);
>
> - return ALIGN(y_meta_plane + y_plane + uv_meta_plane + uv_plane, PIXELS_4K);
> + return ALIGN(y_meta_plane + y_plane + uv_meta_plane + uv_plane +
> + max_t(u32, SZ_16K, y_stride * 48), PIXELS_4K);
Can max_t(u32, SZ_16K, y_stride * 48) be stored in a variable such as
trailing_region or extradata and used here?
> }
>
> /*
>
next prev parent reply other threads:[~2026-08-05 15:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 19:36 [PATCH 0/9] media: iris: enable VP8, MPEG2 and interlaced video support Dmitry Baryshkov
2026-07-09 19:36 ` [PATCH 1/9] media: iris: translate Gen1 profile/level to HFI enumerants Dmitry Baryshkov
2026-08-05 16:11 ` Vishnu Reddy
2026-07-09 19:36 ` [PATCH 2/9] media: iris: account for UBWC extradata in the QC08C buffer size Dmitry Baryshkov
2026-08-05 15:58 ` Vishnu Reddy [this message]
2026-07-09 19:37 ` [PATCH 3/9] media: iris: add support for interlaced decoded content Dmitry Baryshkov
2026-07-09 19:37 ` [PATCH 4/9] media: iris: split Gen2 firmware data for vpu2-generation SoCs Dmitry Baryshkov
2026-08-05 17:08 ` Vishnu Reddy
2026-07-09 19:37 ` [PATCH 5/9] media: iris: move the decode format list into the firmware data Dmitry Baryshkov
2026-08-26 4:09 ` Vishnu Reddy
2026-07-09 19:37 ` [PATCH 6/9] media: iris: add VP8 decode support on Gen1 firmware Dmitry Baryshkov
2026-08-26 4:18 ` Vishnu Reddy
2026-07-09 19:37 ` [PATCH 7/9] media: iris: add MPEG2 " Dmitry Baryshkov
2026-08-26 4:50 ` Vishnu Reddy
2026-07-09 19:37 ` [PATCH 8/9] media: iris: move the encode format list into the firmware data Dmitry Baryshkov
2026-07-09 19:37 ` [PATCH 9/9] media: iris: add VP8 encode support on Gen1 firmware Dmitry Baryshkov
2026-07-30 22:52 ` [PATCH 0/9] media: iris: enable VP8, MPEG2 and interlaced video support Dmitry Baryshkov
2026-07-31 7:37 ` Vikash Garodia
2026-07-31 12:25 ` 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=510ae8a1-d716-cfeb-e53d-f6cacafc826b@oss.qualcomm.com \
--to=busanna.reddy@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=bod@kernel.org \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=dmitry.baryshkov@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