All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: mediatek: cmdq: Remove cmdq_pkt_flush()
@ 2020-12-02 23:58 ` Chun-Kuang Hu
  0 siblings, 0 replies; 12+ messages in thread
From: Chun-Kuang Hu @ 2020-12-02 23:58 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: linux-kernel, dri-devel, linux-mediatek, linux-arm-kernel, Chun-Kuang Hu

rx_callback is a standard mailbox callback mechanism and could
cover the function of proprietary cmdq_task_cb, so it is better
to use the standard one instead of the proprietary one. But
register rx_callback should before mbox_request_channel(),
so remove cmdq_pkt_flush() and let client driver implement
its own synchronous flush.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
---
 drivers/soc/mediatek/mtk-cmdq-helper.c | 32 --------------------------
 include/linux/soc/mediatek/mtk-cmdq.h  | 12 ----------
 2 files changed, 44 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
index 505651b0d715..fd3bc39538a1 100644
--- a/drivers/soc/mediatek/mtk-cmdq-helper.c
+++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
@@ -502,36 +502,4 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
 }
 EXPORT_SYMBOL(cmdq_pkt_flush_async);
 
-struct cmdq_flush_completion {
-	struct completion cmplt;
-	bool err;
-};
-
-static void cmdq_pkt_flush_cb(struct cmdq_cb_data data)
-{
-	struct cmdq_flush_completion *cmplt;
-
-	cmplt = (struct cmdq_flush_completion *)data.data;
-	if (data.sta != CMDQ_CB_NORMAL)
-		cmplt->err = true;
-	else
-		cmplt->err = false;
-	complete(&cmplt->cmplt);
-}
-
-int cmdq_pkt_flush(struct cmdq_pkt *pkt)
-{
-	struct cmdq_flush_completion cmplt;
-	int err;
-
-	init_completion(&cmplt.cmplt);
-	err = cmdq_pkt_flush_async(pkt, cmdq_pkt_flush_cb, &cmplt);
-	if (err < 0)
-		return err;
-	wait_for_completion(&cmplt.cmplt);
-
-	return cmplt.err ? -EFAULT : 0;
-}
-EXPORT_SYMBOL(cmdq_pkt_flush);
-
 MODULE_LICENSE("GPL v2");
diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h
index 960704d75994..2c6aa84c0e80 100644
--- a/include/linux/soc/mediatek/mtk-cmdq.h
+++ b/include/linux/soc/mediatek/mtk-cmdq.h
@@ -288,16 +288,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
 int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
 			 void *data);
 
-/**
- * cmdq_pkt_flush() - trigger CMDQ to execute the CMDQ packet
- * @pkt:	the CMDQ packet
- *
- * Return: 0 for success; else the error code is returned
- *
- * Trigger CMDQ to execute the CMDQ packet. Note that this is a
- * synchronous flush function. When the function returned, the recorded
- * commands have been done.
- */
-int cmdq_pkt_flush(struct cmdq_pkt *pkt);
-
 #endif	/* __MTK_CMDQ_H__ */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] soc: mediatek: cmdq: Remove cmdq_pkt_flush()
@ 2020-12-02 23:58 ` Chun-Kuang Hu
  0 siblings, 0 replies; 12+ messages in thread
From: Chun-Kuang Hu @ 2020-12-02 23:58 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: linux-arm-kernel, Chun-Kuang Hu, linux-mediatek, linux-kernel, dri-devel

rx_callback is a standard mailbox callback mechanism and could
cover the function of proprietary cmdq_task_cb, so it is better
to use the standard one instead of the proprietary one. But
register rx_callback should before mbox_request_channel(),
so remove cmdq_pkt_flush() and let client driver implement
its own synchronous flush.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
---
 drivers/soc/mediatek/mtk-cmdq-helper.c | 32 --------------------------
 include/linux/soc/mediatek/mtk-cmdq.h  | 12 ----------
 2 files changed, 44 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
index 505651b0d715..fd3bc39538a1 100644
--- a/drivers/soc/mediatek/mtk-cmdq-helper.c
+++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
@@ -502,36 +502,4 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
 }
 EXPORT_SYMBOL(cmdq_pkt_flush_async);
 
-struct cmdq_flush_completion {
-	struct completion cmplt;
-	bool err;
-};
-
-static void cmdq_pkt_flush_cb(struct cmdq_cb_data data)
-{
-	struct cmdq_flush_completion *cmplt;
-
-	cmplt = (struct cmdq_flush_completion *)data.data;
-	if (data.sta != CMDQ_CB_NORMAL)
-		cmplt->err = true;
-	else
-		cmplt->err = false;
-	complete(&cmplt->cmplt);
-}
-
-int cmdq_pkt_flush(struct cmdq_pkt *pkt)
-{
-	struct cmdq_flush_completion cmplt;
-	int err;
-
-	init_completion(&cmplt.cmplt);
-	err = cmdq_pkt_flush_async(pkt, cmdq_pkt_flush_cb, &cmplt);
-	if (err < 0)
-		return err;
-	wait_for_completion(&cmplt.cmplt);
-
-	return cmplt.err ? -EFAULT : 0;
-}
-EXPORT_SYMBOL(cmdq_pkt_flush);
-
 MODULE_LICENSE("GPL v2");
diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h
index 960704d75994..2c6aa84c0e80 100644
--- a/include/linux/soc/mediatek/mtk-cmdq.h
+++ b/include/linux/soc/mediatek/mtk-cmdq.h
@@ -288,16 +288,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
 int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
 			 void *data);
 
