mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vikash Garodia <quic_vgarodia@quicinc.com>
To: Dikshita Agarwal <quic_dikshita@quicinc.com>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Stefan Schmidt <stefan.schmidt@linaro.org>,
	"Vedang Nagar" <quic_vnagar@quicinc.com>
Cc: <linux-media@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 07/25] media: iris: Always destroy internal buffers on firmware release response
Date: Wed, 16 Jul 2025 12:26:11 +0530	[thread overview]
Message-ID: <4e785185-10bd-a3d1-0ed9-53dd6be33acc@quicinc.com> (raw)
In-Reply-To: <20250704-iris-video-encoder-v1-7-b6ce24e273cf@quicinc.com>



On 7/4/2025 1:23 PM, Dikshita Agarwal wrote:
> Currently, internal buffers are destroyed only if 'PENDING_RELEASE' flag
> is set when a release response is received from the firmware, which is
> incorrect. Internal buffers should always be destroyed when the firmware
> explicitly releases it, regardless of whether the 'PENDING_RELEASE' flag
> was set by the driver. This is specially important during force-stop
> scenarios, where the firmware may release buffers without driver marking
> them for release.
> Fix this by removing the incorrect check and ensuring all buffers are
> properly cleaned up.
> 
> Fixes: 73702f45db81 ("media: iris: allocate, initialize and queue internal buffers")
> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> ---
>  drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c
> index a8c30fc5c0d0668cc9980f2fcfcf21072cf9ef0a..dda775d463e916f70da0b879702d96df18ea8bf7 100644
> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c
> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c
> @@ -424,7 +424,6 @@ static int iris_hfi_gen2_handle_release_internal_buffer(struct iris_inst *inst,
>  	struct iris_buffers *buffers = &inst->buffers[buf_type];
>  	struct iris_buffer *buf, *iter;
>  	bool found = false;
> -	int ret = 0;
>  
>  	list_for_each_entry(iter, &buffers->list, list) {
>  		if (iter->device_addr == buffer->base_address) {
> @@ -437,10 +436,8 @@ static int iris_hfi_gen2_handle_release_internal_buffer(struct iris_inst *inst,
>  		return -EINVAL;
>  
>  	buf->attr &= ~BUF_ATTR_QUEUED;
> -	if (buf->attr & BUF_ATTR_PENDING_RELEASE)
> -		ret = iris_destroy_internal_buffer(inst, buf);
>  
> -	return ret;
> +	return iris_destroy_internal_buffer(inst, buf);
>  }
>  
>  static int iris_hfi_gen2_handle_session_stop(struct iris_inst *inst,
> 

Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com>

  reply	other threads:[~2025-07-16  6:56 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-04  7:53 [PATCH 00/25] Enable H.264/H.265 encoder support and fixes in common code Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 01/25] media: iris: Fix buffer count reporting in internal buffer check Dikshita Agarwal
2025-07-16  6:04   ` Vikash Garodia
2025-08-11  9:54   ` Bryan O'Donoghue
2025-07-04  7:53 ` [PATCH 02/25] media: iris: Report unreleased PERSIST buffers on session close Dikshita Agarwal
2025-07-16  6:06   ` Vikash Garodia
2025-07-04  7:53 ` [PATCH 03/25] media: iris: Fix memory leak by freeing untracked persist buffer Dikshita Agarwal
2025-07-16  6:07   ` Vikash Garodia
2025-07-04  7:53 ` [PATCH 04/25] media: iris: Fix buffer timestamp handling Dikshita Agarwal
2025-07-16  6:08   ` Vikash Garodia
2025-07-04  7:53 ` [PATCH 05/25] media: iris: Fix port streaming handling Dikshita Agarwal
2025-07-16  6:48   ` Vikash Garodia
2025-07-04  7:53 ` [PATCH 06/25] media: iris: Allow substate transition to load resources during output streaming Dikshita Agarwal
2025-07-16  6:52   ` Vikash Garodia
2025-07-04  7:53 ` [PATCH 07/25] media: iris: Always destroy internal buffers on firmware release response Dikshita Agarwal
2025-07-16  6:56   ` Vikash Garodia [this message]
2025-07-04  7:53 ` [PATCH 08/25] media: iris: Update vbuf flags before v4l2_m2m_buf_done Dikshita Agarwal
2025-07-16  6:56   ` Vikash Garodia
2025-07-04  7:53 ` [PATCH 09/25] media: iris: Allow stop on firmware only if start was issued Dikshita Agarwal
2025-07-16  7:13   ` Vikash Garodia
2025-07-04  7:53 ` [PATCH 10/25] media: iris: Send dummy buffer address for all codecs during drain Dikshita Agarwal
2025-07-16  7:14   ` Vikash Garodia
2025-07-04  7:53 ` [PATCH 11/25] media: iris: Fix missing LAST flag handling " Dikshita Agarwal
2025-07-16  7:26   ` Vikash Garodia
2025-07-04  7:53 ` [PATCH 12/25] media: iris: Add support for video encoder device Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 13/25] media: iris: Initialize and deinitialize encoder instance structure Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 14/25] media: iris: Add support for ENUM_FMT, S/G/TRY_FMT encoder Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 15/25] media: iris: Add support for ENUM_FRAMESIZES/FRAMEINTERVALS for encoder Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 16/25] media: iris: Add support for VIDIOC_QUERYCAP for encoder video device Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 17/25] media: iris: Add encoder support for V4L2 event subscription Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 18/25] media: iris: Add support for G/S_SELECTION for encoder video device Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 19/25] media: iris: Add support for G/S_PARM " Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 20/25] media: iris: Add platform-specific capabilities " Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 21/25] media: iris: Add V4L2 streaming support " Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 22/25] media: iris: Set platform capabilities to firmware " Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 23/25] media: iris: Allocate and queue internal buffers " Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 24/25] media: iris: Add support for buffer management ioctls for encoder device Dikshita Agarwal
2025-07-04  7:53 ` [PATCH 25/25] media: iris: Add support for drain sequence in encoder video device Dikshita Agarwal
2025-07-17  5:35 ` [PATCH 00/25] Enable H.264/H.265 encoder support and fixes in common code Vikash Garodia
2025-07-23  6:40 ` Dikshita Agarwal
2025-07-23  8:34   ` Bryan O'Donoghue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e785185-10bd-a3d1-0ed9-53dd6be33acc@quicinc.com \
    --to=quic_vgarodia@quicinc.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=bryan.odonoghue@linaro.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=quic_dikshita@quicinc.com \
    --cc=quic_vnagar@quicinc.com \
    --cc=stefan.schmidt@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®