diff mbox series

[v2,09/23] media: iris: Skip flush on first sequence change

Message ID 20250428-qcom-iris-hevc-vp9-v2-9-3a6013ecb8a5@quicinc.com
State New
Headers show
Series Add support for HEVC and VP9 codecs in decoder | expand

Commit Message

Dikshita Agarwal April 28, 2025, 9:28 a.m. UTC
Add a condition to skip the flush operation during the first sequence
change event. At this point, the capture queue is not streaming, making
the flush unnecessary.

Additionally, remove the reinit_completion call for the flush completion
signal, as it is not needed. This simplifies the code and avoids
unnecessary reinitialization.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
---
 drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Vikash Garodia April 29, 2025, 10:19 a.m. UTC | #1
On 4/28/2025 2:58 PM, Dikshita Agarwal wrote:
> Add a condition to skip the flush operation during the first sequence
> change event. At this point, the capture queue is not streaming, making
> the flush unnecessary.
> 
> Additionally, remove the reinit_completion call for the flush completion
> signal, as it is not needed. This simplifies the code and avoids
> unnecessary reinitialization.
> 
> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> ---
>  drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c b/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c
> index ba858abab336..dfca45d85759 100644
> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c
> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c
> @@ -201,8 +201,7 @@ static void iris_hfi_gen1_event_seq_changed(struct iris_inst *inst,
>  
>  	iris_hfi_gen1_read_changed_params(inst, pkt);
>  
> -	if (inst->state != IRIS_INST_ERROR) {
> -		reinit_completion(&inst->flush_completion);
> +	if (inst->state != IRIS_INST_ERROR && !(inst->sub_state & IRIS_INST_SUB_FIRST_IPSC)) {
>  
>  		flush_pkt.shdr.hdr.size = sizeof(struct hfi_session_flush_pkt);
>  		flush_pkt.shdr.hdr.pkt_type = HFI_CMD_SESSION_FLUSH;
> 
>
Acked-by: Vikash Garodia <quic_vgarodia@quicinc.com>
diff mbox series

Patch

diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c b/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c
index ba858abab336..dfca45d85759 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c
@@ -201,8 +201,7 @@  static void iris_hfi_gen1_event_seq_changed(struct iris_inst *inst,
 
 	iris_hfi_gen1_read_changed_params(inst, pkt);
 
-	if (inst->state != IRIS_INST_ERROR) {
-		reinit_completion(&inst->flush_completion);
+	if (inst->state != IRIS_INST_ERROR && !(inst->sub_state & IRIS_INST_SUB_FIRST_IPSC)) {
 
 		flush_pkt.shdr.hdr.size = sizeof(struct hfi_session_flush_pkt);
 		flush_pkt.shdr.hdr.pkt_type = HFI_CMD_SESSION_FLUSH;