-/**
- * cmdq_pkt_flush() - trigger CMDQ to execute the CMDQ packet
- * @pkt:	the CMDQ packet
- *
- * Return: 0 for success; else the error code is returned
- *
- * Trigger CMDQ to execute the CMDQ packet. Note that this is a
- * synchronous flush function. When the function returned, the recorded
- * commands have been done.
- */
-int cmdq_pkt_flush(struct cmdq_pkt *pkt);
-
 #endif	/* __MTK_CMDQ_H__ */
-- 
2.17.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] soc: mediatek: cmdq: Remove cmdq_pkt_flush()
@ 2020-12-02 23:58 ` Chun-Kuang Hu
  0 siblings, 0 replies; 12+ messages in thread
From: Chun-Kuang Hu @ 2020-12-02 23:58 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: linux-arm-kernel, Chun-Kuang Hu, linux-mediatek, linux-kernel, dri-devel

rx_callback is a standard mailbox callback mechanism and could
cover the function of proprietary cmdq_task_cb, so it is better
to use the standard one instead of the proprietary one. But
register rx_callback should before mbox_request_channel(),
so remove cmdq_pkt_flush() and let client driver implement
its own synchronous flush.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
---
 drivers/soc/mediatek/mtk-cmdq-helper.c | 32 --------------------------
 include/linux/soc/mediatek/mtk-cmdq.h  | 12 ----------
 2 files changed, 44 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
index 505651b0d715..fd3bc39538a1 100644
--- a/drivers/soc/mediatek/mtk-cmdq-helper.c
+++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
@@ -502,36 +502,4 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
 }
 EXPORT_SYMBOL(cmdq_pkt_flush_async);
 
-struct cmdq_flush_completion {
-	struct completion cmplt;
-	bool err;
-};
-
-static void cmdq_pkt_flush_cb(struct cmdq_cb_data data)
-{
-	struct cmdq_flush_completion *cmplt;
-
-	cmplt = (struct cmdq_flush_completion *)data.data;
-	if (data.sta != CMDQ_CB_NORMAL)
-		cmplt->err = true;
-	else
-		cmplt->err = false;
-	complete(&cmplt->cmplt);
-}
-
-int cmdq_pkt_flush(struct cmdq_pkt *pkt)
-{
-	struct cmdq_flush_completion cmplt;
-	int err;
-
-	init_completion(&cmplt.cmplt);
-	err = cmdq_pkt_flush_async(pkt, cmdq_pkt_flush_cb, &cmplt);
-	if (err < 0)
-		return err;
-	wait_for_completion(&cmplt.cmplt);
-
-	return cmplt.err ? -EFAULT : 0;
-}
-EXPORT_SYMBOL(cmdq_pkt_flush);
-
 MODULE_LICENSE("GPL v2");
diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h
index 960704d75994..2c6aa84c0e80 100644
--- a/include/linux/soc/mediatek/mtk-cmdq.h
+++ b/include/linux/soc/mediatek/mtk-cmdq.h
@@ -288,16 +288,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
 int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
 			 void *data);
 
-/**
- * cmdq_pkt_flush() - trigger CMDQ to execute the CMDQ packet
- * @pkt:	the CMDQ packet
- *
- * Return: 0 for success; else the error code is returned
- *
- * Trigger CMDQ to execute the CMDQ packet. Note that this is a
- * synchronous flush function. When the function returned, the recorded
- * commands have been done.
- */
-int cmdq_pkt_flush(struct cmdq_pkt *pkt);
-
 #endif	/* __MTK_CMDQ_H__ */
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] soc: mediatek: cmdq: Remove cmdq_pkt_flush()
@ 2020-12-02 23:58 ` Chun-Kuang Hu
  0 siblings, 0 replies; 12+ messages in thread
From: Chun-Kuang Hu @ 2020-12-02 23:58 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: linux-arm-kernel, Chun-Kuang Hu, linux-mediatek, linux-kernel, dri-devel

rx_callback is a standard mailbox callback mechanism and could
cover the function of proprietary cmdq_task_cb, so it is better
to use the standard one instead of the proprietary one. But
register rx_callback should before mbox_request_channel(),
so remove cmdq_pkt_flush() and let client driver implement
its own synchronous flush.

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
---
 drivers/soc/mediatek/mtk-cmdq-helper.c | 32 --------------------------
 include/linux/soc/mediatek/mtk-cmdq.h  | 12 ----------
 2 files changed, 44 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
index 505651b0d715..fd3bc39538a1 100644
--- a/drivers/soc/mediatek/mtk-cmdq-helper.c
+++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
@@ -502,36 +502,4 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
 }
 EXPORT_SYMBOL(cmdq_pkt_flush_async);
 
-struct cmdq_flush_completion {
-	struct completion cmplt;
-	bool err;
-};
-
-static void cmdq_pkt_flush_cb(struct cmdq_cb_data data)
-{
-	struct cmdq_flush_completion *cmplt;
-
-	cmplt = (struct cmdq_flush_completion *)data.data;
-	if (data.sta != CMDQ_CB_NORMAL)
-		cmplt->err = true;
-	else
-		cmplt->err = false;
-	complete(&cmplt->cmplt);
-}
-
-int cmdq_pkt_flush(struct cmdq_pkt *pkt)
-{
-	struct cmdq_flush_completion cmplt;
-	int err;
-
-	init_completion(&cmplt.cmplt);
-	err = cmdq_pkt_flush_async(pkt, cmdq_pkt_flush_cb, &cmplt);
-	if (err < 0)
-		return err;
-	wait_for_completion(&cmplt.cmplt);
-
-	return cmplt.err ? -EFAULT : 0;
-}
-EXPORT_SYMBOL(cmdq_pkt_flush);
-
 MODULE_LICENSE("GPL v2");
diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h
index 960704d75994..2c6aa84c0e80 100644
--- a/include/linux/soc/mediatek/mtk-cmdq.h
+++ b/include/linux/soc/mediatek/mtk-cmdq.h
@@ -288,16 +288,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
 int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
 			 void *data);
 
-/**
- * cmdq_pkt_flush() - trigger CMDQ to execute the CMDQ packet
- * @pkt:	the CMDQ packet
- *
- * Return: 0 for success; else the error code is returned
- *
- * Trigger CMDQ to execute the CMDQ packet. Note that this is a
- * synchronous flush function. When the function returned, the recorded
- * commands have been done.
- */
-int cmdq_pkt_flush(struct cmdq_pkt *pkt);
-
 #endif	/* __MTK_CMDQ_H__ */
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: mediatek: cmdq: Remove cmdq_pkt_flush()
  2020-12-02 23:58 ` Chun-Kuang Hu
  (?)
  (?)
@ 2021-01-09 22:59   ` Chun-Kuang Hu
  -1 siblings, 0 replies; 12+ messages in thread
From: Chun-Kuang Hu @ 2021-01-09 22:59 UTC (permalink / raw)
  To: Chun-Kuang Hu
  Cc: Matthias Brugger, linux-kernel, DRI Development,
	moderated list:ARM/Mediatek SoC support, Linux ARM

Hi, Matthias:

Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2020年12月3日 週四 上午7:59寫道:
>
> rx_callback is a standard mailbox callback mechanism and could
> cover the function of proprietary cmdq_task_cb, so it is better
> to use the standard one instead of the proprietary one. But
> register rx_callback should before mbox_request_channel(),
> so remove cmdq_pkt_flush() and let client driver implement
> its own synchronous flush.

How do you think about this patch? This patch is derived from [1]
according to Jassi's suggestion [2].

[1] https://patchwork.kernel.org/project/linux-mediatek/patch/20200927230422.11610-3-chunkuang.hu@kernel.org/
[2] https://patchwork.kernel.org/project/linux-mediatek/cover/20200927230422.11610-1-chunkuang.hu@kernel.org/

Regards,
Chun-Kuang.

>
> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
> ---
>  drivers/soc/mediatek/mtk-cmdq-helper.c | 32 --------------------------
>  include/linux/soc/mediatek/mtk-cmdq.h  | 12 ----------
>  2 files changed, 44 deletions(-)
>
> diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> index 505651b0d715..fd3bc39538a1 100644
> --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> @@ -502,36 +502,4 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
>  }
>  EXPORT_SYMBOL(cmdq_pkt_flush_async);
>
> -struct cmdq_flush_completion {
> -       struct completion cmplt;
> -       bool err;
> -};
> -
> -static void cmdq_pkt_flush_cb(struct cmdq_cb_data data)
> -{
> -       struct cmdq_flush_completion *cmplt;
> -
> -       cmplt = (struct cmdq_flush_completion *)data.data;
> -       if (data.sta != CMDQ_CB_NORMAL)
> -               cmplt->err = true;
> -       else
> -               cmplt->err = false;
> -       complete(&cmplt->cmplt);
> -}
> -
> -int cmdq_pkt_flush(struct cmdq_pkt *pkt)
> -{
> -       struct cmdq_flush_completion cmplt;
> -       int err;
> -
> -       init_completion(&cmplt.cmplt);
> -       err = cmdq_pkt_flush_async(pkt, cmdq_pkt_flush_cb, &cmplt);
> -       if (err < 0)
> -               return err;
> -       wait_for_completion(&cmplt.cmplt);
> -
> -       return cmplt.err ? -EFAULT : 0;
> -}
> -EXPORT_SYMBOL(cmdq_pkt_flush);
> -
>  MODULE_LICENSE("GPL v2");
> diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h
> index 960704d75994..2c6aa84c0e80 100644
> --- a/include/linux/soc/mediatek/mtk-cmdq.h
> +++ b/include/linux/soc/mediatek/mtk-cmdq.h
> @@ -288,16 +288,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
>  int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
>                          void *data);
>
> -/**
> - * cmdq_pkt_flush() - trigger CMDQ to execute the CMDQ packet
> - * @pkt:       the CMDQ packet
> - *
> - * Return: 0 for success; else the error code is returned
> - *
> - * Trigger CMDQ to execute the CMDQ packet. Note that this is a
> - * synchronous flush function. When the function returned, the recorded
> - * commands have been done.
> - */
> -int cmdq_pkt_flush(struct cmdq_pkt *pkt);
> -
>  #endif /* __MTK_CMDQ_H__ */
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: mediatek: cmdq: Remove cmdq_pkt_flush()
@ 2021-01-09 22:59   ` Chun-Kuang Hu
  0 siblings, 0 replies; 12+ messages in thread
From: Chun-Kuang Hu @ 2021-01-09 22:59 UTC (permalink / raw)
  To: Chun-Kuang Hu
  Cc: Matthias Brugger, moderated list:ARM/Mediatek SoC support,
	linux-kernel, DRI Development, Linux ARM

Hi, Matthias:

Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2020年12月3日 週四 上午7:59寫道:
>
> rx_callback is a standard mailbox callback mechanism and could
> cover the function of proprietary cmdq_task_cb, so it is better
> to use the standard one instead of the proprietary one. But
> register rx_callback should before mbox_request_channel(),
> so remove cmdq_pkt_flush() and let client driver implement
> its own synchronous flush.

How do you think about this patch? This patch is derived from [1]
according to Jassi's suggestion [2].

[1] https://patchwork.kernel.org/project/linux-mediatek/patch/20200927230422.11610-3-chunkuang.hu@kernel.org/
[2] https://patchwork.kernel.org/project/linux-mediatek/cover/20200927230422.11610-1-chunkuang.hu@kernel.org/

Regards,
Chun-Kuang.

>
> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
> ---
>  drivers/soc/mediatek/mtk-cmdq-helper.c | 32 --------------------------
>  include/linux/soc/mediatek/mtk-cmdq.h  | 12 ----------
>  2 files changed, 44 deletions(-)
>
> diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> index 505651b0d715..fd3bc39538a1 100644
> --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> @@ -502,36 +502,4 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
>  }
>  EXPORT_SYMBOL(cmdq_pkt_flush_async);
>
> -struct cmdq_flush_completion {
> -       struct completion cmplt;
> -       bool err;
> -};
> -
> -static void cmdq_pkt_flush_cb(struct cmdq_cb_data data)
> -{
> -       struct cmdq_flush_completion *cmplt;
> -
> -       cmplt = (struct cmdq_flush_completion *)data.data;
> -       if (data.sta != CMDQ_CB_NORMAL)
> -               cmplt->err = true;
> -       else
> -               cmplt->err = false;
> -       complete(&cmplt->cmplt);
> -}
> -
> -int cmdq_pkt_flush(struct cmdq_pkt *pkt)
> -{
> -       struct cmdq_flush_completion cmplt;
> -       int err;
> -
> -       init_completion(&cmplt.cmplt);
> -       err = cmdq_pkt_flush_async(pkt, cmdq_pkt_flush_cb, &cmplt);
> -       if (err < 0)
> -               return err;
> -       wait_for_completion(&cmplt.cmplt);
> -
> -       return cmplt.err ? -EFAULT : 0;
> -}
> -EXPORT_SYMBOL(cmdq_pkt_flush);
> -
>  MODULE_LICENSE("GPL v2");
> diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h
> index 960704d75994..2c6aa84c0e80 100644
> --- a/include/linux/soc/mediatek/mtk-cmdq.h
> +++ b/include/linux/soc/mediatek/mtk-cmdq.h
> @@ -288,16 +288,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
>  int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
>                          void *data);
>
> -/**
> - * cmdq_pkt_flush() - trigger CMDQ to execute the CMDQ packet
> - * @pkt:       the CMDQ packet
> - *
> - * Return: 0 for success; else the error code is returned
> - *
> - * Trigger CMDQ to execute the CMDQ packet. Note that this is a
> - * synchronous flush function. When the function returned, the recorded
> - * commands have been done.
> - */
> -int cmdq_pkt_flush(struct cmdq_pkt *pkt);
> -
>  #endif /* __MTK_CMDQ_H__ */
> --
> 2.17.1
>

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: mediatek: cmdq: Remove cmdq_pkt_flush()
@ 2021-01-09 22:59   ` Chun-Kuang Hu
  0 siblings, 0 replies; 12+ messages in thread
