[PATCH v2 0/9] Add CMDQ secure driver for SVP

Jason-JH.Lin
2023-10-23T04:38:09Z

For the Secure Video Path (SVP) feature, inculding the memory stored
secure video content, the registers of display HW pipeline and the
HW configure operations are required to execute in the secure world.

So using a CMDQ secure driver to make all display HW registers
configuration secure DRAM access permision settings execute by GCE
secure thread in the secure world.

We are landing this feature on mt8188 and mt8195 currently.
---
Based on 1 patch:
[1] soc: mediatek: Add register definitions for GCE
- https://patchwork.kernel.org/project/linux-mediatek/patch/20231017064717.21616-2-shawn.sung@mediatek.com/
---
Change in v2:

1. adjust dt-binding SW event define patch before the dt-binding patch using it
2. adjust dt-binding patch for secure cmdq driver
3. remove the redundant patches or merge the patches of modification for the same API

Jason-JH.Lin (9):
dt-bindings: gce: mt8195: Add CMDQ_SYNC_TOKEN_SECURE_THR_EOF event id
dt-bindings: mailbox: Add property for CMDQ secure driver
soc: mailbox: Add cmdq_pkt_logic_command to support math operation
soc: mailbox: Add cmdq_pkt_write_s_reg_value to support write value to
reg
soc: mailbox: Add cmdq_pkt_finalize_loop to support looping cmd with
irq
mailbox: mediatek: Add CMDQ driver support for mt8188
mailbox: mediatek: Add secure CMDQ driver support for CMDQ driver
mailbox: mediatek: Add CMDQ secure mailbox driver
arm64: dts: mediatek: mt8195: Add CMDQ secure driver support for gce0

.../mailbox/mediatek,gce-mailbox.yaml | 10 +
arch/arm64/boot/dts/mediatek/mt8195.dtsi | 2 +
drivers/mailbox/Makefile | 2 +-
drivers/mailbox/mtk-cmdq-mailbox.c | 61 +-
drivers/mailbox/mtk-cmdq-sec-mailbox.c | 1102 +++++++++++++++++
drivers/mailbox/mtk-cmdq-sec-tee.c | 202 +++
drivers/soc/mediatek/mtk-cmdq-helper.c | 72 ++
include/dt-bindings/gce/mt8195-gce.h | 6 +
include/linux/mailbox/mtk-cmdq-mailbox.h | 14 +
.../linux/mailbox/mtk-cmdq-sec-iwc-common.h | 293 +++++
include/linux/mailbox/mtk-cmdq-sec-mailbox.h | 83 ++
include/linux/mailbox/mtk-cmdq-sec-tee.h | 31 +
include/linux/soc/mediatek/mtk-cmdq.h | 60 +
13 files changed, 1935 insertions(+), 3 deletions(-)
create mode 100644 drivers/mailbox/mtk-cmdq-sec-mailbox.c
create mode 100644 drivers/mailbox/mtk-cmdq-sec-tee.c
create mode 100644 include/linux/mailbox/mtk-cmdq-sec-iwc-common.h
create mode 100644 include/linux/mailbox/mtk-cmdq-sec-mailbox.h
create mode 100644 include/linux/mailbox/mtk-cmdq-sec-tee.h

--
2.18.0