From: sashiko-bot@kernel.org
To: "Vikash Garodia" <vikash.garodia@oss.qualcomm.com>
Cc: media-ci@linuxtv.org, devicetree@vger.kernel.org,
conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v4 3/6] media: iris: add iris4 specific H265 line buffer calculation
Date: Thu, 01 Oct 2026 15:32:20 +0000 [thread overview]
Message-ID: <20261001153221.4FAC61F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261001-kaanapali-iris-v4-3-642f9ac5e699@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] media: iris: quadratic scaling of dpb_obp due to double multiplication
--
commit 8ebbe0addefc2c9da9b09f0ae52a879bbb0ec3f3
Author: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
media: iris: add iris4 specific H265 line buffer calculation
This commit introduces a new H265 decoder line buffer size calculation
formula for iris4 (VPU4). It resolves firmware failures seen with specific
test vectors by providing a larger buffer size for certain configurations.
> diff --git a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c
> index faebb54728660..a99b8030e3dd0 100644
> --- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c
> +++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c
[ ... ]
> @@ -1814,6 +1814,63 @@ static u32 hfi_vpu4x_buffer_line_vp9d(u32 frame_width, u32 frame_height, u32 _yu
[ ... ]
> +static u32 hfi_vpu4x_buffer_line_h265d(u32 frame_width, u32 frame_height, bool is_opb,
> + u32 num_vpp_pipes)
> +{
[ ... ]
> + if (is_opb)
> + dpb_obp = size_dpb_opb(frame_height, lcu_size) * num_vpp_pipes;
> +
[ ... ]
> + return ((ALIGN(dpb_obp, DMA_ALIGNMENT) + ALIGN(se_left_lb, DMA_ALIGNMENT) +
> + ALIGN(vsp_left_lb, DMA_ALIGNMENT)) * num_vpp_pipes) +
[Severity: Medium]
Does this code multiply dpb_obp by num_vpp_pipes twice?
Earlier in this function, dpb_obp is calculated with a multiplication by
num_vpp_pipes. Then it is included in the return statement here, where the
sum containing dpb_obp is multiplied by num_vpp_pipes again.
This results in quadratic scaling for the dpb_obp portion of the buffer
size. Is this double multiplication intentional, or should one of the
multipliers be removed to prevent over-allocating the line buffer?
> + ALIGN(fe_left_lb, DMA_ALIGNMENT) + ALIGN(top_lb, DMA_ALIGNMENT) +
> + ALIGN(qp_size, DMA_ALIGNMENT);
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261001-kaanapali-iris-v4-0-642f9ac5e699@oss.qualcomm.com?part=3
next prev parent reply other threads:[~2026-10-01 15:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 15:17 [PATCH v4 0/6] media: iris: add support for kaanapali platform Vikash Garodia
2026-10-01 15:17 ` [PATCH v4 1/6] media: iris: wait for vpu NoC to enter low power during power off Vikash Garodia
2026-10-01 15:28 ` sashiko-bot
2026-10-01 15:17 ` [PATCH v4 2/6] media: dt-bindings: qcom-kaanapali-iris: Add kaanapali video codec binding Vikash Garodia
2026-10-01 15:28 ` sashiko-bot
2026-10-03 14:30 ` Krzysztof Kozlowski
2026-10-13 6:22 ` Krzysztof Kozlowski
2026-10-01 15:17 ` [PATCH v4 3/6] media: iris: add iris4 specific H265 line buffer calculation Vikash Garodia
2026-10-01 15:32 ` sashiko-bot [this message]
2026-10-01 15:17 ` [PATCH v4 4/6] media: iris: add platform data for kaanapali Vikash Garodia
2026-10-01 15:17 ` [PATCH v4 5/6] arm64: dts: qcom: kaanapali: add iris video node Vikash Garodia
2026-10-01 15:17 ` [PATCH v4 6/6] arm64: dts: qcom: kaanapali-mtp: enable iris video node on mtp board Vikash Garodia
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=20261001153221.4FAC61F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=media-ci@linuxtv.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.