From: "Jackson.lee" <jackson.lee@chipsnmedia.com>
To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
sebastian.fricke@collabora.com, nicolas.dufresne@collabora.com,
bob.beckett@collabora.com, dafna.hirschfeld@collabora.com
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
jackson.lee@chipsnmedia.com, lafley.kim@chipsnmedia.com,
b-brnich@ti.com, hverkuil@xs4all.nl, nas.chung@chipsnmedia.com
Subject: [RESEND PATCH v1 3/7] media: chips-media: wave5: Fix not to be closed
Date: Thu, 10 Apr 2025 12:39:58 +0900 [thread overview]
Message-ID: <20250410034002.88-4-jackson.lee@chipsnmedia.com> (raw)
In-Reply-To: <20250410034002.88-1-jackson.lee@chipsnmedia.com>
From: Jackson Lee <jackson.lee@chipsnmedia.com>
The current code was to wait interrupt if queue or report queue is not 0,
but since applying the performance patch, input and output is not any
more synchronized.
So even if queue count is not 0, an interrupt could not be triggered.
Signed-off-by: Jackson Lee <jackson.lee@chipsnmedia.com>
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
---
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 6 +++---
drivers/media/platform/chips-media/wave5/wave5-vpuconfig.h | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
index 192556b91aaa..e0f4b11ee464 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
@@ -1481,11 +1481,11 @@ static void wave5_vpu_dec_stop_streaming(struct vb2_queue *q)
wave5_vpu_dec_give_command(inst, DEC_GET_QUEUE_STATUS, &q_status);
- if (q_status.report_queue_count == 0)
+ if ((inst->state == VPU_INST_STATE_STOP || q_status.instance_queue_count == 0) &&
+ q_status.report_queue_count == 0)
break;
- if (wave5_vpu_wait_interrupt(inst, VPU_DEC_TIMEOUT) < 0)
- break;
+ wave5_vpu_wait_interrupt(inst, VPU_DEC_STOP_TIMEOUT);
if (wave5_vpu_dec_get_output_info(inst, &dec_output_info))
dev_dbg(inst->dev->dev, "there is no output info\n");
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpuconfig.h b/drivers/media/platform/chips-media/wave5/wave5-vpuconfig.h
index 1ea9f5f31499..4ebd48d5550e 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpuconfig.h
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpuconfig.h
@@ -59,6 +59,7 @@
// application specific configuration
#define VPU_ENC_TIMEOUT 60000
#define VPU_DEC_TIMEOUT 60000
+#define VPU_DEC_STOP_TIMEOUT 10
// for WAVE encoder
#define USE_SRC_PRP_AXI 0
--
2.43.0
next prev parent reply other threads:[~2025-04-10 3:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 3:39 [RESEND PATCH v1 0/7] Performance improvement of decoder Jackson.lee
2025-04-10 3:39 ` [RESEND PATCH v1 1/7] media: chips-media: wave5: Fix Null reference while testing fluster Jackson.lee
2025-04-10 3:39 ` [RESEND PATCH v1 2/7] media: chips-media: wave5: Improve performance of decoder Jackson.lee
2025-04-10 3:39 ` Jackson.lee [this message]
2025-04-10 3:39 ` [RESEND PATCH v1 4/7] media: chips-media: wave5: Use spinlock whenever state is changed Jackson.lee
2025-04-10 3:40 ` [RESEND PATCH v1 5/7] media: chips-media: wave5: Fix not to free resources normally when instance was destroyed Jackson.lee
2025-04-10 3:40 ` [RESEND PATCH v1 6/7] media: chips-media: wave5: Reduce high CPU load Jackson.lee
2025-04-10 3:40 ` [RESEND PATCH v1 7/7] media: chips-media: wave5: Fix SError of kernel panic when closed Jackson.lee
2025-04-10 12:39 ` [RESEND PATCH v1 0/7] Performance improvement of decoder Nicolas Dufresne
2025-04-11 0:49 ` jackson.lee
2025-04-11 15:47 ` Nicolas Dufresne
2025-04-14 1:44 ` jackson.lee
2025-04-11 16:57 ` Nicolas Dufresne
2025-04-14 2:04 ` jackson.lee
2025-04-14 13:28 ` Nicolas Dufresne
2025-04-29 5:59 ` jackson.lee
2025-05-07 4:57 ` jackson.lee
2025-05-07 12:56 ` Nicolas Dufresne
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=20250410034002.88-4-jackson.lee@chipsnmedia.com \
--to=jackson.lee@chipsnmedia.com \
--cc=b-brnich@ti.com \
--cc=bob.beckett@collabora.com \
--cc=dafna.hirschfeld@collabora.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=hverkuil@xs4all.nl \
--cc=lafley.kim@chipsnmedia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nas.chung@chipsnmedia.com \
--cc=nicolas.dufresne@collabora.com \
--cc=sebastian.fricke@collabora.com \
/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