Re: [PATCH v3 8/9] soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api

2020-09-22 Thread Dennis-YC Hsieh
Hi Matthias, On Mon, 2020-09-21 at 18:19 +0200, Matthias Brugger wrote: > > On 07/07/2020 17:45, Dennis YC Hsieh wrote: > > Add clear parameter to let client decide if > > event should be clear to 0 after GCE receive it. > > > > Change since v2: > >

[PATCH v3 0/9] support cmdq helper function on mt6779 platform

2020-07-08 Thread Dennis YC Hsieh
since v2: - Keep behavior in drm crtc driver and separate bug fix code into another patch. Change since v1: - Rename cmdq_mbox_shift() to cmdq_get_shift_pa(). Dennis YC Hsieh (9): soc: mediatek: cmdq: add address shift in jump soc: mediatek: cmdq: add write_s function soc: mediatek: cmdq

[PATCH v3 2/9] soc: mediatek: cmdq: add write_s function

2020-07-08 Thread Dennis YC Hsieh
add write_s function in cmdq helper functions which writes value contains in internal register to address with large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 19 +++ include/linux/mailbox/mtk-cmdq-mailbox.h |1

[PATCH v3 5/9] soc: mediatek: cmdq: add write_s value function

2020-07-08 Thread Dennis YC Hsieh
add write_s function in cmdq helper functions which writes a constant value to address with large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 14 ++ include/linux/soc/mediatek/mtk-cmdq.h | 13 + 2 files changed, 27

[PATCH v3 9/9] drm/mediatek: reduce clear event

2020-07-08 Thread Dennis YC Hsieh
No need to clear event again since event always clear before wait. This fix depend on patch: "soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api" Fixes: 2f965be7f9008 ("drm/mediatek: apply CMDQ control flow") Signed-off-by: Dennis YC Hsieh --- drivers/gpu/drm/med

[PATCH v3 8/9] soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api

2020-07-08 Thread Dennis YC Hsieh
Add clear parameter to let client decide if event should be clear to 0 after GCE receive it. Change since v2: - Keep behavior in drm crtc driver and separate bug fix code into another patch. Signed-off-by: Dennis YC Hsieh --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c |2 +- drivers/soc

[PATCH v3 4/9] soc: mediatek: cmdq: add read_s function

2020-07-08 Thread Dennis YC Hsieh
Add read_s function in cmdq helper functions which support read value from register or dma physical address into gce internal register. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +++ include/linux/mailbox/mtk-cmdq-mailbox.h |1 + include

[PATCH v3 6/9] soc: mediatek: cmdq: add write_s_mask value function

2020-07-08 Thread Dennis YC Hsieh
add write_s_mask_value function in cmdq helper functions which writes a constant value to address with mask and large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 21 + include/linux/soc/mediatek/mtk-cmdq.h | 15

[PATCH v3 7/9] soc: mediatek: cmdq: add jump function

2020-07-08 Thread Dennis YC Hsieh
Add jump function so that client can jump to any address which contains instruction. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 13 + include/linux/soc/mediatek/mtk-cmdq.h | 11 +++ 2 files changed, 24 insertions(+) diff --git a/drivers

[PATCH v3 3/9] soc: mediatek: cmdq: add write_s_mask function

2020-07-08 Thread Dennis YC Hsieh
add write_s_mask function in cmdq helper functions which writes value contains in internal register to address with mask and large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 23 +++ include/linux/mailbox/mtk-cmdq

[PATCH v3 1/9] soc: mediatek: cmdq: add address shift in jump

2020-07-08 Thread Dennis YC Hsieh
Add address shift when compose jump instruction to compatible with 35bit format. Change since v1: - Rename cmdq_mbox_shift() to cmdq_get_shift_pa(). Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v2 8/8] soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api

2020-07-07 Thread Dennis-YC Hsieh
Hi CK, Thanks for your comment. On Tue, 2020-07-07 at 07:46 +0800, Chun-Kuang Hu wrote: > Hi, Dennis: > > Dennis YC Hsieh 於 2020年7月6日 週一 下午3:20寫道: > > > > Add clear parameter to let client decide if > > event should be clear to 0 after GCE receive it. > &g

Re: [PATCH v2 1/8] soc: mediatek: cmdq: add address shift in jump

