Re: [PATCH v2 3/6] media: iris: gen1: Destroy internal buffers after FW releases
From: Vikash Garodia
Date: Wed Jan 07 2026 - 05:28:01 EST
On 12/29/2025 12:01 PM, Dikshita Agarwal wrote:
After the firmware releases internal buffers, the driver was not
destroying them. This left stale allocations that were no longer used,
especially across resolution changes where new buffers are allocated per
the updated requirements. As a result, memory was wasted until session
close.
Destroy internal buffers once the release response is received from the
firmware.
Fixes: 73702f45db81 ("media: iris: allocate, initialize and queue internal buffers")
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
Signed-off-by: Dikshita Agarwal <dikshita.agarwal@xxxxxxxxxxxxxxxx>
---
drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c
index 5087e51daa842515e9d62730680fb237bf274efa..5ff71e25597b61587c674142feb99626e402c893 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c
@@ -441,6 +441,8 @@ static int iris_hfi_gen1_session_unset_buffers(struct iris_inst *inst, struct ir
goto exit;
ret = iris_wait_for_session_response(inst, false);
+ if (!ret)
+ ret = iris_destroy_internal_buffer(inst, buf);
exit:
kfree(pkt);
Reviewed-by: Vikash Garodia<vikash.garodia@xxxxxxxxxxxxxxxx>