ilbox: mtk-cmdq-mailbox: Implement Runtime PM with
autosuspend")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
b/drivers/media/platfor
ilbox: mtk-cmdq-mailbox: Implement Runtime PM with
autosuspend")
Signed-off-by: Jason-JH Lin
---
drivers/gpu/drm/mediatek/mtk_crtc.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/mediatek/mtk_crtc.c
b/drivers/gpu/drm/mediatek/mtk_crtc.c
index bc7527542fdc..c4
es, remove the pm_runtime calls from
cmdq_mbox_send_data() and delegate power management responsibilities
to the client driver.
Fixes: 8afe816b0c99 ("mailbox: mtk-cmdq-mailbox: Implement Runtime PM with
autosuspend")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c
er management responsibilities
to the client driver.
---
Changes in v2:
- Move pm_runtmie APIs from cmdq driver to client drivers.
- Move pm_runtime_put_autosuspend to GCE irq callback function.
- Link to v1:
https://lore.kernel.org/r/20240614040133.24967-1-jason-jh@mediatek.com
---
Jason-JH Lin (3):
_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
index 555d35ad553e..7575ec376
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-mmsys.c | 12 +---
drivers/soc/mediatek/mtk-mutex.c | 8 ++--
2 files changed, 15 insertions(+), 5
tform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 8
include/linux/mailbox/mtk-cmdq-mailbox.h | 18 ++
2 files changed, 26 insertions(+)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
b/drivers/mailbox/mtk-cmdq-mailbox.c
index a6
cmdq_pkt_write_mask_pa() and
cmdq_pkt_write_mask_subsys().
The original cmdq_pkt_write() and cmdq_pkt_write_mask() will be removed
after all CMDQ users have migrated to the new APIs.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 41 +
include/linux/soc/mediatek
From: Jason-jh Lin
This patch series adds support for the MediaTek MT8196 SoC in the CMDQ
driver and related subsystems. The changes include adding compatible
names and iommus property, updating driver data to accommodate hardware
changes, and modifying the usage of CMDQ APIs to support non
and cmdq_revert_gce_addr().
This 2G adjustment is referred to as mminfra_offset in the CMDQ driver.
CMDQ helper can get the mminfra_offset from the cmdq_mbox_priv of
cmdq_pkt and add the mminfra_offset to the DRAM address in GCE
instructions.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-c
("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 6 ++
include/linux/soc/mediatek/mtk-cmdq.h | 9 +
2 files changed, 15 insertions(+)
diff --git a/drivers/soc/mediatek/mtk-cmdq-h
no longer in use.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 49 ++
include/linux/soc/mediatek/mtk-cmdq.h | 35 --
2 files changed, 18 insertions(+), 66 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
b
Add GCE header define for GCE Thread Priority and GCE Event IDs
that used in the MT8196 dtsi.
Signed-off-by: Jason-JH Lin
---
arch/arm64/boot/dts/mediatek/mt8196-gce.h | 612 ++
1 file changed, 612 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8196-gce.h
cmdq_pkt_write_mask_pa()
to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 24 ++--
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
index
address when generating instructions to ensure GCE accesses the correct
DRAM address. CMDQ users can then call CMDQ helper APIs as usual.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/soc
physical address
is the only option to achieve the same functionality.
This commit adds a pa_base parsing flow to the cmdq_client_reg structure
to handle hardware without subsys ID support.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +--
include/linux/soc
Since the mailbox driver data can be obtained using cmdq_get_mbox_priv()
and all CMDQ users have transitioned to cmdq_get_mbox_priv(),
cmdq_get_shift_pa() can be removed.
Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drive
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
.../platform/mediatek/mdp3/mtk-mdp3-cmdq.c| 14 +++-
.../platform/mediatek/mdp3/mtk-mdp3-comp.h| 70 ++-
2 files
pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 2 --
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h | 1 -
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git
Since all users have migrated to the new cmdq_pkt_jump* APIs without
shift_pa, the wrapper APIs cmdq_pkt_jump() and cmdq_pkt_jump_rel_temp()
can be removed.
Fixes: ade176534112 ("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
d
meter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 8
include/linux/soc/mediatek/mtk-cmdq.h | 18 +++---
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
b/d
("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 43
include/linux/mailbox/mtk-cmdq-mailbox.h | 10 ++
2 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/drivers/mailbo
. gce_vm: For GCE hardware virtualization control
Currently, the first version of the mt8196 mailbox controller only
requires setting the VM-related registers to enable the permissions
of a host VM.
Signed-off-by: Jason-JH Lin
Reviewed-by: CK Hu
---
drivers/mailbox/mtk-cmdq-mailbox.c | 12
Add cmdq_get_mbox_priv() in cmdq_pkt_create() to ensure getting private
data before generating GCE instructions.
Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 1 +
1 file changed, 1
thread for the host VM.
2. VM_CPR_GSIZE
It is used to allocate the CPR SRAM size to each VM. Each VM has 4-bit
configuration, where setting bit 0-3 to configures the size of host VM.
This setting must be configured before the VM configuration to prevent
resource leakage.
Signed-off-by: Jason-JH
address when generating instructions to ensure GCE accesses the correct
DRAM address. CMDQ users can then call CMDQ helper APIs as usual.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/soc
no longer in use.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 49 ++
include/linux/soc/mediatek/mtk-cmdq.h | 35 --
2 files changed, 18 insertions(+), 66 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
b
Since all users have migrated to the new cmdq_pkt_jump* APIs without
shift_pa, the wrapper APIs cmdq_pkt_jump() and cmdq_pkt_jump_rel_temp()
can be removed.
Fixes: ade176534112 ("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
d
. gce_vm: For GCE hardware virtualization control
Currently, the first version of the mt8196 mailbox controller only
requires setting the VM-related registers to enable the permissions
of a host VM.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 12
1 file
Add GCE header define for GCE Thread Priority and GCE Event IDs
that used in the MT8196 dtsi.
Signed-off-by: Jason-JH Lin
---
arch/arm64/boot/dts/mediatek/mt8196-gce.h | 612 ++
1 file changed, 612 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8196-gce.h
cmdq_pkt_write_mask_pa() and
cmdq_pkt_write_mask_subsys().
The original cmdq_pkt_write() and cmdq_pkt_write_mask() will be removed
after all CMDQ users have migrated to the new APIs.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 41 +
include/linux/soc/mediatek
thread for the host VM.
2. VM_CPR_GSIZE
It is used to allocate the CPR SRAM size to each VM. Each VM has 4-bit
configuration, where setting bit 0-3 to configures the size of host VM.
This setting must be configured before the VM configuration to prevent
resource leakage.
Signed-off-by: Jason-JH
Since the mailbox driver data can be obtained using cmdq_get_mbox_priv()
and all CMDQ users have transitioned to cmdq_get_mbox_priv(),
cmdq_get_shift_pa() can be removed.
Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drive
meter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 8
include/linux/soc/mediatek/mtk-cmdq.h | 18 +++---
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
b/d
tform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 8
include/linux/mailbox/mtk-cmdq-mailbox.h | 18 ++
2 files changed, 26 insertions(+)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
b/drivers/mailbox/mtk-cmdq-mailbox.c
index a3
("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 6 ++
include/linux/soc/mediatek/mtk-cmdq.h | 9 +
2 files changed, 15 insertions(+)
diff --git a/drivers/soc/mediatek/mtk-cmdq-h
the cmdq_mbox_priv of
cmdq_pkt and add the mminfra_offset to the DRAM address in GCE
instructions.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 6 --
include/linux/mailbox/mtk-cmdq-mailbox.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/driv
Add cmdq_get_mbox_priv() in cmdq_pkt_create() to ensure getting private
data before generating GCE instructions.
Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 1 +
1 file changed, 1
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
.../platform/mediatek/mdp3/mtk-mdp3-cmdq.c| 14 +++-
.../platform/mediatek/mdp3/mtk-mdp3-comp.h| 70 ++-
2 files
pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 2 --
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h | 1 -
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git
("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 43
include/linux/mailbox/mtk-cmdq-mailbox.h | 10 ++
2 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/drivers/mailbo
cmdq_pkt_write_mask_pa()
to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 24 ++--
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
index
same functionality.
---
Jason-JH Lin (20):
arm64: dts: mediatek: Add GCE header for MT8196
mailbox: mtk-cmdq: Refine DMA address handling for the command buffer
mailbox: mtk-cmdq: Add cmdq private data to cmdq_pkt for generating
instruction
soc: mediatek: mtk-cmdq: Add cmdq_get_mbox_priv
physical address
is the only option to achieve the same functionality.
This commit adds a pa_base parsing flow to the cmdq_client_reg structure
to handle hardware without subsys ID support.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +--
include/linux/soc
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-mmsys.c | 12 +---
drivers/soc/mediatek/mtk-mutex.c | 8 ++--
2 files changed, 15 insertions(+), 5
_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
index 555d35ad553e..7575ec376
() callback,indicating that the GCE IRQ has been triggered.
Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Jason-JH Lin
---
drivers/gpu/drm/mediatek/mtk_crtc.c | 30
drivers/gpu/drm/mediatek/mtk_crtc.h | 1 +
d
Since the mailbox driver data can be obtained using cmdq_get_mbox_priv()
and all CMDQ users have transitioned to cmdq_get_mbox_priv(),
cmdq_get_shift_pa() can be removed.
Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drive
_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
index e5ccf673e152..aa245bf7e
physical address
is the only option to achieve the same functionality.
This commit adds a pa_base parsing flow to the cmdq_client_reg structure
to handle hardware without subsys ID support.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +--
include/linux/soc
thread for the host VM.
2. VM_CPR_GSIZE
It is used to allocate the CPR SRAM size to each VM. Each VM has 4-bit
configuration, where setting bit 0-3 to configures the size of host VM.
This setting must be configured before the VM configuration to prevent
resource leakage.
Signed-off-by: Jason-JH
cmdq_pkt_write_mask_pa() and
cmdq_pkt_write_mask_subsys().
The original cmdq_pkt_write() and cmdq_pkt_write_mask() will be removed
after all CMDQ users have migrated to the new APIs.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 41 +
include/linux/soc/mediatek
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-mmsys.c | 12 +---
drivers/soc/mediatek/mtk-mutex.c | 8 ++--
2 files changed, 15 insertions(+), 5
address when generating instructions to ensure GCE accesses the correct
DRAM address. CMDQ users can then call CMDQ helper APIs as usual.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/soc
("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
include/linux/soc/mediatek/mtk-cmdq.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/include/linux/soc/mediatek/mtk-cmdq.h
b/include/linux/soc/mediatek/mtk-cmdq.h
index 0c
the cmdq_mbox_priv of
cmdq_pkt and add the mminfra_offset to the DRAM address in GCE
instructions.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 6 --
include/linux/mailbox/mtk-cmdq-mailbox.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/driv
cmdq_pkt_write_mask_pa()
to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 24 ++--
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
index
no longer in use.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 49 ++
include/linux/soc/mediatek/mtk-cmdq.h | 35 --
2 files changed, 18 insertions(+), 66 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
b
tform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 8
include/linux/mailbox/mtk-cmdq-mailbox.h | 18 ++
2 files changed, 26 insertions(+)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
b/drivers/mailbox/mtk-cmdq-mailbox.c
index a3
Add cmdq_get_mbox_priv() in cmdq_pkt_create() to ensure getting private
data before generating GCE instructions.
Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 1 +
1 file changed, 1
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
.../platform/mediatek/mdp3/mtk-mdp3-cmdq.c| 14 +++-
.../platform/mediatek/mdp3/mtk-mdp3-comp.h| 70 ++-
2 files
Since all users have migrated to the new cmdq_pkt_jump* APIs without
shift_pa, the wrapper APIs cmdq_pkt_jump() and cmdq_pkt_jump_rel_temp()
can be removed.
Fixes: ade176534112 ("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
include
meter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 8
include/linux/soc/mediatek/mtk-cmdq.h | 20
2 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 43
include/linux/mailbox/mtk-cmdq-mailbox.h | 10 ++
2 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/drivers/mailbo
in dt-bindings.
2. Remove the pa_base parameter of CMDQ APIs and related modification.
3. Move subsys checking to client drivers and use 2 alternative
CMDQ APIs to achieve the same functionality.
---
Jason-JH Lin (20):
arm64: dts: mediatek: Add GCE header for MT8196
mailbox: mtk-cmdq: Refine
Add GCE header define for GCE Thread Priority and GCE Event IDs
that used in the MT8196 dtsi.
Signed-off-by: Jason-JH Lin
---
arch/arm64/boot/dts/mediatek/mt8196-gce.h | 612 ++
1 file changed, 612 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8196-gce.h
. gce_vm: For GCE hardware virtualization control
Currently, the first version of the mt8196 mailbox controller only
requires setting the VM-related registers to enable the permissions
of a host VM.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 12
1 file
pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 2 --
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h | 1 -
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git
thread for the host VM.
2. VM_CPR_GSIZE
It is used to allocate the CPR SRAM size to each VM. Each VM has 4-bit
configuration, where setting bit 0-3 to configures the size of host VM.
This setting must be configured before the VM configuration to prevent
resource leakage.
Signed-off-by: Jason-JH
. gce_vm: For GCE hardware virtualization control
Currently, the first version of the mt8196 mailbox controller only
requires setting the VM-related registers to enable the permissions
of a host VM.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 12
1 file
Add cmdq_get_mbox_priv() in cmdq_pkt_create() to ensure getting private
data before generating GCE instructions.
Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 1 +
1 file changed, 1
meter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 8
include/linux/soc/mediatek/mtk-cmdq.h | 20
2 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
no longer in use.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 49 ++
include/linux/soc/mediatek/mtk-cmdq.h | 35 --
2 files changed, 18 insertions(+), 66 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
b
_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
index e5ccf673e152..aa245bf7e
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-mmsys.c | 12 +---
drivers/soc/mediatek/mtk-mutex.c | 8 ++--
2 files changed, 15 insertions(+), 5
("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 43
include/linux/mailbox/mtk-cmdq-mailbox.h | 10 ++
2 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/drivers/mailbo
the cmdq_mbox_priv of
cmdq_pkt and add the mminfra_offset to the DRAM address in GCE
instructions.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 6 --
include/linux/mailbox/mtk-cmdq-mailbox.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/driv
pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 2 --
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h | 1 -
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git
address when generating instructions to ensure GCE accesses the correct
DRAM address. CMDQ users can then call CMDQ helper APIs as usual.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/soc
Add GCE header define for GCE Thread Priority and GCE Event IDs
that used in the MT8196 dtsi.
Signed-off-by: Jason-JH Lin
---
arch/arm64/boot/dts/mediatek/mt8196-gce.h | 612 ++
1 file changed, 612 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8196-gce.h
Since all users have migrated to the new cmdq_pkt_jump* APIs without
shift_pa, the wrapper APIs cmdq_pkt_jump() and cmdq_pkt_jump_rel_temp()
can be removed.
Fixes: ade176534112 ("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
include
cmdq_pkt_write_mask_pa() and
cmdq_pkt_write_mask_subsys().
The original cmdq_pkt_write() and cmdq_pkt_write_mask() will be removed
after all CMDQ users have migrated to the new APIs.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 41 +
include/linux/soc/mediatek
("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
include/linux/soc/mediatek/mtk-cmdq.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/include/linux/soc/mediatek/mtk-cmdq.h
b/include/linux/soc/mediatek/mtk-cmdq.h
index 0c
cmdq_pkt_write_mask_pa()
to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 24 ++--
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
index
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
.../platform/mediatek/mdp3/mtk-mdp3-cmdq.c| 14 +++-
.../platform/mediatek/mdp3/mtk-mdp3-comp.h| 70 ++-
2 files
physical address
is the only option to achieve the same functionality.
This commit adds a pa_base parsing flow to the cmdq_client_reg structure
to handle hardware without subsys ID support.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +--
include/linux/soc
2 alternative
CMDQ APIs to achieve the same functionality.
Jason-JH Lin (19):
arm64: dts: mediatek: Add GCE header for MT8196
mailbox: mtk-cmdq: Refine DMA address handling for the command buffer
mailbox: mtk-cmdq: Add cmdq private data to cmdq_pkt for generating
instruction
soc
tform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 6 +++---
include/linux/mailbox/mtk-cmdq-mailbox.h | 18 --
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
b/drivers/mailbox/mtk-cmdq-mailb
after the GCE clocks are enabled.
Move this function into cmdq_runtime_resume() and cmdq_runtime_suspend()
to ensure it is called when the GCE clock is enabled.
Fixes: 7abd037aa581 ("mailbox: mtk-cmdq: add gce ddr enable support flow")
Signed-off-by: Jason-JH Lin
---
drivers/mailbo
. As a result, no page flip
event is sent back to user space, and the screen does not update.
Fixes: da03801ad08f ("drm/mediatek: Move mtk_crtc_finish_page_flip() to
ddp_cmdq_cb()")
Signed-off-by: Jason-JH Lin
---
drivers/gpu/drm/mediatek/mtk_crtc.c | 5 +++--
1 file changed, 3 insert
.
---
Jason-JH Lin (8):
dt-bindings: mailbox: mediatek: Add support for MT8196 GCE mailbox
arm64: dts: mediatek: Add GCE header for MT8196
mailbox: mtk-cmdq: Add driver data to support for MT8196
soc: mediatek: mtk-cmdq: Add pa_base parsing for unsupported subsys ID
hardware
soc: mediatek
: Jason-JH Lin
---
.../platform/mediatek/mdp3/mtk-mdp3-cmdq.c| 18 -
.../platform/mediatek/mdp3/mtk-mdp3-comp.h| 79 ++-
2 files changed, 77 insertions(+), 20 deletions(-)
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
b/drivers/media/platform/mediatek
Add the compatible name and iommus property for MT8196.
In MT8196, all command buffers allocated and used by the GCE device
work with IOMMU.
Signed-off-by: Jason-JH Lin
---
.../devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml | 4
1 file changed, 4 insertions(+)
diff --git
a
Add GCE header define for GCE Thread priority and GCE event IDs
that used in the MT8196 dtsi.
Signed-off-by: Jason-JH Lin
---
arch/arm64/boot/dts/mediatek/mt8196-gce.h | 612 ++
1 file changed, 612 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8196-gce.h
To support hardware without subsys IDs on new SoCs, add a programming
flow that checks whether the subsys ID is valid. If the subsys ID is
invalid, the flow will call 2 alternative CMDQ APIs:
cmdq_pkt_assign() and cmdq_pkt_write_s_value() to achieve the same
functionality.
Signed-off-by: Jason-JH
parsing flow to the cmdq_client_reg structure
for these unsupported subsys ID hardware.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 18 --
include/linux/soc/mediatek/mtk-cmdq.h | 3 +++
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a
the mbox API to get the
mminfra_offset value of the SoC, and then add it to the DRAM address
when generating instructions to ensure GCE accesses the correct DRAM
address.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 35 --
1 file changed, 33
accessing DRAM,
GCE needs to configure the DMA address to be less than 35 bits.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 90 +---
include/linux/mailbox/mtk-cmdq-mailbox.h | 2 +
2 files changed, 84 insertions(+), 8 deletions(-)
diff --git a
To support hardware without subsys IDs on new SoCs, add a programming
flow that checks whether the subsys ID is valid. If the subsys ID is
invalid, the flow will call 2 alternative CMDQ APIs:
cmdq_pkt_assign() and cmdq_pkt_write_s_value() to achieve the same
functionality.
Signed-off-by: Jason-JH
From: Hsiao Chien Sung
Modify rules for both MT8195 and MT8188.
Hardware capabilities include color formats and AFBC are
changed since MT8195, stop using the settings of MT8183.
Acked-by: Rob Herring
Reviewed-by: AngeloGioacchino Del Regno
Reviewed-by: CK Hu
Signed-off-by: Hsiao Chien Sung
1 - 100 of 618 matches
Mail list logo