From: Chun-Kuang Hu @ 2021-01-09 22:59 UTC (permalink / raw)
  To: Chun-Kuang Hu
  Cc: Matthias Brugger, moderated list:ARM/Mediatek SoC support,
	linux-kernel, DRI Development, Linux ARM

Hi, Matthias:

Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2020年12月3日 週四 上午7:59寫道:
>
> rx_callback is a standard mailbox callback mechanism and could
> cover the function of proprietary cmdq_task_cb, so it is better
> to use the standard one instead of the proprietary one. But
> register rx_callback should before mbox_request_channel(),
> so remove cmdq_pkt_flush() and let client driver implement
> its own synchronous flush.

How do you think about this patch? This patch is derived from [1]
according to Jassi's suggestion [2].

[1] https://patchwork.kernel.org/project/linux-mediatek/patch/20200927230422.11610-3-chunkuang.hu@kernel.org/
[2] https://patchwork.kernel.org/project/linux-mediatek/cover/20200927230422.11610-1-chunkuang.hu@kernel.org/

Regards,
Chun-Kuang.

>
> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
> ---
>  drivers/soc/mediatek/mtk-cmdq-helper.c | 32 --------------------------
>  include/linux/soc/mediatek/mtk-cmdq.h  | 12 ----------
>  2 files changed, 44 deletions(-)
>
> diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> index 505651b0d715..fd3bc39538a1 100644
> --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> @@ -502,36 +502,4 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
>  }
>  EXPORT_SYMBOL(cmdq_pkt_flush_async);
>
> -struct cmdq_flush_completion {
> -       struct completion cmplt;
> -       bool err;
> -};
> -
> -static void cmdq_pkt_flush_cb(struct cmdq_cb_data data)
> -{
> -       struct cmdq_flush_completion *cmplt;
> -
> -       cmplt = (struct cmdq_flush_completion *)data.data;
> -       if (data.sta != CMDQ_CB_NORMAL)
> -               cmplt->err = true;
> -       else
> -               cmplt->err = false;
> -       complete(&cmplt->cmplt);
> -}
> -
> -int cmdq_pkt_flush(struct cmdq_pkt *pkt)
> -{
> -       struct cmdq_flush_completion cmplt;
> -       int err;
> -
> -       init_completion(&cmplt.cmplt);
> -       err = cmdq_pkt_flush_async(pkt, cmdq_pkt_flush_cb, &cmplt);
> -       if (err < 0)
> -               return err;
> -       wait_for_completion(&cmplt.cmplt);
> -
> -       return cmplt.err ? -EFAULT : 0;
> -}
> -EXPORT_SYMBOL(cmdq_pkt_flush);
> -
>  MODULE_LICENSE("GPL v2");
> diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h
> index 960704d75994..2c6aa84c0e80 100644
> --- a/include/linux/soc/mediatek/mtk-cmdq.h
> +++ b/include/linux/soc/mediatek/mtk-cmdq.h
> @@ -288,16 +288,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
>  int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
>                          void *data);
>
> -/**
> - * cmdq_pkt_flush() - trigger CMDQ to execute the CMDQ packet
> - * @pkt:       the CMDQ packet
> - *
> - * Return: 0 for success; else the error code is returned
> - *
> - * Trigger CMDQ to execute the CMDQ packet. Note that this is a
> - * synchronous flush function. When the function returned, the recorded
> - * commands have been done.
> - */
> -int cmdq_pkt_flush(struct cmdq_pkt *pkt);
> -
>  #endif /* __MTK_CMDQ_H__ */
> --
> 2.17.1
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: mediatek: cmdq: Remove cmdq_pkt_flush()
@ 2021-01-09 22:59   ` Chun-Kuang Hu
  0 siblings, 0 replies; 12+ messages in thread
From: Chun-Kuang Hu @ 2021-01-09 22:59 UTC (permalink / raw)
  To: Chun-Kuang Hu
  Cc: Matthias Brugger, moderated list:ARM/Mediatek SoC support,
	linux-kernel, DRI Development, Linux ARM

Hi, Matthias:

Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2020年12月3日 週四 上午7:59寫道:
>
> rx_callback is a standard mailbox callback mechanism and could
> cover the function of proprietary cmdq_task_cb, so it is better
> to use the standard one instead of the proprietary one. But
> register rx_callback should before mbox_request_channel(),
> so remove cmdq_pkt_flush() and let client driver implement
> its own synchronous flush.

How do you think about this patch? This patch is derived from [1]
according to Jassi's suggestion [2].

[1] https://patchwork.kernel.org/project/linux-mediatek/patch/20200927230422.11610-3-chunkuang.hu@kernel.org/
[2] https://patchwork.kernel.org/project/linux-mediatek/cover/20200927230422.11610-1-chunkuang.hu@kernel.org/

Regards,
Chun-Kuang.

>
> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
> ---
>  drivers/soc/mediatek/mtk-cmdq-helper.c | 32 --------------------------
>  include/linux/soc/mediatek/mtk-cmdq.h  | 12 ----------
>  2 files changed, 44 deletions(-)
>
> diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> index 505651b0d715..fd3bc39538a1 100644
> --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> @@ -502,36 +502,4 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
>  }
>  EXPORT_SYMBOL(cmdq_pkt_flush_async);
>
> -struct cmdq_flush_completion {
> -       struct completion cmplt;
> -       bool err;
> -};
> -
> -static void cmdq_pkt_flush_cb(struct cmdq_cb_data data)
> -{
> -       struct cmdq_flush_completion *cmplt;
> -
> -       cmplt = (struct cmdq_flush_completion *)data.data;
> -       if (data.sta != CMDQ_CB_NORMAL)
> -               cmplt->err = true;
> -       else
> -               cmplt->err = false;
> -       complete(&cmplt->cmplt);
> -}
> -
> -int cmdq_pkt_flush(struct cmdq_pkt *pkt)
> -{
> -       struct cmdq_flush_completion cmplt;
> -       int err;
> -
> -       init_completion(&cmplt.cmplt);
> -       err = cmdq_pkt_flush_async(pkt, cmdq_pkt_flush_cb, &cmplt);
> -       if (err < 0)
> -               return err;
> -       wait_for_completion(&cmplt.cmplt);
> -
> -       return cmplt.err ? -EFAULT : 0;
> -}
> -EXPORT_SYMBOL(cmdq_pkt_flush);
> -
>  MODULE_LICENSE("GPL v2");
> diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h
> index 960704d75994..2c6aa84c0e80 100644
> --- a/include/linux/soc/mediatek/mtk-cmdq.h
> +++ b/include/linux/soc/mediatek/mtk-cmdq.h
> @@ -288,16 +288,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
>  int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
>                          void *data);
>
> -/**
> - * cmdq_pkt_flush() - trigger CMDQ to execute the CMDQ packet
> - * @pkt:       the CMDQ packet
> - *
> - * Return: 0 for success; else the error code is returned
> - *
> - * Trigger CMDQ to execute the CMDQ packet. Note that this is a
> - * synchronous flush function. When the function returned, the recorded
> - * commands have been done.
> - */
> -int cmdq_pkt_flush(struct cmdq_pkt *pkt);
> -
>  #endif /* __MTK_CMDQ_H__ */
> --
> 2.17.1
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: mediatek: cmdq: Remove cmdq_pkt_flush()
  2021-01-09 22:59   ` Chun-Kuang Hu
  (?)
  (?)
