[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7bbe55387e15f4e1646552a2255cc8cb45732d4d.camel@mediatek.com>
Date: Tue, 29 Aug 2023 07:13:50 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: "chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>,
Shawn Sung (宋孝謙)
<Shawn.Sung@...iatek.com>, "daniel@...ll.ch" <daniel@...ll.ch>,
"p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
"airlied@...il.com" <airlied@...il.com>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
"jassisinghbrar@...il.com" <jassisinghbrar@...il.com>,
"angelogioacchino.delregno@...labora.com"
<angelogioacchino.delregno@...labora.com>
CC: "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
Jason-JH Lin (林睿祥)
<Jason-JH.Lin@...iatek.com>,
Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>,
Singo Chang (張興國)
<Singo.Chang@...iatek.com>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@...iatek.com>
Subject: Re: [PATCH 04/15] mailbox: mtk-cmdq: Support GCE thread loop
Hi, Hsiao-chien:
On Wed, 2023-08-23 at 23:13 +0800, Hsiao Chien Sung wrote:
> Do not disable CMDQ thread if it is a loop.
Once loop thread does not insert CMDQ_CODE_EOC command, this patch
could be dropped.
Regards,
CK
>
> Signed-off-by: Hsiao Chien Sung <shawn.sung@...iatek.com>
> ---
> drivers/mailbox/mtk-cmdq-mailbox.c | 5 +++++
> include/linux/mailbox/mtk-cmdq-mailbox.h | 1 +
> 2 files changed, 6 insertions(+)
>
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
> b/drivers/mailbox/mtk-cmdq-mailbox.c
> index b18d47ea13a0..88ff39a28415 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -264,6 +264,11 @@ static void cmdq_thread_irq_handler(struct cmdq
> *cmdq,
>
> curr_pa = readl(thread->base + CMDQ_THR_CURR_ADDR) << cmdq-
> >pdata->shift;
>
> + task = list_first_entry_or_null(&thread->task_busy_list,
> + struct cmdq_task, list_entry);
> + if (task && task->pkt->loop)
> + return;
> +
> list_for_each_entry_safe(task, tmp, &thread->task_busy_list,
> list_entry) {
> task_end_pa = task->pa_base + task->pkt->cmd_buf_size;
> diff --git a/include/linux/mailbox/mtk-cmdq-mailbox.h
> b/include/linux/mailbox/mtk-cmdq-mailbox.h
> index a8f0070c7aa9..f78a08e7c6ed 100644
> --- a/include/linux/mailbox/mtk-cmdq-mailbox.h
> +++ b/include/linux/mailbox/mtk-cmdq-mailbox.h
> @@ -76,6 +76,7 @@ struct cmdq_pkt {
> size_t cmd_buf_size; /* command occupied
> size */
> size_t buf_size; /* real buffer size */
> void *cl;
> + bool loop;
> };
>
> u8 cmdq_get_shift_pa(struct mbox_chan *chan);
Powered by blists - more mailing lists