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

From: Vikash Garodia

Date: Tue Jul 07 2026 - 09:37:48 EST



On 7/1/2026 6:55 PM, Dmitry Baryshkov wrote:
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()


I see the loop happens a layer before during msg processing in iris_hfi_gen1_response_handler(). It calls for iris_hfi_gen1_session_property_info() for every packet of session property type, i was wrong in assuming that one property packet would have multiple property types in it.

Logic is fine.

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;


Reviewed-by: Vikash Garodia <vikash.garodia@xxxxxxxxxxxxxxxx>