@ 2021-01-30  9:45     ` Chun-Kuang Hu
  -1 siblings, 0 replies; 12+ messages in thread
From: Chun-Kuang Hu @ 2021-01-30  9:45 UTC (permalink / raw)
  To: Chun-Kuang Hu
  Cc: Matthias Brugger, linux-kernel, DRI Development,
	moderated list:ARM/Mediatek SoC support, Linux ARM

Hi, Matthias:

Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2021年1月10日 週日 上午6:59寫道:
>
> Hi, Matthias:
>
> Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2020年12月3日 週四 上午7:59寫道:
> >
> > rx_callback is a standard mailbox callback mechanism and could
> > cover the function of proprietary cmdq_task_cb, so it is better
> > to use the standard one instead of the proprietary one. But
> > register rx_callback should before mbox_request_channel(),
> > so remove cmdq_pkt_flush() and let client driver implement
> > its own synchronous flush.
>
> How do you think about this patch? This patch is derived from [1]
> according to Jassi's suggestion [2].
>
> [1] https://patchwork.kernel.org/project/linux-mediatek/patch/20200927230422.11610-3-chunkuang.hu@kernel.org/
> [2] https://patchwork.kernel.org/project/linux-mediatek/cover/20200927230422.11610-1-chunkuang.hu@kernel.org/

Just a ping.

Regards,
Chun-Kuang.

>
> Regards,
> Chun-Kuang.
>
> >
> > Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
> > ---
> >  drivers/soc/mediatek/mtk-cmdq-helper.c | 32 --------------------------
> >  include/linux/soc/mediatek/mtk-cmdq.h  | 12 ----------
> >  2 files changed, 44 deletions(-)
> >
> > diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> > index 505651b0d715..fd3bc39538a1 100644
> > --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> > +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> > @@ -502,36 +502,4 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
> >  }
> >  EXPORT_SYMBOL(cmdq_pkt_flush_async);
> >
> > -struct cmdq_flush_completion {
> > -       struct completion cmplt;
> > -       bool err;
> > -};
> > -
> > -static void cmdq_pkt_flush_cb(struct cmdq_cb_data data)
> > -{
> > -       struct cmdq_flush_completion *cmplt;
> > -
> > -       cmplt = (struct cmdq_flush_completion *)data.data;
> > -       if (data.sta != CMDQ_CB_NORMAL)
> > -               cmplt->err = true;
> > -       else
> > -               cmplt->err = false;
> > -       complete(&cmplt->cmplt);
> > -}
> > -
> > -int cmdq_pkt_flush(struct cmdq_pkt *pkt)
> > -{
> > -       struct cmdq_flush_completion cmplt;
> > -       int err;
> > -
> > -       init_completion(&cmplt.cmplt);
> > -       err = cmdq_pkt_flush_async(pkt, cmdq_pkt_flush_cb, &cmplt);
> > -       if (err < 0)
> > -               return err;
> > -       wait_for_completion(&cmplt.cmplt);
> > -
> > -       return cmplt.err ? -EFAULT : 0;
> > -}
> > -EXPORT_SYMBOL(cmdq_pkt_flush);
> > -
> >  MODULE_LICENSE("GPL v2");
> > diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h
> > index 960704d75994..2c6aa84c0e80 100644
> > --- a/include/linux/soc/mediatek/mtk-cmdq.h
> > +++ b/include/linux/soc/mediatek/mtk-cmdq.h
> > @@ -288,16 +288,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
> >  int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
> >                          void *data);
> >
> > -/**
> > - * cmdq_pkt_flush() - trigger CMDQ to execute the CMDQ packet
> > - * @pkt:       the CMDQ packet
> > - *
> > - * Return: 0 for success; else the error code is returned
> > - *
> > - * Trigger CMDQ to execute the CMDQ packet. Note that this is a
> > - * synchronous flush function. When the function returned, the recorded
> > - * commands have been done.
> > - */
> > -int cmdq_pkt_flush(struct cmdq_pkt *pkt);
> > -
> >  #endif /* __MTK_CMDQ_H__ */
> > --
> > 2.17.1
> >

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: mediatek: cmdq: Remove cmdq_pkt_flush()
@ 2021-01-30  9:45     ` Chun-Kuang Hu
  0 siblings, 0 replies; 12+ messages in thread