2020-07-07 Thread Dennis-YC Hsieh
Hi Matthias, thanks for your comment On Mon, 2020-07-06 at 16:03 +0200, Matthias Brugger wrote: > > On 05/07/2020 08:48, Dennis YC Hsieh wrote: > > Add address shift when compose jump instruction > > to compatible with 35bit format. > > > > Signed-off-by: Dennis

[PATCH v2 1/8] soc: mediatek: cmdq: add address shift in jump

2020-07-06 Thread Dennis YC Hsieh
Add address shift when compose jump instruction to compatible with 35bit format. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk

[PATCH v2 6/8] soc: mediatek: cmdq: add write_s_mask value function

2020-07-06 Thread Dennis YC Hsieh
add write_s_mask_value function in cmdq helper functions which writes a constant value to address with mask and large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 21 + include/linux/soc/mediatek/mtk-cmdq.h | 15

[PATCH v2 7/8] soc: mediatek: cmdq: add jump function

2020-07-06 Thread Dennis YC Hsieh
Add jump function so that client can jump to any address which contains instruction. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 13 + include/linux/soc/mediatek/mtk-cmdq.h | 11 +++ 2 files changed, 24 insertions(+) diff --git a/drivers

[PATCH v2 8/8] soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api

2020-07-06 Thread Dennis YC Hsieh
Add clear parameter to let client decide if event should be clear to 0 after GCE receive it. Fixes: 2f965be7f9008 ("drm/mediatek: apply CMDQ control flow") Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c |2 +- drivers/soc/mediate

[PATCH v2 4/8] soc: mediatek: cmdq: add read_s function

2020-07-06 Thread Dennis YC Hsieh
Add read_s function in cmdq helper functions which support read value from register or dma physical address into gce internal register. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +++ include/linux/mailbox/mtk-cmdq-mailbox.h |1 + include

[PATCH v2 3/8] soc: mediatek: cmdq: add write_s_mask function

2020-07-06 Thread Dennis YC Hsieh
add write_s_mask function in cmdq helper functions which writes value contains in internal register to address with mask and large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 23 +++ include/linux/mailbox/mtk-cmdq

[PATCH v2 5/8] soc: mediatek: cmdq: add write_s value function

2020-07-06 Thread Dennis YC Hsieh
add write_s function in cmdq helper functions which writes a constant value to address with large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 14 ++ include/linux/soc/mediatek/mtk-cmdq.h | 13 + 2 files changed, 27

[PATCH v2 2/8] soc: mediatek: cmdq: add write_s function

2020-07-06 Thread Dennis YC Hsieh
add write_s function in cmdq helper functions which writes value contains in internal register to address with large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 19 +++ include/linux/mailbox/mtk-cmdq-mailbox.h |1

Subject: [PATCH v1 0/8] support cmdq helper function on mt6779 platform

2020-07-06 Thread Dennis YC Hsieh
since v1: - Rename cmdq_mbox_shift() to cmdq_get_shift_pa(). Dennis YC Hsieh (8): soc: mediatek: cmdq: add address shift in jump soc: mediatek: cmdq: add write_s function soc: mediatek: cmdq: add write_s_mask function soc: mediatek: cmdq: add read_s function soc: mediatek: cmdq: add write_s

Re: [PATCH v1 03/11] soc: mediatek: cmdq: add write_s function

2020-06-23 Thread Dennis-YC Hsieh
Hi Matthias, thanks for your comment. On Mon, 2020-06-22 at 13:07 +0200, Matthias Brugger wrote: > > On 21/06/2020 16:18, Dennis YC Hsieh wrote: > > add write_s function in cmdq helper functions which > > writes value contains in internal register to address > > with

Re: [PATCH v1 03/11] soc: mediatek: cmdq: add write_s function

2020-06-23 Thread Dennis-YC Hsieh
Hi Matthias, On Mon, 2020-06-22 at 17:54 +0200, Matthias Brugger wrote: > > On 22/06/2020 17:36, Dennis-YC Hsieh wrote: > > Hi Matthias, > > > > thanks for your comment. > > > > On Mon, 2020-06-22 at 13:07 +0200, Matthias Brugger wrote: > >> &g

Re: [PATCH v1 03/11] soc: mediatek: cmdq: add write_s function

2020-06-23 Thread Dennis-YC Hsieh
Hi Matthias, On Mon, 2020-06-22 at 19:08 +0200, Matthias Brugger wrote: > > On 22/06/2020 18:12, Dennis-YC Hsieh wrote: > > Hi Matthias, > > > > On Mon, 2020-06-22 at 17:54 +0200, Matthias Brugger wrote: > >> > >> On 22/06/2020 17:36

