From: Jason-JH.Lin <jason-jh.lin@mediatek.com>
To: Jassi Brar <jassisinghbrar@gmail.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>,
Jason-ch Chen <jason-ch.chen@mediatek.com>,
Johnson Wang <johnson.wang@mediatek.com>,
"Jason-JH . Lin" <jason-jh.lin@mediatek.com>,
Singo Chang <singo.chang@mediatek.com>,
Nancy Lin <nancy.lin@mediatek.com>,
Shawn Sung <shawn.sung@mediatek.com>,
<Project_Global_Chrome_Upstream_Group@mediatek.com>
Subject: [PATCH 2/2] mailbox: mtk-cmdq: Add set GCE thread timeout interface
Date: Wed, 10 Jan 2024 23:51:48 +0800 [thread overview]
Message-ID: <20240110155148.6383-3-jason-jh.lin@mediatek.com> (raw)
In-Reply-To: <20240110155148.6383-1-jason-jh.lin@mediatek.com>
Add cmdq_mbox_set_thread_timeout() to configue interrupt timeout
for the GCE thread used by CMDQ client drivers.
Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
---
drivers/mailbox/mtk-cmdq-mailbox.c | 11 +++++++++++
include/linux/mailbox/mtk-cmdq-mailbox.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index 89567f837513..9c0b5a43bf9f 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -122,6 +122,17 @@ u8 cmdq_get_shift_pa(struct mbox_chan *chan)
}
EXPORT_SYMBOL(cmdq_get_shift_pa);
+void cmdq_mbox_set_thread_timeout(void *chan, u32 timeout)
+{
+ struct cmdq_thread *thread = ((struct mbox_chan *)chan)->con_priv;
+ unsigned long flags;
+
+ spin_lock_irqsave(&thread->chan->lock, flags);
+ thread->timeout_ms = timeout;
+ spin_unlock_irqrestore(&thread->chan->lock, flags);
+}
+EXPORT_SYMBOL(cmdq_mbox_set_thread_timeout);
+
static int cmdq_thread_suspend(struct cmdq *cmdq, struct cmdq_thread *thread)
{
u32 status;
diff --git a/include/linux/mailbox/mtk-cmdq-mailbox.h b/include/linux/mailbox/mtk-cmdq-mailbox.h
index 4973b2ec37db..59c9f8ebd01f 100644
--- a/include/linux/mailbox/mtk-cmdq-mailbox.h
+++ b/include/linux/mailbox/mtk-cmdq-mailbox.h
@@ -82,5 +82,6 @@ struct cmdq_pkt {
};
u8 cmdq_get_shift_pa(struct mbox_chan *chan);
+void cmdq_mbox_set_thread_timeout(void *chan, u32 timeout);
#endif /* __MTK_CMDQ_MAILBOX_H__ */
--
2.18.0
prev parent reply other threads:[~2024-01-10 15:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 15:51 [PATCH 0/2] Change GCE hardware timeout to software timeout Jason-JH.Lin
2024-01-10 15:51 ` [PATCH 1/2] mailbox: mtk-cmdq: " Jason-JH.Lin
2024-01-11 1:50 ` CK Hu (胡俊光)
2024-01-12 6:52 ` Jason-JH Lin (林睿祥)
2024-01-10 15:51 ` Jason-JH.Lin [this message]
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=20240110155148.6383-3-jason-jh.lin@mediatek.com \
--to=jason-jh.lin@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=jason-ch.chen@mediatek.com \
--cc=jassisinghbrar@gmail.com \
--cc=johnson.wang@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=nancy.lin@mediatek.com \
--cc=shawn.sung@mediatek.com \
--cc=singo.chang@mediatek.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
all inboxes | Powered by JetHome®