From: Chun-Kuang Hu @ 2021-01-30  9:45 UTC (permalink / raw)
  To: Chun-Kuang Hu
  Cc: Matthias Brugger, moderated list:ARM/Mediatek SoC support,
	linux-kernel, DRI Development, Linux ARM

Hi, Matthias:

Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2021年1月10日 週日 上午6:59寫道:
>
> Hi, Matthias:
>
> Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2020年12月3日 週四 上午7:59寫道:
> >
> > rx_callback is a standard mailbox callback mechanism and could
> > cover the function of proprietary cmdq_task_cb, so it is better
> > to use the standard one instead of the proprietary one. But
> > register rx_callback should before mbox_request_channel(),
> > so remove cmdq_pkt_flush() and let client driver implement
> > its own synchronous flush.
>
> How do you think about this patch? This patch is derived from [1]
> according to Jassi's suggestion [2].
>
> [1] https://patchwork.kernel.org/project/linux-mediatek/patch/20200927230422.11610-3-chunkuang.hu@kernel.org/
> [2] https://patchwork.kernel.org/project/linux-mediatek/cover/20200927230422.11610-1-chunkuang.hu@kernel.org/

Just a ping.

Regards,
Chun-Kuang.

>
> Regards,
> Chun-Kuang.
>
> >
> > Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
> > ---
> >  drivers/soc/mediatek/mtk-cmdq-helper.c | 32 --------------------------
> >  include/linux/soc/mediatek/mtk-cmdq.h  | 12 ----------
> >  2 files changed, 44 deletions(-)
> >
> > diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> > index 505651b0d715..fd3bc39538a1 100644
> > --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> > +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> > @@ -502,36 +502,4 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
> >  }
> >  EXPORT_SYMBOL(cmdq_pkt_flush_async);
> >
> > -struct cmdq_flush_completion {
> > -       struct completion cmplt;
> > -       bool err;
> > -};
> > -
> > -static void cmdq_pkt_flush_cb(struct cmdq_cb_data data)
> > -{
> > -       struct cmdq_flush_completion *cmplt;
> > -
> > -       cmplt = (struct cmdq_flush_completion *)data.data;
> > -       if (data.sta != CMDQ_CB_NORMAL)
> > -               cmplt->err = true;
> > -       else
> > -               cmplt->err = false;
> > -       complete(&cmplt->cmplt);
> > -}
> > -
> > -int cmdq_pkt_flush(struct cmdq_pkt *pkt)
> > -{
> > -       struct cmdq_flush_completion cmplt;
> > -       int err;
> > -
> > -       init_completion(&cmplt.cmplt);
> > -       err = cmdq_pkt_flush_async(pkt, cmdq_pkt_flush_cb, &cmplt);
> > -       if (err < 0)
> > -               return err;
> > -       wait_for_completion(&cmplt.cmplt);
> > -
> > -       return cmplt.err ? -EFAULT : 0;
> > -}
> > -EXPORT_SYMBOL(cmdq_pkt_flush);
> > -
> >  MODULE_LICENSE("GPL v2");
> > diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h
> > index 960704d75994..2c6aa84c0e80 100644
> > --- a/include/linux/soc/mediatek/mtk-cmdq.h
> > +++ b/include/linux/soc/mediatek/mtk-cmdq.h
> > @@ -288,16 +288,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
> >  int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
> >                          void *data);
> >
> > -/**
> > - * cmdq_pkt_flush() - trigger CMDQ to execute the CMDQ packet
> > - * @pkt:       the CMDQ packet
> > - *
> > - * Return: 0 for success; else the error code is returned
> > - *
> > - * Trigger CMDQ to execute the CMDQ packet. Note that this is a
> > - * synchronous flush function. When the function returned, the recorded
> > - * commands have been done.
> > - */
> > -int cmdq_pkt_flush(struct cmdq_pkt *pkt);
> > -
> >  #endif /* __MTK_CMDQ_H__ */
> > --
> > 2.17.1
> >

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: mediatek: cmdq: Remove cmdq_pkt_flush()
@ 2021-01-30  9:45     ` Chun-Kuang Hu
  0 siblings, 0 replies; 12+ messages in thread
From: Chun-Kuang Hu @ 2021-01-30  9:45 UTC (permalink / raw)
  To: Chun-Kuang Hu
  Cc: Matthias Brugger, moderated list:ARM/Mediatek SoC support,
	linux-kernel, DRI Development, Linux ARM

Hi, Matthias:

Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2021年1月10日 週日 上午6:59寫道:
>
> Hi, Matthias:
>
> Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2020年12月3日 週四 上午7:59寫道:
> >
> > rx_callback is a standard mailbox callback mechanism and could
> > cover the function of proprietary cmdq_task_cb, so it is better
> > to use the standard one instead of the proprietary one. But
> > register rx_callback should before mbox_request_channel(),
> > so remove cmdq_pkt_flush() and let client driver implement
> > its own synchronous flush.
>
> How do you think about this patch? This patch is derived from [1]
> according to Jassi's suggestion [2].
>
> [1] https://patchwork.kernel.org/project/linux-mediatek/patch/20200927230422.11610-3-chunkuang.hu@kernel.org/
> [2] https://patchwork.kernel.org/project/linux-mediatek/cover/20200927230422.11610-1-chunkuang.hu@kernel.org/

Just a ping.

Regards,
Chun-Kuang.

>
> Regards,
> Chun-Kuang.
>
> >
> > Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
> > ---
> >  drivers/soc/mediatek/mtk-cmdq-helper.c | 32 --------------------------
> >  include/linux/soc/mediatek/mtk-cmdq.h  | 12 ----------
> >  2 files changed, 44 deletions(-)
> >
> > diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> > index 505651b0d715..fd3bc39538a1 100644
> > --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> > +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> > @@ -502,36 +502,4 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
> >  }
> >  EXPORT_SYMBOL(cmdq_pkt_flush_async);
> >
> > -struct cmdq_flush_completion {
> > -       struct completion cmplt;
> > -       bool err;
> > -};
> > -
> > -static void cmdq_pkt_flush_cb(struct cmdq_cb_data data)
> > -{
> > -       struct cmdq_flush_completion *cmplt;
> > -
> > -       cmplt = (struct cmdq_flush_completion *)data.data;
> > -       if (data.sta != CMDQ_CB_NORMAL)
> > -               cmplt->err = true;
> > -       else
> > -               cmplt->err = false;
> > -       complete(&cmplt->cmplt);
> > -}
> > -
> > -int cmdq_pkt_flush(struct cmdq_pkt *pkt)
> > -{
> > -       struct cmdq_flush_completion cmplt;
> > -       int err;
> > -
> > -       init_completion(&cmplt.cmplt);
> > -       err = cmdq_pkt_flush_async(pkt, cmdq_pkt_flush_cb, &cmplt);
> > -       if (err < 0)
> > -               return err;
> > -       wait_for_completion(&cmplt.cmplt);
> > -
> > -       return cmplt.err ? -EFAULT : 0;
> > -}
> > -EXPORT_SYMBOL(cmdq_pkt_flush);
> > -
> >  MODULE_LICENSE("GPL v2");
> > diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h
> > index 960704d75994..2c6aa84c0e80 100644
> > --- a/include/linux/soc/mediatek/mtk-cmdq.h
> > +++ b/include/linux/soc/mediatek/mtk-cmdq.h
> > @@ -288,16 +288,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
> >  int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
> >                          void *data);
> >
> > -/**
> > - * cmdq_pkt_flush() - trigger CMDQ to execute the CMDQ packet
> > - * @pkt:       the CMDQ packet
> > - *
> > - * Return: 0 for success; else the error code is returned
> > - *
> > - * Trigger CMDQ to execute the CMDQ packet. Note that this is a
> > - * synchronous flush function. When the function returned, the recorded
> > - * commands have been done.
> > - */
> > -int cmdq_pkt_flush(struct cmdq_pkt *pkt);
> > -
> >  #endif /* __MTK_CMDQ_H__ */
> > --
> > 2.17.1
> >

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] soc: mediatek: cmdq: Remove cmdq_pkt_flush()
@ 2021-01-30  9:45     ` Chun-Kuang Hu
  0 siblings, 0 replies; 12+ messages in thread