Re: [PATCH v1 0/11] support cmdq helper function on mt6779 platform

2020-06-23 Thread Dennis-YC Hsieh
Hi Bibby, On Mon, 2020-06-22 at 10:40 +0800, Bibby Hsieh wrote: > Hi, Dennis, > > Please add "depends on patch: support gce on mt6779 platform" in cover > letter. Thanks ok will do, thanks Regards, Dennis > > Bibby > > On Sun, 2020-06-21 at

Re: [PATCH v1 10/11] soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api

2020-06-23 Thread Dennis-YC Hsieh
Hi Matthias, thanks for your comment. On Mon, 2020-06-22 at 13:19 +0200, Matthias Brugger wrote: > > On 21/06/2020 16:18, Dennis YC Hsieh wrote: > > Add clear parameter to let client decide if > > event should be clear to 0 after GCE receive it. > > > >

[PATCH v1 11/11] soc: mediatek: cmdq: add set event function

2020-06-22 Thread Dennis YC Hsieh
Add set event function in cmdq helper functions to set specific event. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +++ include/linux/mailbox/mtk-cmdq-mailbox.h |1 + include/linux/soc/mediatek/mtk-cmdq.h|9 + 3 files

[PATCH v1 08/11] soc: mediatek: cmdq: export finalize function

2020-06-22 Thread Dennis YC Hsieh
Export finalize function to client which helps append eoc and jump command to pkt. Let client decide call finalize or not. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu Acked-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c |1 + drivers/soc/mediatek/mtk-cmdq-helper.c

[PATCH v1 0/11] support cmdq helper function on mt6779 platform

2020-06-22 Thread Dennis YC Hsieh
This patch support cmdq helper function on mt6779 platform, based on "support gce on mt6779 platform" patchset. Dennis YC Hsieh (11): soc: mediatek: cmdq: add address shift in jump soc: mediatek: cmdq: add assign function soc: mediatek: cmdq: add write_s function soc: mediatek:

[PATCH v1 06/11] soc: mediatek: cmdq: add write_s value function

2020-06-22 Thread Dennis YC Hsieh
add write_s function in cmdq helper functions which writes a constant value to address with large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 14 ++ include/linux/soc/mediatek/mtk-cmdq.h | 13 + 2 files changed, 27

[PATCH v1 04/11] soc: mediatek: cmdq: add write_s_mask function

2020-06-22 Thread Dennis YC Hsieh
add write_s_mask function in cmdq helper functions which writes value contains in internal register to address with mask and large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 23 +++ include/linux/mailbox/mtk-cmdq

[PATCH v1 01/11] soc: mediatek: cmdq: add address shift in jump

2020-06-22 Thread Dennis YC Hsieh
Add address shift when compose jump instruction to compatible with 35bit format. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk

[PATCH v1 09/11] soc: mediatek: cmdq: add jump function

2020-06-22 Thread Dennis YC Hsieh
Add jump function so that client can jump to any address which contains instruction. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 13 + include/linux/soc/mediatek/mtk-cmdq.h | 11 +++ 2 files changed, 24 insertions(+) diff --git a/drivers

[PATCH v1 02/11] soc: mediatek: cmdq: add assign function

2020-06-22 Thread Dennis YC Hsieh
Add assign function in cmdq helper which assign constant value into internal register by index. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 24 +++- include/linux/mailbox/mtk-cmdq-mailbox.h |1 + include/linux/soc/mediatek/mtk-cmdq.h

[PATCH v1 10/11] soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api

2020-06-22 Thread Dennis YC Hsieh
Add clear parameter to let client decide if event should be clear to 0 after GCE receive it. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c |2 +- drivers/soc/mediatek/mtk-cmdq-helper.c |5 +++-- include/linux/mailbox/mtk-cmdq-mailbox.h

[PATCH v1 03/11] soc: mediatek: cmdq: add write_s function

2020-06-22 Thread Dennis YC Hsieh
add write_s function in cmdq helper functions which writes value contains in internal register to address with large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 19 +++ include/linux/mailbox/mtk-cmdq-mailbox.h |1

[PATCH v1 05/11] soc: mediatek: cmdq: add read_s function

2020-06-22 Thread Dennis YC Hsieh
Add read_s function in cmdq helper functions which support read value from register or dma physical address into gce internal register. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +++ include/linux/mailbox/mtk-cmdq-mailbox.h |1 + include

