* [PATCH 0/3] MediaTek mt6572 GCE support
@ 2026-07-28 9:42 Roman Vivchar via B4 Relay
2026-07-28 9:42 ` [PATCH 1/3] dt-bindings: mailbox: mediatek,gce-mailbox: add mt6572 Roman Vivchar via B4 Relay
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Roman Vivchar via B4 Relay @ 2026-07-28 9:42 UTC (permalink / raw)
To: Jassi Brar, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Houlong Wei
Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek,
Roman Vivchar
Yes I know this one is very different from basics like previous pwrap
and efuse...
This patch series adds support for the Global Command Engine found in
the mt6572 SoC.
Notably, the patch 2 introduces legacy ISA format, which is used on
mt6572, 6582 and 6592 SoCs. mt6577 doesn't have the GCE at all, mt6589
seems to have new-ish ISA, and mt6595 is much more close to 6795/8173.
Patch 3 adds mt6572 platform data and legacy_isa forwarding to the
instruction JIT.
This format was reverse engineered from the Android HAL and uses 22-bit
offset with 2-bit subsystem ID, unlike the newer 16-bit offset and 8-bit
subsystem ID.
The mt6572 HAL includes workarounds for WFE and EOC instructions, emitting
another WFE as barrier at WFE, and JUMP +8 at EOC.
mt6582 and 6592 HAL dropped WFE barrier, but still have JUMP +8.
This sounds very much like some kind of software mitigations for hardware
bugs, but during testing on 6572 nothing bad happened so far. These
additional instructions are not included in the patches.
Note that while GCE can be used for e.g. mt6592 UFOE (which is at
0x14013000, so outside of the u16 range), currently the driver still uses
u16 for the offset, because I don't have any 6592 device.
Signed-off-by: Roman Vivchar <rva333@protonmail.com>
---
Roman Vivchar (3):
dt-bindings: mailbox: mediatek,gce-mailbox: add mt6572
soc: mediatek: cmdq-helper: add legacy GCE ISA support
mailbox: mtk-cmdq: add mt6572 support
.../bindings/mailbox/mediatek,gce-mailbox.yaml | 1 +
drivers/mailbox/mtk-cmdq-mailbox.c | 11 +++++
drivers/soc/mediatek/mtk-cmdq-helper.c | 55 +++++++++++++++-------
include/dt-bindings/gce/mediatek,mt6572-gce.h | 52 ++++++++++++++++++++
include/linux/mailbox/mtk-cmdq-mailbox.h | 1 +
5 files changed, 103 insertions(+), 17 deletions(-)
---
base-commit: 8cd9520d35a6c38db6567e97dd93b1f11f185dc6
change-id: 20260727-6572-gce-6a571ef4af09
Best regards,
--
Roman Vivchar <rva333@protonmail.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] dt-bindings: mailbox: mediatek,gce-mailbox: add mt6572
2026-07-28 9:42 [PATCH 0/3] MediaTek mt6572 GCE support Roman Vivchar via B4 Relay
@ 2026-07-28 9:42 ` Roman Vivchar via B4 Relay
2026-07-28 9:42 ` [PATCH 2/3] soc: mediatek: cmdq-helper: add legacy GCE ISA support Roman Vivchar via B4 Relay
2026-07-28 9:42 ` [PATCH 3/3] mailbox: mtk-cmdq: add mt6572 support Roman Vivchar via B4 Relay
2 siblings, 0 replies; 8+ messages in thread
From: Roman Vivchar via B4 Relay @ 2026-07-28 9:42 UTC (permalink / raw)
To: Jassi Brar, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Houlong Wei
Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek,
Roman Vivchar
From: Roman Vivchar <rva333@protonmail.com>
Add a compatible string and a header for the GCE constants.
Signed-off-by: Roman Vivchar <rva333@protonmail.com>
---
.../bindings/mailbox/mediatek,gce-mailbox.yaml | 1 +
include/dt-bindings/gce/mediatek,mt6572-gce.h | 52 ++++++++++++++++++++++
2 files changed, 53 insertions(+)
diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
index 587126d03fc6..d6e93010bb94 100644
--- a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
+++ b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
@@ -18,6 +18,7 @@ properties:
compatible:
oneOf:
- enum:
+ - mediatek,mt6572-gce
- mediatek,mt6779-gce
- mediatek,mt8173-gce
- mediatek,mt8183-gce
diff --git a/include/dt-bindings/gce/mediatek,mt6572-gce.h b/include/dt-bindings/gce/mediatek,mt6572-gce.h
new file mode 100644
index 000000000000..e6d949d76f88
--- /dev/null
+++ b/include/dt-bindings/gce/mediatek,mt6572-gce.h
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2026 Roman Vivchar.
+ */
+
+#ifndef _DT_BINDINGS_GCE_MT6572_H
+#define _DT_BINDINGS_GCE_MT6572_H
+
+/* GCE HW thread priority */
+#define CMDQ_THR_PRIO_NORMAL 0
+#define CMDQ_THR_PRIO_HIGHEST 1
+
+/* GCE SUBSYS */
+#define SUBSYS_14XXXXXX 0
+#define SUBSYS_15XXXXXX 1
+
+/* GCE HW EVENT */
+#define CMDQ_EVENT_MUTEX0 0
+#define CMDQ_EVENT_MUTEX1 1
+#define CMDQ_EVENT_MUTEX2 2
+#define CMDQ_EVENT_MUTEX3 3
+#define CMDQ_EVENT_MUTEX4 4
+#define CMDQ_EVENT_MUTEX5 5
+#define CMDQ_EVENT_MUTEX6 6
+#define CMDQ_EVENT_MUTEX7 7
+
+#define CMDQ_EVENT_DISP_WDMA_EOF 12
+#define CMDQ_EVENT_DISP_RDMA_EOF 13
+#define CMDQ_EVENT_DISP_BLS_EOF 14
+#define CMDQ_EVENT_DISP_COLOR_EOF 15
+#define CMDQ_EVENT_DISP_OVL_EOF 16
+#define CMDQ_EVENT_MDP_TDSHP_EOF 17
+#define CMDQ_EVENT_MDP_RSZ1_EOF 18
+#define CMDQ_EVENT_MDP_RSZ0_EOF 19
+#define CMDQ_EVENT_MDP_RDMA_EOF 20
+#define CMDQ_EVENT_MDP_WDMA_EOF 21
+#define CMDQ_EVENT_MDP_WROT_EOF 22
+
+#define CMDQ_EVENT_MDP_WROT_SOF 24
+#define CMDQ_EVENT_MDP_RSZ0_SOF 25
+#define CMDQ_EVENT_MDP_RSZ1_SOF 26
+#define CMDQ_EVENT_DISP_OVL_SOF 27
+#define CMDQ_EVENT_MDP_WDMA_SOF 28
+#define CMDQ_EVENT_MDP_RDMA_SOF 29
+#define CMDQ_EVENT_DISP_WDMA_SOF 30
+#define CMDQ_EVENT_DISP_COLOR_SOF 31
+#define CMDQ_EVENT_MDP_TDSHP_SOF 32
+#define CMDQ_EVENT_DISP_BLS_SOF 33
+#define CMDQ_EVENT_DISP_RDMA_SOF 34
+#define CMDQ_EVENT_CAM_MDP 35
+
+#endif
--
2.54.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] soc: mediatek: cmdq-helper: add legacy GCE ISA support
2026-07-28 9:42 [PATCH 0/3] MediaTek mt6572 GCE support Roman Vivchar via B4 Relay
2026-07-28 9:42 ` [PATCH 1/3] dt-bindings: mailbox: mediatek,gce-mailbox: add mt6572 Roman Vivchar via B4 Relay
@ 2026-07-28 9:42 ` Roman Vivchar via B4 Relay
2026-07-28 15:08 ` AngeloGioacchino Del Regno
2026-07-28 9:42 ` [PATCH 3/3] mailbox: mtk-cmdq: add mt6572 support Roman Vivchar via B4 Relay
2 siblings, 1 reply; 8+ messages in thread
From: Roman Vivchar via B4 Relay @ 2026-07-28 9:42 UTC (permalink / raw)
To: Jassi Brar, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Houlong Wei
Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek,
Roman Vivchar
From: Roman Vivchar <rva333@protonmail.com>
Some SoCs, such as mt6572, have different WRITE and POLL instruction
encoding. Instead of 16-bit offset and 8-bit subsystem ID, old GCEs have
22-bit offset and 2-bit subsystem ID.
Extend cmdq_instruction struct with additional union and struct to hold
the legacy format of instruction encoding. Add legacy_isa to select
legacy GCE ISA when writing instruction. Finally, add special handing
for legacy_isa cases.
While mt6572 GCE supports 22-bit offsets, the parameter type for offset
remains 16 bit, because all mt6572 GCE mmsys consumers are in the 0xffff
range.
Signed-off-by: Roman Vivchar <rva333@protonmail.com>
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 55 ++++++++++++++++++++++----------
include/linux/mailbox/mtk-cmdq-mailbox.h | 1 +
2 files changed, 39 insertions(+), 17 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
index f8ee6c9ade89..094732405080 100644
--- a/drivers/soc/mediatek/mtk-cmdq-helper.c
+++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
@@ -31,18 +31,27 @@ struct cmdq_instruction {
};
};
union {
- u16 offset;
- u16 event;
- u16 reg_dst;
- };
- union {
- u8 subsys;
struct {
- u8 sop:5;
- u8 arg_c_t:1;
- u8 src_t:1;
- u8 dst_t:1;
- };
+ union {
+ u16 offset;
+ u16 event;
+ u16 reg_dst;
+ };
+ union {
+ u8 subsys;
+ struct {
+ u8 sop:5;
+ u8 arg_c_t:1;
+ u8 src_t:1;
+ u8 dst_t:1;
+ };
+ };
+ } __packed;
+
+ struct {
+ u32 offset_legacy:22;
+ u32 subsys_legacy:2;
+ } __packed;
};
u8 op;
};
@@ -219,10 +228,16 @@ int cmdq_pkt_write(struct cmdq_pkt *pkt, u8 subsys, u16 offset, u32 value)
{
struct cmdq_instruction inst = {
.op = CMDQ_CODE_WRITE,
- .value = value,
- .offset = offset,
- .subsys = subsys
+ .value = value
};
+
+ if (pkt->priv.legacy_isa) {
+ inst.offset_legacy = offset;
+ inst.subsys_legacy = subsys;
+ } else {
+ inst.offset = offset;
+ inst.subsys = subsys;
+ }
return cmdq_pkt_append_command(pkt, inst);
}
EXPORT_SYMBOL(cmdq_pkt_write);
@@ -459,10 +474,16 @@ int cmdq_pkt_poll(struct cmdq_pkt *pkt, u8 subsys,
{
struct cmdq_instruction inst = {
.op = CMDQ_CODE_POLL,
- .value = value,
- .offset = offset,
- .subsys = subsys
+ .value = value
};
+
+ if (pkt->priv.legacy_isa) {
+ inst.offset_legacy = offset;
+ inst.subsys_legacy = subsys;
+ } else {
+ inst.offset = offset;
+ inst.subsys = subsys;
+ }
return cmdq_pkt_append_command(pkt, inst);
}
EXPORT_SYMBOL(cmdq_pkt_poll);
diff --git a/include/linux/mailbox/mtk-cmdq-mailbox.h b/include/linux/mailbox/mtk-cmdq-mailbox.h
index 07c1bfbdb8c4..9fcebc4ca864 100644
--- a/include/linux/mailbox/mtk-cmdq-mailbox.h
+++ b/include/linux/mailbox/mtk-cmdq-mailbox.h
@@ -72,6 +72,7 @@ struct cmdq_cb_data {
struct cmdq_mbox_priv {
u8 shift_pa;
+ bool legacy_isa;
dma_addr_t mminfra_offset;
};
--
2.54.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] mailbox: mtk-cmdq: add mt6572 support
2026-07-28 9:42 [PATCH 0/3] MediaTek mt6572 GCE support Roman Vivchar via B4 Relay
2026-07-28 9:42 ` [PATCH 1/3] dt-bindings: mailbox: mediatek,gce-mailbox: add mt6572 Roman Vivchar via B4 Relay
2026-07-28 9:42 ` [PATCH 2/3] soc: mediatek: cmdq-helper: add legacy GCE ISA support Roman Vivchar via B4 Relay
@ 2026-07-28 9:42 ` Roman Vivchar via B4 Relay
2 siblings, 0 replies; 8+ messages in thread
From: Roman Vivchar via B4 Relay @ 2026-07-28 9:42 UTC (permalink / raw)
To: Jassi Brar, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Houlong Wei
Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek,
Roman Vivchar
From: Roman Vivchar <rva333@protonmail.com>
Add legacy_isa field forwarding to the cmdq helper and a platform data
for the mt6572 GCE.
Signed-off-by: Roman Vivchar <rva333@protonmail.com>
---
drivers/mailbox/mtk-cmdq-mailbox.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index e523c84b4808..5e7bc52baaa1 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -99,6 +99,7 @@ struct gce_plat {
bool control_by_sw;
bool sw_ddr_en;
bool gce_vm;
+ bool legacy_isa;
u32 gce_num;
};
@@ -119,6 +120,7 @@ void cmdq_get_mbox_priv(struct mbox_chan *chan, struct cmdq_mbox_priv *priv)
struct cmdq *cmdq = container_of(chan->mbox, struct cmdq, mbox);
priv->shift_pa = cmdq->pdata->shift;
+ priv->legacy_isa = cmdq->pdata->legacy_isa;
priv->mminfra_offset = cmdq->pdata->mminfra_offset;
}
EXPORT_SYMBOL(cmdq_get_mbox_priv);
@@ -787,6 +789,14 @@ static const struct dev_pm_ops cmdq_pm_ops = {
cmdq_runtime_resume, NULL)
};
+static const struct gce_plat gce_plat_mt6572 = {
+ .thread_nr = 14,
+ .shift = 0,
+ .control_by_sw = false,
+ .legacy_isa = true,
+ .gce_num = 1
+};
+
static const struct gce_plat gce_plat_mt6779 = {
.thread_nr = 24,
.shift = 3,
@@ -848,6 +858,7 @@ static const struct gce_plat gce_plat_mt8196 = {
};
static const struct of_device_id cmdq_of_ids[] = {
+ {.compatible = "mediatek,mt6572-gce", .data = (void *)&gce_plat_mt6572},
{.compatible = "mediatek,mt6779-gce", .data = (void *)&gce_plat_mt6779},
{.compatible = "mediatek,mt8173-gce", .data = (void *)&gce_plat_mt8173},
{.compatible = "mediatek,mt8183-gce", .data = (void *)&gce_plat_mt8183},
--
2.54.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] soc: mediatek: cmdq-helper: add legacy GCE ISA support
2026-07-28 9:42 ` [PATCH 2/3] soc: mediatek: cmdq-helper: add legacy GCE ISA support Roman Vivchar via B4 Relay
@ 2026-07-28 15:08 ` AngeloGioacchino Del Regno
2026-07-28 15:47 ` Roman Vivchar
0 siblings, 1 reply; 8+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-07-28 15:08 UTC (permalink / raw)
To: rva333, Jassi Brar, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, Houlong Wei
Cc: linux-kernel, devicetree, linux-arm-kernel, linux-mediatek
On 7/28/26 11:42, Roman Vivchar via B4 Relay wrote:
> From: Roman Vivchar <rva333@protonmail.com>
>
> Some SoCs, such as mt6572, have different WRITE and POLL instruction
> encoding. Instead of 16-bit offset and 8-bit subsystem ID, old GCEs have
> 22-bit offset and 2-bit subsystem ID.
What about poll_addr, mask, write_s, write_s_mask and others?
Not sure that this will actually work reliably (though I'm sure you're not
creating any regression).
>
> Extend cmdq_instruction struct with additional union and struct to hold
> the legacy format of instruction encoding. Add legacy_isa to select
> legacy GCE ISA when writing instruction. Finally, add special handing
> for legacy_isa cases.
>
> While mt6572 GCE supports 22-bit offsets, the parameter type for offset
> remains 16 bit, because all mt6572 GCE mmsys consumers are in the 0xffff
> range.
>
> Signed-off-by: Roman Vivchar <rva333@protonmail.com>
> ---
> drivers/soc/mediatek/mtk-cmdq-helper.c | 55 ++++++++++++++++++++++----------
> include/linux/mailbox/mtk-cmdq-mailbox.h | 1 +
> 2 files changed, 39 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> index f8ee6c9ade89..094732405080 100644
> --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> @@ -31,18 +31,27 @@ struct cmdq_instruction {
> };
> };
> union {
> - u16 offset;
> - u16 event;
> - u16 reg_dst;
> - };
> - union {
> - u8 subsys;
> struct {
> - u8 sop:5;
> - u8 arg_c_t:1;
> - u8 src_t:1;
> - u8 dst_t:1;
> - };
> + union {
> + u16 offset;
> + u16 event;
> + u16 reg_dst;
> + };
> + union {
> + u8 subsys;
> + struct {
> + u8 sop:5;
> + u8 arg_c_t:1;
> + u8 src_t:1;
> + u8 dst_t:1;
> + };
> + };
> + } __packed;
> +
> + struct {
> + u32 offset_legacy:22;
> + u32 subsys_legacy:2;
> + } __packed;
> };
> u8 op;
> };
> @@ -219,10 +228,16 @@ int cmdq_pkt_write(struct cmdq_pkt *pkt, u8 subsys, u16 offset, u32 value)
> {
> struct cmdq_instruction inst = {
> .op = CMDQ_CODE_WRITE,
> - .value = value,
> - .offset = offset,
> - .subsys = subsys
> + .value = value
> };
> +
> + if (pkt->priv.legacy_isa) {
> + inst.offset_legacy = offset;
> + inst.subsys_legacy = subsys;
> + } else {
> + inst.offset = offset;
> + inst.subsys = subsys;
> + }
> return cmdq_pkt_append_command(pkt, inst);
> }
> EXPORT_SYMBOL(cmdq_pkt_write);
> @@ -459,10 +474,16 @@ int cmdq_pkt_poll(struct cmdq_pkt *pkt, u8 subsys,
> {
> struct cmdq_instruction inst = {
> .op = CMDQ_CODE_POLL,
> - .value = value,
> - .offset = offset,
> - .subsys = subsys
> + .value = value
> };
> +
> + if (pkt->priv.legacy_isa) {
> + inst.offset_legacy = offset;
> + inst.subsys_legacy = subsys;
> + } else {
> + inst.offset = offset;
> + inst.subsys = subsys;
> + }
> return cmdq_pkt_append_command(pkt, inst);
> }
> EXPORT_SYMBOL(cmdq_pkt_poll);
> diff --git a/include/linux/mailbox/mtk-cmdq-mailbox.h b/include/linux/mailbox/mtk-cmdq-mailbox.h
> index 07c1bfbdb8c4..9fcebc4ca864 100644
> --- a/include/linux/mailbox/mtk-cmdq-mailbox.h
> +++ b/include/linux/mailbox/mtk-cmdq-mailbox.h
> @@ -72,6 +72,7 @@ struct cmdq_cb_data {
>
> struct cmdq_mbox_priv {
> u8 shift_pa;
> + bool legacy_isa;
> dma_addr_t mminfra_offset;
> };
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] soc: mediatek: cmdq-helper: add legacy GCE ISA support
2026-07-28 15:08 ` AngeloGioacchino Del Regno
@ 2026-07-28 15:47 ` Roman Vivchar
2026-07-28 15:52 ` AngeloGioacchino Del Regno
0 siblings, 1 reply; 8+ messages in thread
From: Roman Vivchar @ 2026-07-28 15:47 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: Jassi Brar, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, Houlong Wei, linux-kernel, devicetree,
linux-arm-kernel, linux-mediatek
Hi Angelo,
On Tuesday, July 28th, 2026 at 6:08 PM, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote:
> On 7/28/26 11:42, Roman Vivchar via B4 Relay wrote:
> > From: Roman Vivchar <rva333@protonmail.com>
> >
> > Some SoCs, such as mt6572, have different WRITE and POLL instruction
> > encoding. Instead of 16-bit offset and 8-bit subsystem ID, old GCEs have
> > 22-bit offset and 2-bit subsystem ID.
>
> What about poll_addr, mask, write_s, write_s_mask and others?
These don't seem to exist in all 65xx except 6595. TL;DR - old GCEs are
essentially dumb compared to newer ones. They have only basics like MASK (0x2),
WRITE (0x4), POLL (0x8), JUMP (0x10), WFE (0x20) and EOC (0x40). All logical
operations as well as GPR/SPR don't seem to exist.
cmdq_pkt_poll_addr, write_s, write_s_mask are not used by the DRM subsystem.
mask is the same across all GCEs because it takes only u32 mask without
address.
> Not sure that this will actually work reliably (though I'm sure you're not
> creating any regression).
I have tested this change (on top of out-of-tree mt6572 DRM) with some
dd if=/dev/urandom of=/dev/null spam + modetest, as well as igt. Seems to
work without issues...
Best regards,
Roman
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] soc: mediatek: cmdq-helper: add legacy GCE ISA support
2026-07-28 15:47 ` Roman Vivchar
@ 2026-07-28 15:52 ` AngeloGioacchino Del Regno
2026-07-28 16:00 ` Roman Vivchar
0 siblings, 1 reply; 8+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-07-28 15:52 UTC (permalink / raw)
To: Roman Vivchar
Cc: Jassi Brar, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, Houlong Wei, linux-kernel, devicetree,
linux-arm-kernel, linux-mediatek
On 7/28/26 17:47, Roman Vivchar wrote:
> Hi Angelo,
>
> On Tuesday, July 28th, 2026 at 6:08 PM, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote:
>
>> On 7/28/26 11:42, Roman Vivchar via B4 Relay wrote:
>>> From: Roman Vivchar <rva333@protonmail.com>
>>>
>>> Some SoCs, such as mt6572, have different WRITE and POLL instruction
>>> encoding. Instead of 16-bit offset and 8-bit subsystem ID, old GCEs have
>>> 22-bit offset and 2-bit subsystem ID.
>>
>> What about poll_addr, mask, write_s, write_s_mask and others?
>
> These don't seem to exist in all 65xx except 6595. TL;DR - old GCEs are
> essentially dumb compared to newer ones. They have only basics like MASK (0x2),
> WRITE (0x4), POLL (0x8), JUMP (0x10), WFE (0x20) and EOC (0x40). All logical
> operations as well as GPR/SPR don't seem to exist.
>
> cmdq_pkt_poll_addr, write_s, write_s_mask are not used by the DRM subsystem.
> mask is the same across all GCEs because it takes only u32 mask without
> address.
>
>> Not sure that this will actually work reliably (though I'm sure you're not
>> creating any regression).
>
> I have tested this change (on top of out-of-tree mt6572 DRM) with some
> dd if=/dev/urandom of=/dev/null spam + modetest, as well as igt. Seems to
> work without issues...
>
> Best regards,
> Roman
Alright then - look, I'd really want to pick this one up, but it's a bit late
in the cycle and I don't really have much time left for testing.
I'm sure that this is fine, but please understand me - I can't take this now,
also because I'm going on holiday very soon and can't be here to take care of
sudden breakages.
I wonder if you could resend it in the next cycle, preferrably at the beginning?
Meanwhile, I'll get this series on the Collabora trees so that it gets cycled by
the CI a bit (though, it's not enough, because that needs to be tested manually).
Cheers,
Angelo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] soc: mediatek: cmdq-helper: add legacy GCE ISA support
2026-07-28 15:52 ` AngeloGioacchino Del Regno
@ 2026-07-28 16:00 ` Roman Vivchar
0 siblings, 0 replies; 8+ messages in thread
From: Roman Vivchar @ 2026-07-28 16:00 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: Jassi Brar, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, Houlong Wei, linux-kernel, devicetree,
linux-arm-kernel, linux-mediatek
On Tuesday, July 28th, 2026 at 6:52 PM, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote:
> On 7/28/26 17:47, Roman Vivchar wrote:
> > Hi Angelo,
> >
> > On Tuesday, July 28th, 2026 at 6:08 PM, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote:
> >
> >> On 7/28/26 11:42, Roman Vivchar via B4 Relay wrote:
> >>> From: Roman Vivchar <rva333@protonmail.com>
> >>>
> >>> Some SoCs, such as mt6572, have different WRITE and POLL instruction
> >>> encoding. Instead of 16-bit offset and 8-bit subsystem ID, old GCEs have
> >>> 22-bit offset and 2-bit subsystem ID.
> >>
> >> What about poll_addr, mask, write_s, write_s_mask and others?
> >
> > These don't seem to exist in all 65xx except 6595. TL;DR - old GCEs are
> > essentially dumb compared to newer ones. They have only basics like MASK (0x2),
> > WRITE (0x4), POLL (0x8), JUMP (0x10), WFE (0x20) and EOC (0x40). All logical
> > operations as well as GPR/SPR don't seem to exist.
> >
> > cmdq_pkt_poll_addr, write_s, write_s_mask are not used by the DRM subsystem.
> > mask is the same across all GCEs because it takes only u32 mask without
> > address.
> >
> >> Not sure that this will actually work reliably (though I'm sure you're not
> >> creating any regression).
> >
> > I have tested this change (on top of out-of-tree mt6572 DRM) with some
> > dd if=/dev/urandom of=/dev/null spam + modetest, as well as igt. Seems to
> > work without issues...
> >
> > Best regards,
> > Roman
>
> Alright then - look, I'd really want to pick this one up, but it's a bit late
> in the cycle and I don't really have much time left for testing.
>
> I'm sure that this is fine, but please understand me - I can't take this now,
> also because I'm going on holiday very soon and can't be here to take care of
> sudden breakages.
>
> I wonder if you could resend it in the next cycle, preferrably at the beginning?
Sure, no problem :)
>
> Meanwhile, I'll get this series on the Collabora trees so that it gets cycled by
> the CI a bit (though, it's not enough, because that needs to be tested manually).
I don't know if this one can be tested with the upstream tree (if you mean
legacy ISA)... Most likely you need some 65xx (besides 6577 and 6595) or
81xx, but I don't know about 81xx GCE. There's some effort for 6582 and
6589, but none has DRM (and so GCE) so far.
Best regards,
Roman
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-07-28 16:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-28 9:42 [PATCH 0/3] MediaTek mt6572 GCE support Roman Vivchar via B4 Relay
2026-07-28 9:42 ` [PATCH 1/3] dt-bindings: mailbox: mediatek,gce-mailbox: add mt6572 Roman Vivchar via B4 Relay
2026-07-28 9:42 ` [PATCH 2/3] soc: mediatek: cmdq-helper: add legacy GCE ISA support Roman Vivchar via B4 Relay
2026-07-28 15:08 ` AngeloGioacchino Del Regno
2026-07-28 15:47 ` Roman Vivchar
2026-07-28 15:52 ` AngeloGioacchino Del Regno
2026-07-28 16:00 ` Roman Vivchar
2026-07-28 9:42 ` [PATCH 3/3] mailbox: mtk-cmdq: add mt6572 support Roman Vivchar via B4 Relay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox