* [PATCH] media: iris: Fix encoder reference buffer size calculation
@ 2026-10-30 20:13 Vishnu Reddy
2026-11-20 17:02 ` bod
0 siblings, 1 reply; 2+ messages in thread
From: Vishnu Reddy @ 2026-10-30 20:13 UTC (permalink / raw)
To: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab, Hans Verkuil
Cc: linux-media, linux-arm-msm, linux-kernel, stable, Vishnu Reddy
For frame widths that are not multiples of 128, such as 864, the
encoder reference buffer size is underestimated. As a result, the
firmware reports a session error when starting the encode session.
The encoder requires the reference buffer width to be aligned to 128,
but the current calculation aligns it to only 32. Align the width to
128 when calculating the reference buffer size.
Fixes: 61528e86687e ("media: iris: Allocate and queue internal buffers for encoder video device")
Cc: stable@vger.kernel.org
Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
---
drivers/media/platform/qcom/iris/iris_vpu_buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c
index a8170e5fa9e6..2eaa2218f6a4 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c
@@ -1517,7 +1517,7 @@ u32 size_enc_ref_buffer(u32 frame_width, u32 frame_height)
{
u32 u_chroma_buffer_height = ALIGN(frame_height >> 1, 32);
u32 u_buffer_height = ALIGN(frame_height, 32);
- u32 u_buffer_width = ALIGN(frame_width, 32);
+ u32 u_buffer_width = ALIGN(frame_width, 128);
return (u_buffer_height + u_chroma_buffer_height) * u_buffer_width;
}
---
base-commit: 7649ba73f9e7e1e04d0b46213e39c79ae09dd55c
change-id: 20261030-fix_enc_ref_buf_calc-c0e73537063f
Best regards,
--
Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] media: iris: Fix encoder reference buffer size calculation
2026-10-30 20:13 [PATCH] media: iris: Fix encoder reference buffer size calculation Vishnu Reddy
@ 2026-11-20 17:02 ` bod
0 siblings, 0 replies; 2+ messages in thread
From: bod @ 2026-11-20 17:02 UTC (permalink / raw)
To: Vishnu Reddy
Cc: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab, Hans Verkuil,
linux-media, linux-arm-msm, linux-kernel, stable
On 2026-10-31 01:43 +0530, Vishnu Reddy wrote:
> For frame widths that are not multiples of 128, such as 864, the
> encoder reference buffer size is underestimated. As a result, the
> firmware reports a session error when starting the encode session.
>
> The encoder requires the reference buffer width to be aligned to 128,
> but the current calculation aligns it to only 32. Align the width to
> 128 when calculating the reference buffer size.
>
> Fixes: 61528e86687e ("media: iris: Allocate and queue internal buffers for encoder video device")
> Cc: stable@vger.kernel.org
> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
bod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-20 17:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-30 20:13 [PATCH] media: iris: Fix encoder reference buffer size calculation Vishnu Reddy
2026-11-20 17:02 ` bod
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®