[PATCH v1 07/11] soc: mediatek: cmdq: add write_s_mask value function

2020-06-22 Thread Dennis YC Hsieh
add write_s_mask_value function in cmdq helper functions which writes a constant value to address with mask and large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 21 + include/linux/soc/mediatek/mtk-cmdq.h | 15

Re: [PATCH v6] support gce on mt6779 platform

2020-06-02 Thread Dennis-YC Hsieh
Hi Jassi, Thanks for your comment On Sat, 2020-05-30 at 15:34 -0500, Jassi Brar wrote: > On Thu, May 28, 2020 at 12:05 PM Dennis YC Hsieh > wrote: > > > > This patch support gce on mt6779 platform. > > > > Change since v5: > > - spearate address shi

Re: [PATCH v6 08/16] soc: mediatek: cmdq: add write_s function

2020-05-29 Thread Dennis-YC Hsieh
Hi Matthias, Thanks for your comment. On Thu, 2020-05-28 at 23:08 +0200, Matthias Brugger wrote: > > On 28/05/2020 19:04, Dennis YC Hsieh wrote: > > add write_s function in cmdq helper functions which > > writes value contains in internal register to address > > with

[PATCH v6 08/16] soc: mediatek: cmdq: add write_s function

2020-05-28 Thread Dennis YC Hsieh
add write_s function in cmdq helper functions which writes value contains in internal register to address with large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 21 - include/linux/mailbox/mtk-cmdq-mailbox.h | 1

[PATCH v6 16/16] soc: mediatek: cmdq: add set event function

2020-05-28 Thread Dennis YC Hsieh
Add set event function in cmdq helper functions to set specific event. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +++ include/linux/mailbox/mtk-cmdq-mailbox.h | 1 + include/linux/soc/mediatek/mtk-cmdq.h| 9

[PATCH v6 04/16] mailbox: mediatek: cmdq: clear task in channel before shutdown

2020-05-28 Thread Dennis YC Hsieh
Do success callback in channel when shutdown. For those task not finish, callback with error code thus client has chance to cleanup or reset. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/mailbox/mtk-cmdq-mailbox.c | 38 ++ 1 file changed, 38

[PATCH v6 13/16] soc: mediatek: cmdq: export finalize function

2020-05-28 Thread Dennis YC Hsieh
Export finalize function to client which helps append eoc and jump command to pkt. Let client decide call finalize or not. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu Acked-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 1 + drivers/soc/mediatek/mtk-cmdq-helper.c | 7

[PATCH v6 03/16] mailbox: cmdq: support mt6779 gce platform definition

2020-05-28 Thread Dennis YC Hsieh
Add gce v4 hardware support with different thread number and shift. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu Reviewed-by: Matthias Brugger --- drivers/mailbox/mtk-cmdq-mailbox.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers

[PATCH v6] support gce on mt6779 platform

2020-05-28 Thread Dennis YC Hsieh
disp event again in drm driver - symbolize value 1 to jump relative [... snip ...] Dennis YC Hsieh (16): dt-binding: gce: add gce header file for mt6779 mailbox: cmdq: variablize address shift in platform mailbox: cmdq: support mt6779 gce platform definition mailbox: mediatek: cmdq

[PATCH v6 00/16] support gce on mt6779 platform

2020-05-28 Thread Dennis YC Hsieh
disp event again in drm driver - symbolize value 1 to jump relative [... snip ...] *** BLURB HERE *** Dennis YC Hsieh (16): dt-binding: gce: add gce header file for mt6779 mailbox: cmdq: variablize address shift in platform mailbox: cmdq: support mt6779 gce platform definition mailbox

[PATCH v6 06/16] soc: mediatek: cmdq: add address shift in jump

2020-05-28 Thread Dennis YC Hsieh
Add address shift when compose jump instruction to compatible with 35bit format. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk

[PATCH v6 10/16] soc: mediatek: cmdq: add read_s function

2020-05-28 Thread Dennis YC Hsieh
Add read_s function in cmdq helper functions which support read value from register or dma physical address into gce internal register. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +++ include/linux/mailbox/mtk-cmdq-mailbox.h

[PATCH v6 09/16] soc: mediatek: cmdq: add write_s_mask function

2020-05-28 Thread Dennis YC Hsieh
add write_s_mask function in cmdq helper functions which writes value contains in internal register to address with mask and large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 23 +++ include/linux/mailbox/mtk-cmdq

[PATCH v6 07/16] soc: mediatek: cmdq: add assign function

2020-05-28 Thread Dennis YC Hsieh
Add assign function in cmdq helper which assign constant value into internal register by index. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 24 +++- include/linux/mailbox/mtk-cmdq-mailbox.h | 1 + include/linux/soc

[PATCH v6 01/16] dt-binding: gce: add gce header file for mt6779

2020-05-28 Thread Dennis YC Hsieh
Add documentation for the mt6779 gce. Add gce header file defined the gce hardware event, subsys number and constant for mt6779. Signed-off-by: Dennis YC Hsieh Reviewed-by: Rob Herring Reviewed-by: CK Hu --- .../devicetree/bindings/mailbox/mtk-gce.txt | 8 +- include/dt-bindings/gce

[PATCH v6 15/16] soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api

2020-05-28 Thread Dennis YC Hsieh
Add clear parameter to let client decide if event should be clear to 0 after GCE receive it. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 2 +- drivers/soc/mediatek/mtk-cmdq-helper.c | 5 +++-- include/linux/mailbox/mtk-cmdq-mailbox.h | 3

[PATCH v6 14/16] soc: mediatek: cmdq: add jump function

2020-05-28 Thread Dennis YC Hsieh
Add jump function so that client can jump to any address which contains instruction. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 13 + include/linux/soc/mediatek/mtk-cmdq.h | 11 +++ 2 files changed, 24 insertions(+) diff

[PATCH v6 12/16] soc: mediatek: cmdq: add write_s_mask value function

2020-05-28 Thread Dennis YC Hsieh
add write_s_mask_value function in cmdq helper functions which writes a constant value to address with mask and large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 21 + include/linux/soc/mediatek/mtk-cmdq.h | 15

[PATCH v6 11/16] soc: mediatek: cmdq: add write_s value function

2020-05-28 Thread Dennis YC Hsieh
add write_s function in cmdq helper functions which writes a constant value to address with large dma access support. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 14 ++ include/linux/soc/mediatek/mtk-cmdq.h | 13 + 2 files changed, 27

[PATCH v6 02/16] mailbox: cmdq: variablize address shift in platform

2020-05-28 Thread Dennis YC Hsieh
Some gce hardware shift pc and end address in register to support large dram addressing. Implement gce address shift when write or read pc and end register. And add shift bit in platform definition. Signed-off-by: Dennis YC Hsieh --- drivers/mailbox/mtk-cmdq-mailbox.c | 61

Re: [PATCH v5 09/13] soc: mediatek: cmdq: add write_s value function

2020-05-26 Thread Dennis-YC Hsieh
On Mon, 2020-05-25 at 10:39 +0200, Matthias Brugger wrote: > > On 25/05/2020 04:27, Dennis-YC Hsieh wrote: > > > > On Sun, 2020-05-24 at 20:13 +0200, Matthias Brugger wrote: > >> > >> On 24/05/2020 19:31, Dennis-YC Hsieh wrote: > >>>

Re: [PATCH v5 07/13] soc: mediatek: cmdq: add write_s function

2020-05-25 Thread Dennis-YC Hsieh
Hi Mattias, Thanks for your comment. On Sat, 2020-05-16 at 20:14 +0200, Matthias Brugger wrote: > > On 08/03/2020 11:52, Dennis YC Hsieh wrote: > > add write_s function in cmdq helper functions which > > writes value contains in internal register to address > > with

Re: [PATCH v5 13/13] soc: mediatek: cmdq: add set event function

2020-05-25 Thread Dennis-YC Hsieh
Hi Matthias, Thanks for your comment. On Sat, 2020-05-16 at 20:32 +0200, Matthias Brugger wrote: > > On 08/03/2020 11:52, Dennis YC Hsieh wrote: > > Add set event function in cmdq helper functions to set specific event. > > > > Signed-off-by: Dennis YC Hsieh

Re: [PATCH v5 09/13] soc: mediatek: cmdq: add write_s value function

2020-05-25 Thread Dennis-YC Hsieh
Hi Matthias, Thanks for your comment. On Sat, 2020-05-16 at 20:20 +0200, Matthias Brugger wrote: > > On 08/03/2020 11:52, Dennis YC Hsieh wrote: > > add write_s function in cmdq helper functions which > > writes a constant value to address with large dma > > access supp

