Re: [PATCH v5 11/16] media: iris: update buffer requirements based on received info

From: Dmitry Baryshkov

Date: Wed Jul 01 2026 - 09:58:22 EST


On Wed, Jun 24, 2026 at 01:37:12PM +0530, Vikash Garodia wrote:
>
> On 6/16/2026 5:34 AM, Dmitry Baryshkov wrote:
> > Upon receiving data for HFI_PROPERTY_CONFIG_BUFFER_REQUIREMENTS the
> > driver should update buffer sizes and counts from the received data.
> > Implement corresponding functionality updating buffers data. This will
> > be used for upcoming support of AR50Lt platforms with Gen1 firmware.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
> > ---
> > .../platform/qcom/iris/iris_hfi_gen1_response.c | 75 +++++++++++++++++++++-
> > 1 file changed, 74 insertions(+), 1 deletion(-)

> > +static void iris_hfi_gen1_session_property_info(struct iris_inst *inst, void *packet)
> > +{
> > + struct hfi_msg_session_property_info_pkt *pkt = packet;
> > +
> > + if (!pkt->num_properties) {
> > + dev_err(inst->core->dev, "error, no properties\n");
> > + goto out;
> > + }
> > +
> > + switch (pkt->property) {
> > + case HFI_PROPERTY_CONFIG_BUFFER_REQUIREMENTS:
>
> If i check the venus message parsing logic, it loops through the packet till
> it hits the case.

It doesn't, see hfi_session_prop_info()

> Here, we are assuming the first packet type, in the pkt to
> be the property "HFI_PROPERTY_CONFIG_BUFFER_REQUIREMENTS". There can be
> multiple properties in the packet, and if
> "HFI_PROPERTY_CONFIG_BUFFER_REQUIREMENTS" is not the first one, the usecase
> would break with incorrect buffer sizes.
>
> > + iris_hfi_gen1_session_buffer_requirements(inst, pkt->data,
> > + pkt->shdr.hdr.size - sizeof(*pkt));
> > + break;
> > + default:
> > + dev_warn(inst->core->dev, "unknown property id: %x\n", pkt->property);
> > + }
> > +
> > +out:
> > + complete(&inst->completion);
> > +}
> > +
> > struct iris_hfi_gen1_response_pkt_info {
> > u32 pkt;
> > u32 pkt_sz;

--
With best wishes
Dmitry