summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>2025-12-29 12:01:22 +0530
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-01-20 14:00:12 +0100
commit1dabf00ee206eceb0f08a1fe5d1ce635f9064338 (patch)
tree3d3a413ea3816b98e472d21041dba4996aff43c6
parent811dbc546f47559dc9d2098c612acfd47e32479e (diff)
media: iris: gen1: Destroy internal buffers after FW releases
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@linaro.org> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com> Cc: stable@vger.kernel.org Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
-rw-r--r--drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c2
1 files changed, 2 insertions, 0 deletions
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 1c107daca9e8..11815f6f5bac 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);