Re: [PATCH v5 06/13] soc: mediatek: cmdq: add assign function

2020-05-25 Thread Dennis-YC Hsieh
Hi Matthias, Thanks for your comment. On Sat, 2020-05-16 at 19:59 +0200, Matthias Brugger wrote: > > On 08/03/2020 11:52, Dennis YC Hsieh wrote: > > Add assign function in cmdq helper which assign constant value into > > internal register by index. > > > >

Re: [PATCH v5 10/13] soc: mediatek: cmdq: export finalize function

2020-05-25 Thread Dennis-YC Hsieh
Hi Matthias, Thanks for your comment. On Sat, 2020-05-16 at 20:22 +0200, Matthias Brugger wrote: > > On 08/03/2020 11:52, Dennis YC Hsieh wrote: > > Export finalize function to client which helps append eoc and jump > > command to pkt. Let client decide call finalize or not. &

Re: [PATCH v5 12/13] soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api

2020-05-25 Thread Dennis-YC Hsieh
Hi Matthias, Thanks for your comment. On Sat, 2020-05-16 at 20:30 +0200, Matthias Brugger wrote: > > On 08/03/2020 11:52, Dennis YC Hsieh wrote: > > Add clear parameter to let client decide if > > event should be clear to 0 after GCE receive it. > > > >

Re: [PATCH v5 09/13] soc: mediatek: cmdq: add write_s value function

2020-05-25 Thread Dennis-YC Hsieh
On Sun, 2020-05-24 at 20:13 +0200, Matthias Brugger wrote: > > On 24/05/2020 19:31, Dennis-YC Hsieh wrote: > > Hi Matthias, > > > > Thanks for your comment. > > > > On Sat, 2020-05-16 at 20:20 +0200, Matthias Brugger wrote: > >> > >>

Re: [PATCH v5 02/13] mailbox: cmdq: variablize address shift in platform

2020-03-23 Thread Dennis-YC Hsieh
Hi Jassi, On Thu, 2020-03-19 at 20:05 -0500, Jassi Brar wrote: > On Sun, Mar 8, 2020 at 5:53 AM Dennis YC Hsieh > wrote: > > > > Some gce hardware shift pc and end address in register to support > > large dram addressing. > > Implement gce address shift when wri

[PATCH v5 11/13] soc: mediatek: cmdq: add jump function

2020-03-09 Thread Dennis YC Hsieh
Add jump function so that client can jump to any address which contains instruction. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 13 + include/linux/soc/mediatek/mtk-cmdq.h | 11 +++ 2 files changed, 24 insertions(+) diff --git a/drivers/soc

[PATCH v5 04/13] mailbox: mediatek: cmdq: clear task in channel before shutdown

2020-03-09 Thread Dennis YC Hsieh
Do success callback in channel when shutdown. For those task not finish, callback with error code thus client has chance to cleanup or reset. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/mailbox/mtk-cmdq-mailbox.c | 38 ++ 1 file changed, 38

[PATCH v5 02/13] mailbox: cmdq: variablize address shift in platform

2020-03-09 Thread Dennis YC Hsieh
Some gce hardware shift pc and end address in register to support large dram addressing. Implement gce address shift when write or read pc and end register. And add shift bit in platform definition. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/mailbox/mtk-cmdq-mailbox.c

[PATCH v5 05/13] soc: mediatek: cmdq: return send msg error code

2020-03-09 Thread Dennis YC Hsieh
Return error code to client if send message fail, so that client has chance to error handling. Signed-off-by: Dennis YC Hsieh Fixes: 576f1b4bc802 ("soc: mediatek: Add Mediatek CMDQ helper") Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 4 +++- 1 file changed, 3

[PATCH v5 10/13] soc: mediatek: cmdq: export finalize function

2020-03-09 Thread Dennis YC Hsieh
Export finalize function to client which helps append eoc and jump command to pkt. Let client decide call finalize or not. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 1 + drivers/soc/mediatek/mtk-cmdq-helper.c | 7 ++- include/linux/soc

[PATCH v5 08/13] soc: mediatek: cmdq: add read_s function

2020-03-09 Thread Dennis YC Hsieh
Add read_s function in cmdq helper functions which support read value from register or dma physical address into gce internal register. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +++ include/linux/mailbox/mtk-cmdq-mailbox.h

[PATCH v5 09/13] soc: mediatek: cmdq: add write_s value function

