Re: [PATCH v7 15/18] media: iris: Introduce buffer size calculations for AR50LT

From: Dmitry Baryshkov

Date: Tue Jul 21 2026 - 19:34:38 EST


On Tue, Jul 21, 2026 at 09:00:11PM +0530, Vikash Garodia wrote:
>
> On 7/9/2026 7:12 PM, Dmitry Baryshkov wrote:
> > From: Dikshita Agarwal <dikshita.agarwal@xxxxxxxxxxxxxxxx>
> >
> > Introduces AR50LT buffer size calculation for both encoder and
> > decoder. Reuse the buffer size calculation which are common, while
> > adding the AR50LT specific ones separately.
> >
> > Signed-off-by: Dikshita Agarwal <dikshita.agarwal@xxxxxxxxxxxxxxxx>
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
> > ---
> > drivers/media/platform/qcom/iris/iris_vpu_buffer.c | 365 +++++++++++++++++++++
> > drivers/media/platform/qcom/iris/iris_vpu_buffer.h | 37 +++
> > 2 files changed, 402 insertions(+)
> >
> > +static inline
> > +u32 hfi_buffer_line_h265d_ar50lt(u32 frame_width, u32 frame_height)
> > +{
> > + u32 size;
> > +
> > + size = ALIGN(size_h265d_lb_fe_top_data_ar50lt(frame_width, frame_height), DMA_ALIGNMENT) +
> > + ALIGN(size_h265d_lb_fe_top_ctrl(frame_width, frame_height), DMA_ALIGNMENT) +
> > + ALIGN(size_h265d_lb_fe_left_ctrl(frame_width, frame_height), DMA_ALIGNMENT) +
> > + ALIGN(size_h265d_lb_se_left_ctrl_ar50lt(frame_width, frame_height), DMA_ALIGNMENT) +
> > + ALIGN(size_h265d_lb_se_top_ctrl(frame_width, frame_height), DMA_ALIGNMENT) +
> > + ALIGN(size_h265d_lb_pe_top_data_ar50lt(frame_width, frame_height), DMA_ALIGNMENT) +
> > + ALIGN(size_h265d_lb_vsp_top(frame_width, frame_height), DMA_ALIGNMENT) +
> > + ALIGN(size_h265d_lb_vsp_left(frame_width, frame_height), DMA_ALIGNMENT) +
> > + ALIGN(size_h265d_lb_recon_dma_metadata_wr(frame_width, frame_height), DMA_ALIGNMENT) * 4 +
>
> WARNING: line length of 106 exceeds 100 columns
> #312: FILE: drivers/media/platform/qcom/iris/iris_vpu_buffer.c:587:
> + ALIGN(size_h265d_lb_recon_dma_metadata_wr(frame_width,
> frame_height), DMA_ALIGNMENT) * 4 +

I'd prefer to keep it for readability.

>
> > + ALIGN(size_h265d_qp(frame_width, frame_height), DMA_ALIGNMENT);
> > +
> > + return ALIGN(size, DMA_ALIGNMENT);
> > +}
> > +

--
With best wishes
Dmitry