From: Chun-Kuang Hu @ 2021-01-30  9:45 UTC (permalink / raw)
  To: Chun-Kuang Hu
  Cc: Matthias Brugger, moderated list:ARM/Mediatek SoC support,
	linux-kernel, DRI Development, Linux ARM

Hi, Matthias:

Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2021年1月10日 週日 上午6:59寫道:
>
> Hi, Matthias:
>
> Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2020年12月3日 週四 上午7:59寫道:
> >
> > rx_callback is a standard mailbox callback mechanism and could
> > cover the function of proprietary cmdq_task_cb, so it is better
> > to use the standard one instead of the proprietary one. But
> > register rx_callback should before mbox_request_channel(),
> > so remove cmdq_pkt_flush() and let client driver implement
> > its own synchronous flush.
>
> How do you think about this patch? This patch is derived from [1]
> according to Jassi's suggestion [2].
>
> [1] https://patchwork.kernel.org/project/linux-mediatek/patch/20200927230422.11610-3-chunkuang.hu@kernel.org/
> [2] https://patchwork.kernel.org/project/linux-mediatek/cover/20200927230422.11610-1-chunkuang.hu@kernel.org/

Just a ping.

Regards,
Chun-Kuang.

>
> Regards,
> Chun-Kuang.
>
> >
> > Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
> > ---
> >  drivers/soc/mediatek/mtk-cmdq-helper.c | 32 --------------------------
> >  include/linux/soc/mediatek/mtk-cmdq.h  | 12 ----------
> >  2 files changed, 44 deletions(-)
> >
> > diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> > index 505651b0d715..fd3bc39538a1 100644
> > --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> > +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> > @@ -502,36 +502,4 @@ int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
> >  }
> >  EXPORT_SYMBOL(cmdq_pkt_flush_async);
> >
> > -struct cmdq_flush_completion {
> > -       struct completion cmplt;
> > -       bool err;
> > -};
> > -
> > -static void cmdq_pkt_flush_cb(struct cmdq_cb_data data)
> > -{
> > -       struct cmdq_flush_completion *cmplt;
> > -
> > -       cmplt = (struct cmdq_flush_completion *)data.data;
> > -       if (data.sta != CMDQ_CB_NORMAL)
> > -               cmplt->err = true;
> > -       else
> > -               cmplt->err = false;
> > -       complete(&cmplt->cmplt);
> > -}
> > -
> > -int cmdq_pkt_flush(struct cmdq_pkt *pkt)
> > -{
> > -       struct cmdq_flush_completion cmplt;
> > -       int err;
> > -
> > -       init_completion(&cmplt.cmplt);
> > -       err = cmdq_pkt_flush_async(pkt, cmdq_pkt_flush_cb, &cmplt);
> > -       if (err < 0)
> > -               return err;
> > -       wait_for_completion(&cmplt.cmplt);
> > -
> > -       return cmplt.err ? -EFAULT : 0;
> > -}
> > -EXPORT_SYMBOL(cmdq_pkt_flush);
> > -
> >  MODULE_LICENSE("GPL v2");
> > diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h
> > index 960704d75994..2c6aa84c0e80 100644
> > --- a/include/linux/soc/mediatek/mtk-cmdq.h
> > +++ b/include/linux/soc/mediatek/mtk-cmdq.h
> > @@ -288,16 +288,4 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
> >  int cmdq_pkt_flush_async(struct cmdq_pkt *pkt, cmdq_async_flush_cb cb,
> >                          void *data);
> >
> > -/**
> > - * cmdq_pkt_flush() - trigger CMDQ to execute the CMDQ packet
> > - * @pkt:       the CMDQ packet
> > - *
> > - * Return: 0 for success; else the error code is returned
> > - *
> > - * Trigger CMDQ to execute the CMDQ packet. Note that this is a
> > - * synchronous flush function. When the function returned, the recorded
> > - * commands have been done.
> > - */
> > -int cmdq_pkt_flush(struct cmdq_pkt *pkt);
> > -
> >  #endif /* __MTK_CMDQ_H__ */
> > --
> > 2.17.1
> >
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-01-30  9:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 23:58 [PATCH] soc: mediatek: cmdq: Remove cmdq_pkt_flush() Chun-Kuang Hu
2020-12-02 23:58 ` Chun-Kuang Hu
2020-12-02 23:58 ` Chun-Kuang Hu
2020-12-02 23:58 ` Chun-Kuang Hu
2021-01-09 22:59 ` Chun-Kuang Hu
2021-01-09 22:59   ` Chun-Kuang Hu
2021-01-09 22:59   ` Chun-Kuang Hu
2021-01-09 22:59   ` Chun-Kuang Hu
2021-01-30  9:45   ` Chun-Kuang Hu
2021-01-30  9:45     ` Chun-Kuang Hu
2021-01-30  9:45     ` Chun-Kuang Hu
2021-01-30  9:45     ` Chun-Kuang Hu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.