2020-03-09 Thread Dennis YC Hsieh
add write_s function in cmdq helper functions which writes a constant value to address with large dma access support. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 26 ++ include/linux/soc/mediatek/mtk-cmdq.h | 14

[PATCH v5 12/13] soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api

2020-03-09 Thread Dennis YC Hsieh
Add clear parameter to let client decide if event should be clear to 0 after GCE receive it. Signed-off-by: Dennis YC Hsieh --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 2 +- drivers/soc/mediatek/mtk-cmdq-helper.c | 5 +++-- include/linux/mailbox/mtk-cmdq-mailbox.h | 3 +-- include/linux

[PATCH v5 03/13] mailbox: cmdq: support mt6779 gce platform definition

2020-03-09 Thread Dennis YC Hsieh
Add gce v4 hardware support with different thread number and shift. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/mailbox/mtk-cmdq-mailbox.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c index

[PATCH v5 13/13] soc: mediatek: cmdq: add set event function

2020-03-09 Thread Dennis YC Hsieh
Add set event function in cmdq helper functions to set specific event. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +++ include/linux/mailbox/mtk-cmdq-mailbox.h | 1 + include/linux/soc/mediatek/mtk-cmdq.h| 9

[PATCH v5 00/13] support gce on mt6779 platform

2020-03-09 Thread Dennis YC Hsieh
if error code return - also modify drm driver which uses cmdq_pkt_wfe api - add finalize in drm driver [... snip ...] Dennis YC Hsieh (13): dt-binding: gce: add gce header file for mt6779 mailbox: cmdq: variablize address shift in platform mailbox: cmdq: support mt6779 gce platform definition

[PATCH v5 07/13] soc: mediatek: cmdq: add write_s function

2020-03-09 Thread Dennis YC Hsieh
add write_s function in cmdq helper functions which writes value contains in internal register to address with large dma access support. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 34 +++- include/linux/mailbox/mtk-cmdq

[PATCH v5 06/13] soc: mediatek: cmdq: add assign function

2020-03-09 Thread Dennis YC Hsieh
Add assign function in cmdq helper which assign constant value into internal register by index. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 24 +++- include/linux/mailbox/mtk-cmdq-mailbox.h | 1 + include/linux/soc

[PATCH v5 01/13] dt-binding: gce: add gce header file for mt6779

2020-03-09 Thread Dennis YC Hsieh
Add documentation for the mt6779 gce. Add gce header file defined the gce hardware event, subsys number and constant for mt6779. Signed-off-by: Dennis YC Hsieh Reviewed-by: Rob Herring Reviewed-by: CK Hu --- .../devicetree/bindings/mailbox/mtk-gce.txt | 8 +- include/dt-bindings/gce

Re: [PATCH v4 11/13] soc: mediatek: cmdq: add jump function

2020-03-05 Thread Dennis-YC Hsieh
Hi CK, Thanks for your comment. On Wed, 2020-03-04 at 10:57 +0800, CK Hu wrote: > Hi, Dennis: > > On Tue, 2020-03-03 at 18:58 +0800, Dennis YC Hsieh wrote: > > Add jump function so that client can jump to any address which > > contains instruction. > > > &g

Re: [PATCH v4 12/13] soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api

2020-03-05 Thread Dennis-YC Hsieh
Hi CK, Thanks for your comment. On Wed, 2020-03-04 at 11:05 +0800, CK Hu wrote: > Hi, Dennis: > > On Tue, 2020-03-03 at 18:58 +0800, Dennis YC Hsieh wrote: > > Add clear parameter to let client decide if > > event should be clear to 0 after GCE receive it. > > &

[PATCH v4 06/13] soc: mediatek: cmdq: add assign function

2020-03-03 Thread Dennis YC Hsieh
Add assign function in cmdq helper which assign constant value into internal register by index. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 24 +++- include/linux/mailbox/mtk-cmdq-mailbox.h | 1 + include/linux/soc

[PATCH v4 12/13] soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api

2020-03-03 Thread Dennis YC Hsieh
Add clear parameter to let client decide if event should be clear to 0 after GCE receive it. Signed-off-by: Dennis YC Hsieh --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 2 +- drivers/soc/mediatek/mtk-cmdq-helper.c | 5 +++-- include/linux/mailbox/mtk-cmdq-mailbox.h | 3 +-- include/linux

[PATCH v4 05/13] soc: mediatek: cmdq: return send msg error code

2020-03-03 Thread Dennis YC Hsieh
Return error code to client if send message fail, so that client has chance to error handling. Signed-off-by: Dennis YC Hsieh Fixes: 576f1b4bc802 ("soc: mediatek: Add Mediatek CMDQ helper") --- drivers/soc/mediatek/mtk-cmdq-helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletio

[PATCH v4 11/13] soc: mediatek: cmdq: add jump function

2020-03-03 Thread Dennis YC Hsieh
Add jump function so that client can jump to any address which contains instruction. Signed-off-by: Dennis YC Hsieh --- drivers/soc/mediatek/mtk-cmdq-helper.c | 12 include/linux/soc/mediatek/mtk-cmdq.h | 11 +++ 2 files changed, 23 insertions(+) diff --git a/drivers/soc

[PATCH v4 00/13] support gce on mt6779 platform

2020-03-03 Thread Dennis YC Hsieh
Change since v2: - rebase onto 5.6-rc1 - remove unnecessary definition - add clear parameter in wfe api - separate assign and write_s api - add jump api instead of finalize in loop [... snip ...] Dennis YC Hsieh (13): dt-binding: gce: add gce header file for mt6779 mailbox: cmdq: variablize

[PATCH v4 02/13] mailbox: cmdq: variablize address shift in platform

2020-03-03 Thread Dennis YC Hsieh
Some gce hardware shift pc and end address in register to support large dram addressing. Implement gce address shift when write or read pc and end register. And add shift bit in platform definition. Signed-off-by: Dennis YC Hsieh --- drivers/mailbox/mtk-cmdq-mailbox.c | 61

[PATCH v4 08/13] soc: mediatek: cmdq: add read_s function

2020-03-03 Thread Dennis YC Hsieh
Add read_s function in cmdq helper functions which support read value from register or dma physical address into gce internal register. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +++ include/linux/mailbox/mtk-cmdq-mailbox.h

[PATCH v4 13/13] soc: mediatek: cmdq: add set event function

2020-03-03 Thread Dennis YC Hsieh
Add set event function in cmdq helper functions to set specific event. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +++ include/linux/mailbox/mtk-cmdq-mailbox.h | 1 + include/linux/soc/mediatek/mtk-cmdq.h| 9

[PATCH v4 09/13] soc: mediatek: cmdq: add write_s value function

2020-03-03 Thread Dennis YC Hsieh
add write_s function in cmdq helper functions which writes a constant value to address with large dma access support. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 26 ++ include/linux/soc/mediatek/mtk-cmdq.h | 14

[PATCH v4 01/13] dt-binding: gce: add gce header file for mt6779

2020-03-03 Thread Dennis YC Hsieh
Add documentation for the mt6779 gce. Add gce header file defined the gce hardware event, subsys number and constant for mt6779. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- .../devicetree/bindings/mailbox/mtk-gce.txt | 8 +- include/dt-bindings/gce/mt6779-gce.h | 222

[PATCH v4 07/13] soc: mediatek: cmdq: add write_s function

2020-03-03 Thread Dennis YC Hsieh
add write_s function in cmdq helper functions which writes value contains in internal register to address with large dma access support. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 34 +++- include/linux/mailbox/mtk-cmdq

[PATCH v4 04/13] mailbox: mediatek: cmdq: clear task in channel before shutdown

2020-03-03 Thread Dennis YC Hsieh
Do success callback in channel when shutdown. For those task not finish, callback with error code thus client has chance to cleanup or reset. Signed-off-by: Dennis YC Hsieh --- drivers/mailbox/mtk-cmdq-mailbox.c | 38 ++ 1 file changed, 38 insertions(+) diff --git

[PATCH v4 10/13] soc: mediatek: cmdq: export finalize function

2020-03-03 Thread Dennis YC Hsieh
Export finalize function to client which helps append eoc and jump command to pkt. Let client decide call finalize or not. Signed-off-by: Dennis YC Hsieh --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 1 + drivers/soc/mediatek/mtk-cmdq-helper.c | 7 ++- include/linux/soc/mediatek/mtk-cmdq.h

[PATCH v4 03/13] mailbox: cmdq: support mt6779 gce platform definition

2020-03-03 Thread Dennis YC Hsieh
Add gce v4 hardware support with different thread number and shift. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu --- drivers/mailbox/mtk-cmdq-mailbox.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c index