media: mediatek: support mdp3 on mt8183 platform
Subsystems (3)
v6 cover media: mediatek: support mdp3 on mt8183 platform
Changes since v5:
- Rebase on v5.14-rc6.
- Move MMSYS/Mutex settings to corresponding driver.
- Revise the software license description and copyright.
- Remove unnecessary enum. or definitions.
- Optimize platform/chip definition conditions.
- Use general printing functions instead of MDP3 private ones.
- Fix compile warning.
Changes since v4:
- Rebase on v5.13-rc1.
- Remove the CMDQ flush flow to match the CMDQ API change.
- Integrate four of MDP's direct-link subcomponents into MDP controller node from syscon node to avoid illegal clock usage.
- Rewrite dt-binding in a JSON compatible subset of YAML
- Fix a bit of macro argument precedence.
Changes since v3:
- Rebase on v5.9-rc1.
- modify code for review comment from Rob Herring, cancel multiple nodes using same register base situation.
- control IOMMU port through pm runtime get/put to DMA components' device.
- SCP(VPU) driver revision.
- stop queuing jobs(remove flush_workqueue()) after mdp_m2m_release().
- add computation of plane address with data_offset.
- fix scale ratio check issue.
- add default v4l2_format setting.
Changes since v2:
- modify code for review comment from Tomasz Figa & Alexandre Courbot
- review comment from Rob Herring will offer code revision in v4, due to it's related to device node modification, will need to modify code architecture
Changes since v1:
- modify code for CMDQ v3 API support
- EC ipi cmd migration
- fix compliance test fail item (m2m cmd with -f) due to there is two problem in runing all format(-f) cmd:
1. out of memory before test complete
Due to capture buffer mmap (refcount + 1) after reqbuf but seems
no corresponding munmap called before device close.
There are total 12XX items(formats) in format test and each format
alloc 8 capture/output buffers.
2. unceasingly captureBufs() (randomly)
Seems the break statement didn't catch the count == 0 situation:
In v4l2-test-buffers.cpp, function: captureBufs()
...
count--;
if (!node->is_m2m && !count)
break;
Log is as attachmentI will paste the test result with problem part in another e-mail
Hi,
This is the first version of RFC patch for Media Data Path 3 (MDP3), MDP3 is used for scaling and color format conversion. support using GCE to write register in critical time limitation. support V4L2 m2m device control.
Moudy Ho (5):
soc: mediatek: mmsys: Add support for MDP
soc: mediatek: mutex: add support for MDP
dt-binding: mt8183: Add Mediatek MDP3 dt-bindings
dts: arm64: mt8183: Add Mediatek MDP3 nodes
media: platform: mtk-mdp3: Add Mediatek MDP3 driver
.../bindings/media/mediatek,mdp3-ccorr.yaml | 58 + .../bindings/media/mediatek,mdp3-rdma.yaml | 241 +++ .../bindings/media/mediatek,mdp3-rsz.yaml | 66 + .../bindings/media/mediatek,mdp3-wdma.yaml | 71 + .../bindings/media/mediatek,mdp3-wrot.yaml | 71 + arch/arm64/boot/dts/mediatek/mt8183.dtsi | 110 ++ drivers/media/platform/Kconfig | 19 + drivers/media/platform/Makefile | 2 + drivers/media/platform/mtk-mdp3/Makefile | 7 + drivers/media/platform/mtk-mdp3/isp_reg.h | 27 + .../media/platform/mtk-mdp3/mdp_reg_ccorr.h | 19 + .../media/platform/mtk-mdp3/mdp_reg_rdma.h | 65 + drivers/media/platform/mtk-mdp3/mdp_reg_rsz.h | 39 + .../media/platform/mtk-mdp3/mdp_reg_wdma.h | 47 + .../media/platform/mtk-mdp3/mdp_reg_wrot.h | 55 + drivers/media/platform/mtk-mdp3/mtk-img-ipi.h | 281 ++++ .../media/platform/mtk-mdp3/mtk-mdp3-cmdq.c | 508 ++++++ .../media/platform/mtk-mdp3/mtk-mdp3-cmdq.h | 47 + .../media/platform/mtk-mdp3/mtk-mdp3-comp.c | 1357 +++++++++++++++++ .../media/platform/mtk-mdp3/mtk-mdp3-comp.h | 148 ++ .../media/platform/mtk-mdp3/mtk-mdp3-core.c | 300 ++++ .../media/platform/mtk-mdp3/mtk-mdp3-core.h | 75 + .../media/platform/mtk-mdp3/mtk-mdp3-m2m.c | 802 ++++++++++ .../media/platform/mtk-mdp3/mtk-mdp3-m2m.h | 42 + .../media/platform/mtk-mdp3/mtk-mdp3-regs.c | 747 +++++++++ .../media/platform/mtk-mdp3/mtk-mdp3-regs.h | 373 +++++ .../media/platform/mtk-mdp3/mtk-mdp3-vpu.c | 314 ++++ .../media/platform/mtk-mdp3/mtk-mdp3-vpu.h | 79 + drivers/soc/mediatek/mt8183-mmsys.h | 235 +++ drivers/soc/mediatek/mtk-mmsys.c | 164 ++ drivers/soc/mediatek/mtk-mmsys.h | 9 +- drivers/soc/mediatek/mtk-mutex.c | 106 +- include/linux/soc/mediatek/mtk-mmsys.h | 81 + include/linux/soc/mediatek/mtk-mutex.h | 8 + 34 files changed, 6564 insertions(+), 9 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-ccorr.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-rsz.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-wdma.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-wrot.yaml create mode 100644 drivers/media/platform/mtk-mdp3/Makefile create mode 100644 drivers/media/platform/mtk-mdp3/isp_reg.h create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_ccorr.h create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_rdma.h create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_rsz.h create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_wdma.h create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_wrot.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-img-ipi.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-core.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-m2m.c create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-m2m.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.c create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.h
Signature · 1 line
2.18.0
PATCH v6 1/5 soc: mediatek: mmsys: Add support for MDP
Add functions to support MDP:
1. MDP connect/disconnect functions
2. ISP control function
3. Write register via CMDQ
Add MDP related settings for 8183 SoC
1. Register settings
2. MDP route table
--- drivers/soc/mediatek/mt8183-mmsys.h | 235 +++++++++++++++++++++++++ drivers/soc/mediatek/mtk-mmsys.c | 164 +++++++++++++++++ drivers/soc/mediatek/mtk-mmsys.h | 9 +- include/linux/soc/mediatek/mtk-mmsys.h | 81 +++++++++ 4 files changed, 486 insertions(+), 3 deletions(-)
drivers/soc/mediatek/mt8183-mmsys.h +235 -0
@@ -12,6 +12,32 @@#define MT8183_DISP_DPI0_SEL_IN 0xf30#define MT8183_DISP_RDMA0_SOUT_SEL_IN 0xf50#define MT8183_DISP_RDMA1_SOUT_SEL_IN 0xf54 +#define MT8183_MDP_ISP_MOUT_EN 0xf80 +#define MT8183_MDP_RDMA0_MOUT_EN 0xf84 +#define MT8183_MDP_PRZ0_MOUT_EN 0xf8c +#define MT8183_MDP_PRZ1_MOUT_EN 0xf90 +#define MT8183_MDP_COLOR_MOUT_EN 0xf94 +#define MT8183_MDP_IPU_MOUT_EN 0xf98 +#define MT8183_MDP_PATH0_SOUT_SEL 0xfa8 +#define MT8183_MDP_PATH1_SOUT_SEL 0xfac +#define MT8183_MDP_PRZ0_SEL_IN 0xfc0 +#define MT8183_MDP_PRZ1_SEL_IN 0xfc4 +#define MT8183_MDP_TDSHP_SEL_IN 0xfc8 +#define MT8183_MDP_WROT0_SEL_IN 0xfd0 +#define MT8183_MDP_WDMA_SEL_IN 0xfd4 +#define MT8183_MDP_PATH0_SEL_IN 0xfe0 +#define MT8183_MDP_PATH1_SEL_IN 0xfe4 +#define MT8183_MDP_AAL_MOUT_EN 0xfe8 +#define MT8183_MDP_AAL_SEL_IN 0xfec +#define MT8183_MDP_CCORR_SEL_IN 0xff0 +#define MT8183_MDP_CCORR_SOUT_SEL 0xff4 + +#define MT8183_ISP_CTRL_MMSYS_SW0_RST_B 0x140 +#define MT8183_ISP_CTRL_MMSYS_SW1_RST_B 0x144 +#define MT8183_ISP_CTRL_MDP_ASYNC_CFG_WD 0x934 +#define MT8183_ISP_CTRL_MDP_ASYNC_IPU_CFG_WD 0x93C +#define MT8183_ISP_CTRL_ISP_RELAY_CFG_WD 0x994 +#define MT8183_ISP_CTRL_IPU_RELAY_CFG_WD 0x9a0#define MT8183_OVL0_MOUT_EN_OVL0_2L BIT(4)#define MT8183_OVL0_2L_MOUT_EN_DISP_PATH0 BIT(0)
@@ -24,6 +50,55 @@#define MT8183_DPI0_SEL_IN_RDMA1 0x2#define MT8183_RDMA0_SOUT_COLOR0 0x1#define MT8183_RDMA1_SOUT_DSI0 0x1 +#define MT8183_MDP_ISP_MOUT_EN_CCORR0 BIT(0) +#define MT8183_MDP_ISP_MOUT_EN_RSZ1 BIT(1) +#define MT8183_MDP_ISP_MOUT_EN_AAL0 BIT(2) +#define MT8183_MDP_IPU_MOUT_EN_CCORR0 BIT(0) +#define MT8183_MDP_IPU_MOUT_EN_RSZ1 BIT(1) +#define MT8183_MDP_IPU_MOUT_EN_AAL0 BIT(2) +#define MT8183_MDP_RDMA0_MOUT_EN_CCORR0 BIT(0) +#define MT8183_MDP_RDMA0_MOUT_EN_RSZ1 BIT(1) +#define MT8183_MDP_RDMA0_MOUT_EN_PATH0_OUT BIT(2) +#define MT8183_MDP_RDMA0_MOUT_EN_AAL0 BIT(3) +#define MT8183_MDP_AAL_MOUT_EN_CCORR0 BIT(0) +#define MT8183_MDP_AAL_MOUT_EN_RSZ1 BIT(1) +#define MT8183_MDP_AAL_MOUT_EN_RSZ0 BIT(2) +#define MT8183_MDP_PRZ0_MOUT_EN_PATH0_OUT BIT(0) +#define MT8183_MDP_PRZ0_MOUT_EN_TDSHP0 BIT(1) +#define MT8183_MDP_PRZ1_MOUT_EN_PATH0_OUT BIT(0) +#define MT8183_MDP_PRZ1_MOUT_EN_TDSHP0 BIT(1) +#define MT8183_MDP_PRZ1_MOUT_EN_PATH1_OUT BIT(2) +#define MT8183_MDP_PRZ1_MOUT_EN_COLOR0 BIT(4) +#define MT8183_MDP_COLOR_MOUT_EN_PATH0_OUT BIT(0) +#define MT8183_MDP_COLOR_MOUT_EN_PATH1_OUT BIT(1) +#define MT8183_MDP_AAL_SEL_IN_CAMIN 0 +#define MT8183_MDP_AAL_SEL_IN_RDMA0 1 +#define MT8183_MDP_AAL_SEL_IN_CAMIN2 2 +#define MT8183_MDP_AAL_SEL_IN_CCORR0 3 +#define MT8183_MDP_CCORR_SEL_IN_CAMIN 0 +#define MT8183_MDP_CCORR_SEL_IN_RDMA0 1 +#define MT8183_MDP_CCORR_SEL_IN_CAMIN2 3 +#define MT8183_MDP_CCORR_SEL_IN_AAL0 4 +#define MT8183_MDP_PRZ0_SEL_IN_AAL0 0 +#define MT8183_MDP_PRZ0_SEL_IN_CCORR0 1 +#define MT8183_MDP_PRZ1_SEL_IN_CAMIN 0 +#define MT8183_MDP_PRZ1_SEL_IN_RDMA0 1 +#define MT8183_MDP_PRZ1_SEL_IN_CAMIN2 4 +#define MT8183_MDP_PRZ1_SEL_IN_AAL0 5 +#define MT8183_MDP_TDSHP_SEL_IN_RSZ0 0 +#define MT8183_MDP_TDSHP_SEL_IN_RSZ1 1 +#define MT8183_MDP_PATH0_SEL_IN_RSZ0 0 +#define MT8183_MDP_PATH0_SEL_IN_RSZ1 1 +#define MT8183_MDP_PATH0_SEL_IN_COLOR0 2 +#define MT8183_MDP_PATH0_SEL_IN_RDMA0 3 +#define MT8183_MDP_PATH1_SEL_IN_RSZ1 0 +#define MT8183_MDP_PATH1_SEL_IN_COLOR0 1 +#define MT8183_MDP_WROT0_SEL_IN_PATH0_OUT 0 +#define MT8183_MDP_WDMA_SEL_IN_PATH1_OUT 0 +#define MT8183_MDP_CCORR_SOUT_SEL_AAL0 0 +#define MT8183_MDP_CCORR_SOUT_SEL_RSZ0 1 +#define MT8183_MDP_PATH0_SOUT_SEL_WROT0 0 +#define MT8183_MDP_PATH1_SOUT_SEL_WDMA 0static const struct mtk_mmsys_routes mmsys_mt8183_routing_table[] = { {
@@ -50,5 +125,165 @@ static const struct mtk_mmsys_routes mmsys_mt8183_routing_table[] = { } }; +static const struct mtk_mmsys_routes mmsys_mt8183_mdp_routing_table[] = { + { +MDP_COMP_CAMIN ,MDP_COMP_CCORR0 , +MT8183_MDP_ISP_MOUT_EN ,MT8183_MDP_ISP_MOUT_EN_CCORR0 + }, { +MDP_COMP_CAMIN ,MDP_COMP_RSZ1 , +MT8183_MDP_ISP_MOUT_EN ,MT8183_MDP_ISP_MOUT_EN_RSZ1 + }, { +MDP_COMP_CAMIN ,MDP_COMP_AAL0 , +MT8183_MDP_ISP_MOUT_EN ,MT8183_MDP_ISP_MOUT_EN_AAL0 + }, { +MDP_COMP_CAMIN2 ,MDP_COMP_CCORR0 , +MT8183_MDP_IPU_MOUT_EN ,MT8183_MDP_IPU_MOUT_EN_CCORR0 + }, { +MDP_COMP_CAMIN2 ,MDP_COMP_RSZ1 , +MT8183_MDP_IPU_MOUT_EN ,MT8183_MDP_IPU_MOUT_EN_RSZ1 + }, { +MDP_COMP_CAMIN2 ,MDP_COMP_AAL0 , +MT8183_MDP_IPU_MOUT_EN ,MT8183_MDP_IPU_MOUT_EN_AAL0 + }, { +MDP_COMP_RDMA0 ,MDP_COMP_CCORR0 , +MT8183_MDP_RDMA0_MOUT_EN ,MT8183_MDP_RDMA0_MOUT_EN_CCORR0 + }, { +MDP_COMP_RDMA0 ,MDP_COMP_RSZ1 , +MT8183_MDP_RDMA0_MOUT_EN ,MT8183_MDP_RDMA0_MOUT_EN_RSZ1 + }, { +MDP_COMP_RDMA0 ,MDP_COMP_PATH0_SOUT , +MT8183_MDP_RDMA0_MOUT_EN ,MT8183_MDP_RDMA0_MOUT_EN_PATH0_OUT + }, { +MDP_COMP_RDMA0 ,MDP_COMP_AAL0 , +MT8183_MDP_RDMA0_MOUT_EN ,MT8183_MDP_RDMA0_MOUT_EN_AAL0 + }, { +MDP_COMP_AAL0 ,MDP_COMP_CCORR0 , +MT8183_MDP_AAL_MOUT_EN ,MT8183_MDP_AAL_MOUT_EN_CCORR0 + }, { +MDP_COMP_AAL0 ,MDP_COMP_RSZ1 , +MT8183_MDP_AAL_MOUT_EN ,MT8183_MDP_AAL_MOUT_EN_RSZ1 + }, { +MDP_COMP_AAL0 ,MDP_COMP_RSZ0 , +MT8183_MDP_AAL_MOUT_EN ,MT8183_MDP_AAL_MOUT_EN_RSZ0 + }, { +MDP_COMP_RSZ0 ,MDP_COMP_PATH0_SOUT , +MT8183_MDP_PRZ0_MOUT_EN ,MT8183_MDP_PRZ0_MOUT_EN_PATH0_OUT + }, { +MDP_COMP_RSZ0 ,MDP_COMP_TDSHP0 , +MT8183_MDP_PRZ0_MOUT_EN ,MT8183_MDP_PRZ0_MOUT_EN_TDSHP0 + }, { +MDP_COMP_RSZ1 ,MDP_COMP_PATH0_SOUT , +MT8183_MDP_PRZ1_MOUT_EN ,MT8183_MDP_PRZ1_MOUT_EN_PATH0_OUT + }, { +MDP_COMP_RSZ1 ,MDP_COMP_TDSHP0 , +MT8183_MDP_PRZ1_MOUT_EN ,MT8183_MDP_PRZ1_MOUT_EN_TDSHP0 + }, { +MDP_COMP_RSZ1 ,MDP_COMP_PATH1_SOUT , +MT8183_MDP_PRZ1_MOUT_EN ,MT8183_MDP_PRZ1_MOUT_EN_PATH1_OUT + }, { +MDP_COMP_RSZ1 ,MDP_COMP_COLOR0 , +MT8183_MDP_PRZ1_MOUT_EN ,MT8183_MDP_PRZ1_MOUT_EN_COLOR0 + }, { +MDP_COMP_COLOR0 ,MDP_COMP_PATH0_SOUT , +MT8183_MDP_COLOR_MOUT_EN ,MT8183_MDP_COLOR_MOUT_EN_PATH0_OUT + }, { +MDP_COMP_COLOR0 ,MDP_COMP_PATH1_SOUT , +MT8183_MDP_COLOR_MOUT_EN ,MT8183_MDP_COLOR_MOUT_EN_PATH1_OUT + }, { +MDP_COMP_CAMIN ,MDP_COMP_AAL0 , +MT8183_MDP_AAL_SEL_IN ,MT8183_MDP_AAL_SEL_IN_CAMIN + }, { +MDP_COMP_RDMA0 ,MDP_COMP_AAL0 , +MT8183_MDP_AAL_SEL_IN ,MT8183_MDP_AAL_SEL_IN_RDMA0 + }, { +MDP_COMP_CAMIN2 ,MDP_COMP_AAL0 , +MT8183_MDP_AAL_SEL_IN ,MT8183_MDP_AAL_SEL_IN_CAMIN2 + }, { +MDP_COMP_CCORR0 ,MDP_COMP_AAL0 , +MT8183_MDP_AAL_SEL_IN ,MT8183_MDP_AAL_SEL_IN_CCORR0 + }, { +MDP_COMP_CAMIN ,MDP_COMP_CCORR0 , +MT8183_MDP_CCORR_SEL_IN ,MT8183_MDP_CCORR_SEL_IN_CAMIN + }, { +MDP_COMP_RDMA0 ,MDP_COMP_CCORR0 , +MT8183_MDP_CCORR_SEL_IN ,MT8183_MDP_CCORR_SEL_IN_RDMA0 + }, { +MDP_COMP_CAMIN2 ,MDP_COMP_CCORR0 , +MT8183_MDP_CCORR_SEL_IN ,MT8183_MDP_CCORR_SEL_IN_CAMIN2 + }, { +MDP_COMP_AAL0 ,MDP_COMP_CCORR0 , +MT8183_MDP_CCORR_SEL_IN ,MT8183_MDP_CCORR_SEL_IN_AAL0 + }, { +MDP_COMP_AAL0 ,MDP_COMP_RSZ0 , +MT8183_MDP_PRZ0_SEL_IN ,MT8183_MDP_PRZ0_SEL_IN_AAL0 + }, { +MDP_COMP_CCORR0 ,MDP_COMP_RSZ0 , +MT8183_MDP_PRZ0_SEL_IN ,MT8183_MDP_PRZ0_SEL_IN_CCORR0 + }, { +MDP_COMP_CAMIN ,MDP_COMP_RSZ1 , +MT8183_MDP_PRZ1_SEL_IN ,MT8183_MDP_PRZ1_SEL_IN_CAMIN + }, { +MDP_COMP_RDMA0 ,MDP_COMP_RSZ1 , +MT8183_MDP_PRZ1_SEL_IN ,MT8183_MDP_PRZ1_SEL_IN_RDMA0 + }, { +MDP_COMP_CAMIN2 ,MDP_COMP_RSZ1 , +MT8183_MDP_PRZ1_SEL_IN ,MT8183_MDP_PRZ1_SEL_IN_CAMIN2 + }, { +MDP_COMP_AAL0 ,MDP_COMP_RSZ1 , +MT8183_MDP_PRZ1_SEL_IN ,MT8183_MDP_PRZ1_SEL_IN_AAL0 + }, { +MDP_COMP_RSZ0 ,MDP_COMP_TDSHP0 , +MT8183_MDP_TDSHP_SEL_IN ,MT8183_MDP_TDSHP_SEL_IN_RSZ0 + }, { +MDP_COMP_RSZ1 ,MDP_COMP_TDSHP0 , +MT8183_MDP_TDSHP_SEL_IN ,MT8183_MDP_TDSHP_SEL_IN_RSZ1 + }, { +MDP_COMP_RSZ0 ,MDP_COMP_PATH0_SOUT , +MT8183_MDP_PATH0_SEL_IN ,MT8183_MDP_PATH0_SEL_IN_RSZ0 + }, { +MDP_COMP_RSZ1 ,MDP_COMP_PATH0_SOUT , +MT8183_MDP_PATH0_SEL_IN ,MT8183_MDP_PATH0_SEL_IN_RSZ1 + }, { +MDP_COMP_COLOR0 ,MDP_COMP_PATH0_SOUT , +MT8183_MDP_PATH0_SEL_IN ,MT8183_MDP_PATH0_SEL_IN_COLOR0 + }, { +MDP_COMP_RDMA0 ,MDP_COMP_PATH0_SOUT , +MT8183_MDP_PATH0_SEL_IN ,MT8183_MDP_PATH0_SEL_IN_RDMA0 + }, { +MDP_COMP_RSZ1 ,MDP_COMP_PATH1_SOUT , +MT8183_MDP_PATH1_SEL_IN ,MT8183_MDP_PATH1_SEL_IN_RSZ1 + }, { +MDP_COMP_COLOR0 ,MDP_COMP_PATH1_SOUT , +MT8183_MDP_PATH1_SEL_IN ,MT8183_MDP_PATH1_SEL_IN_COLOR0 + }, { +MDP_COMP_PATH0_SOUT ,MDP_COMP_WROT0 , +MT8183_MDP_WROT0_SEL_IN ,MT8183_MDP_WROT0_SEL_IN_PATH0_OUT + }, { +MDP_COMP_PATH1_SOUT ,MDP_COMP_WDMA , +MT8183_MDP_WDMA_SEL_IN ,MT8183_MDP_WDMA_SEL_IN_PATH1_OUT + }, { +MDP_COMP_CCORR0 ,MDP_COMP_AAL0 , +MT8183_MDP_CCORR_SOUT_SEL ,MT8183_MDP_CCORR_SOUT_SEL_AAL0 + }, { +MDP_COMP_CCORR0 ,MDP_COMP_RSZ0 , +MT8183_MDP_CCORR_SOUT_SEL ,MT8183_MDP_CCORR_SOUT_SEL_RSZ0 + }, { +MDP_COMP_PATH0_SOUT ,MDP_COMP_WROT0 , +MT8183_MDP_PATH0_SOUT_SEL ,MT8183_MDP_PATH0_SOUT_SEL_WROT0 + }, { +MDP_COMP_PATH1_SOUT ,MDP_COMP_WDMA , +MT8183_MDP_PATH1_SOUT_SEL ,MT8183_MDP_PATH1_SOUT_SEL_WDMA + } +}; + +static const unsigned int mmsys_mt8183_mdp_isp_ctrl_table[ISP_CTRL_MAX ] = { + [ISP_CTRL_MMSYS_SW0_RST_B ] =MT8183_ISP_CTRL_MMSYS_SW0_RST_B , + [ISP_CTRL_MMSYS_SW1_RST_B ] =MT8183_ISP_CTRL_MMSYS_SW1_RST_B , + [ISP_CTRL_MDP_ASYNC_CFG_WD ] =MT8183_ISP_CTRL_MDP_ASYNC_CFG_WD , + [ISP_CTRL_MDP_ASYNC_IPU_CFG_WD ] =MT8183_ISP_CTRL_MDP_ASYNC_IPU_CFG_WD , + [ISP_CTRL_ISP_RELAY_CFG_WD ] =MT8183_ISP_CTRL_ISP_RELAY_CFG_WD , + [ISP_CTRL_IPU_RELAY_CFG_WD ] =MT8183_ISP_CTRL_IPU_RELAY_CFG_WD , +}; +#endif /* __SOC_MEDIATEK_MT8183_MMSYS_H */
drivers/soc/mediatek/mtk-mmsys.c +164 -0
201 lines not on this page · raw message
drivers/soc/mediatek/mtk-mmsys.h +6 -3
@@ -74,9 +74,12 @@ struct mtk_mmsys_routes { };struct mtk_mmsys_driver_data { -const char *clk_driver; -const struct mtk_mmsys_routes *routes; -const unsigned int num_routes; +const char *clk_driver; +const struct mtk_mmsys_routes *routes; +const unsigned int num_routes; +const struct mtk_mmsys_routes *mdp_routes; +const unsigned int mdp_num_routes; +const unsigned int *mdp_isp_ctrl; };/*
include/linux/soc/mediatek/mtk-mmsys.h +81 -0
99 lines not on this page · raw message
Signature · 1 line
2.18.0
kernel test robot
build botRe: [PATCH v6 1/5] soc: mediatek: mmsys: Add support for MDP
Thank you for the patch! Yet something to improve:
Hi Moudy,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on robh/for-next linus/master mediatek/for-next v5.14-rc6 next-20210819] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Moudy-Ho/media-mediatek-support-mdp3-on-mt8183-platform/20210819-151256 base: git://linuxtv.org/media_tree.git master config: riscv-randconfig-r033-20210818 (attached as .config) compiler: riscv64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/ffae2ca50c715cb1ded96d9374a82883190f548d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Moudy-Ho/media-mediatek-support-mdp3-on-mt8183-platform/20210819-151256 git checkout ffae2ca50c715cb1ded96d9374a82883190f548d
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o: in function `.L27':
>> mtk-mmsys.c:(.text+0x420): undefined reference to `cmdq_pkt_write_mask'
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o: in function `.L34':
mtk-mmsys.c:(.text+0x5a0): undefined reference to `cmdq_pkt_write_mask'
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o: in function `.L45':
mtk-mmsys.c:(.text+0x7a0): undefined reference to `cmdq_pkt_write_mask'
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o: in function `.L66':
mtk-mmsys.c:(.text+0x7d8): undefined reference to `cmdq_pkt_write_mask'
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o: in function `.L42':
mtk-mmsys.c:(.text+0x7f4): undefined reference to `cmdq_pkt_write_mask'
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o:mtk-mmsys.c:(.text+0x84c): more undefined references to `cmdq_pkt_write_mask' follow
riscv64-linux-ld: drivers/soc/mediatek/mtk-mmsys.o: in function `platform_device_register_resndata.constprop.0':
mtk-mmsys.c:(.text+0xce8): undefined reference to `cmdq_dev_get_client_reg'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
kernel test robot
build botRe: [PATCH v6 1/5] soc: mediatek: mmsys: Add support for MDP
In reply to Moudy HoThank you for the patch! Yet something to improve:
Hi Moudy,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on robh/for-next linus/master v5.14-rc6 next-20210819] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Moudy-Ho/media-mediatek-support-mdp3-on-mt8183-platform/20210819-151256 base: git://linuxtv.org/media_tree.git master config: hexagon-randconfig-r045-20210819 (attached as .config) compiler: clang version 12.0.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/ffae2ca50c715cb1ded96d9374a82883190f548d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Moudy-Ho/media-mediatek-support-mdp3-on-mt8183-platform/20210819-151256 git checkout ffae2ca50c715cb1ded96d9374a82883190f548d
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
>> ld.lld: error: undefined symbol: cmdq_pkt_write_mask >>> referenced by mtk-mmsys.c >>> soc/mediatek/mtk-mmsys.o:(mtk_mmsys_mdp_connect) in archive drivers/built-in.a >>> referenced by mtk-mmsys.c >>> soc/mediatek/mtk-mmsys.o:(mtk_mmsys_mdp_connect) in archive drivers/built-in.a >>> referenced by mtk-mmsys.c >>> soc/mediatek/mtk-mmsys.o:(mtk_mmsys_mdp_disconnect) in archive drivers/built-in.a >>> referenced 25 more times -- >> ld.lld: error: undefined symbol: cmdq_dev_get_client_reg >>> referenced by mtk-mmsys.c >>> soc/mediatek/mtk-mmsys.o:(mtk_mmsys_probe) in archive drivers/built-in.a >>> referenced by mtk-mmsys.c >>> soc/mediatek/mtk-mmsys.o:(mtk_mmsys_probe) in archive drivers/built-in.a
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
PATCH v6 2/5 soc: mediatek: mutex: add support for MDP
In reply to Moudy HoAdd functions to support MDP:
1. Get mutex function
2. Enable/disable mutex
3. Enable MDP's modules
4. Write register via CMDQ
Add MDP related settings for 8183 SoC
1. Register settings
--- drivers/soc/mediatek/mtk-mutex.c | 106 +++++++++++++++++++++++-- include/linux/soc/mediatek/mtk-mutex.h | 8 ++ 2 files changed, 108 insertions(+), 6 deletions(-)
drivers/soc/mediatek/mtk-mutex.c +100 -6
@@ -7,9 +7,11 @@#include <linux/iopoll.h> #include <linux/module.h> #include <linux/of_device.h> +#include <linux/of_address.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/soc/mediatek/mtk-mmsys.h> +#include <linux/soc/mediatek/mtk-cmdq.h> #include <linux/soc/mediatek/mtk-mutex.h> #define MT2701_MUTEX0_MOD0 0x2c
@@ -107,6 +109,10 @@#define MT8183_MUTEX_EOF_DSI0 (MT8183_MUTEX_SOF_DSI0 << 6)#define MT8183_MUTEX_EOF_DPI0 (MT8183_MUTEX_SOF_DPI0 << 6) +#define MT8183_MUTEX_MDP_START 5 +#define MT8183_MUTEX_MDP_MOD_MASK 0x07FFFFFF +#define MT8183_MUTEX_MDP_SOF_MASK 0x00000007 +struct mtk_mutex {int id;bool claimed;
@@ -123,11 +129,14 @@ enum mtk_mutex_sof_id { };struct mtk_mutex_data { -const unsigned int *mutex_mod; -const unsigned int *mutex_sof; -const unsigned int mutex_mod_reg; -const unsigned int mutex_sof_reg; -const bool no_clk; +const unsigned int *mutex_mod; +const unsigned int *mutex_sof; +const unsigned int mutex_mod_reg; +const unsigned int mutex_sof_reg; +const unsigned int *mutex_mdp_offset; +const unsigned int mutex_mdp_mod_mask; +const unsigned int mutex_mdp_sof_mask; +const bool no_clk; };struct mtk_mutex_ctx {
@@ -136,6 +145,8 @@ struct mtk_mutex_ctx {void __iomem *regs;struct mtk_mutex mutex[10 ];const struct mtk_mutex_data *data; +phys_addr_t addr; +u8 subsys_id; };static const unsigned int mt2701_mutex_mod[DDP_COMPONENT_ID_MAX ] = {
@@ -238,6 +249,14 @@ static const unsigned int mt8183_mutex_sof[MUTEX_SOF_DSI3 + 1] = { [MUTEX_SOF_DPI0] = MT8183_MUTEX_SOF_DPI0 | MT8183_MUTEX_EOF_DPI0, }; +/* indicate which mutex is used by each pipepline */ +static const unsigned int mt8183_mutex_mdp_offset[MDP_PIPE_MAX ] = { + [MDP_PIPE_IMGI ] =MT8183_MUTEX_MDP_START , + [MDP_PIPE_RDMA0 ] =MT8183_MUTEX_MDP_START +1 , + [MDP_PIPE_WPEI ] =MT8183_MUTEX_MDP_START +2 , + [MDP_PIPE_WPEI2 ] =MT8183_MUTEX_MDP_START +3 +}; +static const struct mtk_mutex_data mt2701_mutex_driver_data = { .mutex_mod = mt2701_mutex_mod, .mutex_sof = mt2712_mutex_sof,
@@ -272,6 +291,9 @@ static const struct mtk_mutex_data mt8183_mutex_driver_data = { .mutex_sof = mt8183_mutex_sof, .mutex_mod_reg = MT8183_MUTEX0_MOD0, .mutex_sof_reg = MT8183_MUTEX0_SOF0, + .mutex_mdp_offset = mt8183_mutex_mdp_offset, + .mutex_mdp_mod_mask = MT8183_MUTEX_MDP_MOD_MASK, + .mutex_mdp_sof_mask = MT8183_MUTEX_MDP_SOF_MASK, .no_clk = true, };
@@ -290,6 +312,21 @@ struct mtk_mutex *mtk_mutex_get(struct device *dev) }EXPORT_SYMBOL_GPL (mtk_mutex_get); +struct mtk_mutex *mtk_mutex_mdp_get (struct device *dev, +enum mtk_mdp_pipe_id id) +{ +struct mtk_mutex_ctx *mtx =dev_get_drvdata (dev); +int i = mtx->data->mutex_mdp_offset[id]; + +if (!mtx->mutex[i].claimed) { + mtx->mutex[i].claimed = true; +return &mtx->mutex[i]; + } + +return ERR_PTR (-EBUSY ); +} +EXPORT_SYMBOL_GPL (mtk_mutex_mdp_get); +void mtk_mutex_put (struct mtk_mutex *mutex) { struct mtk_mutex_ctx *mtx = container_of(mutex, struct mtk_mutex_ctx,
@@ -369,6 +406,25 @@ void mtk_mutex_add_comp(struct mtk_mutex *mutex, }EXPORT_SYMBOL_GPL (mtk_mutex_add_comp); +void mtk_mutex_add_mdp_mod (struct mtk_mutex *mutex,u32 mod, +struct mmsys_cmdq_cmd *cmd) +{ + struct mtk_mutex_ctx *mtx = container_of(mutex, struct mtk_mutex_ctx, + mutex[mutex->id]); +unsigned int offset; + +WARN_ON (&mtx->mutex[mutex->id] != mutex); + + offset =DISP_REG_MUTEX_MOD (mtx->data->mutex_mod_reg, mutex->id); +cmdq_pkt_write_mask (cmd->pkt, mtx->subsys_id, mtx->addr + offset, + mod, mtx->data->mutex_mdp_mod_mask); + + offset =DISP_REG_MUTEX_SOF (mtx->data->mutex_sof_reg, mutex->id); +cmdq_pkt_write_mask (cmd->pkt, mtx->subsys_id, mtx->addr + offset, +0 , mtx->data->mutex_mdp_sof_mask); +} +EXPORT_SYMBOL_GPL (mtk_mutex_add_mdp_mod); +void mtk_mutex_remove_comp (struct mtk_mutex *mutex,enum mtk_ddp_comp_id id) {
@@ -420,6 +476,20 @@ void mtk_mutex_enable(struct mtk_mutex *mutex) }EXPORT_SYMBOL_GPL (mtk_mutex_enable); +void mtk_mutex_enable_by_cmdq (struct mtk_mutex *mutex, +struct mmsys_cmdq_cmd *cmd) +{ + struct mtk_mutex_ctx *mtx = container_of(mutex, struct mtk_mutex_ctx, + mutex[mutex->id]); + +WARN_ON (&mtx->mutex[mutex->id] != mutex); + +cmdq_pkt_write_mask (cmd->pkt, mtx->subsys_id, + mtx->addr +DISP_REG_MUTEX_EN (mutex->id), +0x1 ,0x00000001 ); +} +EXPORT_SYMBOL_GPL (mtk_mutex_enable_by_cmdq); +void mtk_mutex_disable (struct mtk_mutex *mutex) { struct mtk_mutex_ctx *mtx = container_of(mutex, struct mtk_mutex_ctx,
@@ -431,6 +501,20 @@ void mtk_mutex_disable(struct mtk_mutex *mutex) }EXPORT_SYMBOL_GPL (mtk_mutex_disable); +void mtk_mutex_disable_by_cmdq (struct mtk_mutex *mutex, +struct mmsys_cmdq_cmd *cmd) +{ + struct mtk_mutex_ctx *mtx = container_of(mutex, struct mtk_mutex_ctx, + mutex[mutex->id]); + +WARN_ON (&mtx->mutex[mutex->id] != mutex); + +cmdq_pkt_write_mask (cmd->pkt, mtx->subsys_id, + mtx->addr +DISP_REG_MUTEX_EN (mutex->id), +0x0 ,0x00000001 ); +} +EXPORT_SYMBOL_GPL (mtk_mutex_disable_by_cmdq); +void mtk_mutex_acquire (struct mtk_mutex *mutex) { struct mtk_mutex_ctx *mtx = container_of(mutex, struct mtk_mutex_ctx,
@@ -458,7 +542,8 @@ static int mtk_mutex_probe(struct platform_device *pdev) {struct device *dev = &pdev->dev;struct mtk_mutex_ctx *mtx; -struct resource *regs; +struct cmdq_client_reg cmdq_reg; +struct resource *regs, addr;int i; mtx =devm_kzalloc (dev,sizeof (*mtx),GFP_KERNEL );
@@ -479,6 +564,15 @@ static int mtk_mutex_probe(struct platform_device *pdev) } } +if (of_address_to_resource (dev->of_node,0 , &addr) <0 ) + mtx->addr =0L ; +else + mtx->addr = addr.start; + +if (cmdq_dev_get_client_reg (dev, &cmdq_reg,0 ) !=0 ) +dev_info (dev,"cmdq subsys id has not been set\n" ); + mtx->subsys_id = cmdq_reg.subsys; + regs =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); mtx->regs =devm_ioremap_resource (dev, regs);if (IS_ERR (mtx->regs)) {
include/linux/soc/mediatek/mtk-mutex.h +8 -0
@@ -11,11 +11,19 @@ struct device;struct mtk_mutex ;struct mtk_mutex *mtk_mutex_get (struct device *dev); +struct mtk_mutex *mtk_mutex_mdp_get (struct device *dev, +enum mtk_mdp_pipe_id id);int mtk_mutex_prepare (struct mtk_mutex *mutex);void mtk_mutex_add_comp (struct mtk_mutex *mutex,enum mtk_ddp_comp_id id); +void mtk_mutex_add_mdp_mod (struct mtk_mutex *mutex,u32 mod, +struct mmsys_cmdq_cmd *cmd);void mtk_mutex_enable (struct mtk_mutex *mutex); +void mtk_mutex_enable_by_cmdq (struct mtk_mutex *mutex, +struct mmsys_cmdq_cmd *cmd);void mtk_mutex_disable (struct mtk_mutex *mutex); +void mtk_mutex_disable_by_cmdq (struct mtk_mutex *mutex, +struct mmsys_cmdq_cmd *cmd);void mtk_mutex_remove_comp (struct mtk_mutex *mutex,enum mtk_ddp_comp_id id);void mtk_mutex_unprepare (struct mtk_mutex *mutex);
Signature · 1 line
2.18.0
PATCH v6 3/5 dt-binding: mt8183: Add Mediatek MDP3 dt-bindings
In reply to Moudy HoThis patch adds DT binding document for Media Data Path 3 (MDP3) a unit in multimedia system used for scaling and color format convert.
--- .../bindings/media/mediatek,mdp3-ccorr.yaml | 58 +++++ .../bindings/media/mediatek,mdp3-rdma.yaml | 241 ++++++++++++++++++ .../bindings/media/mediatek,mdp3-rsz.yaml | 66 +++++ .../bindings/media/mediatek,mdp3-wdma.yaml | 71 ++++++ .../bindings/media/mediatek,mdp3-wrot.yaml | 71 ++++++ 5 files changed, 507 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-ccorr.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-rsz.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-wdma.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-wrot.yaml
Documentation/devicetree/bindings/media/mediatek,mdp3-ccorr.yaml new file +58 -0
@@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/mediatek,mdp3-ccorr.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek Media Data Path 3 CCORR Device Tree Bindings + +maintainers: + - Daoyuan Huang <[email protected]> + - Moudy Ho <[email protected]> + +description: | + One of Media Data Path 3 (MDP3) components used to do color correction with 3X3 matrix. + +properties: + compatible: + items: + - enum: + - mediatek,mt8183-mdp3-ccorr + + mediatek,mdp3-id: + $ref: /schemas/types.yaml#/definitions/uint32 + maxItems: 1 + description: | + HW index to distinguish same functionality modules. + + reg: + description: | + Physical base address and length of the function block + register space, the number aligns with the component + and its own subcomponent. + + mediatek,gce-client-reg: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: | + sub-system id corresponding to the global command engine (GCE) + register address. + $ref: /schemas/mailbox/mtk-gce.txt + + clocks: + minItems: 1 + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/mt8183-clk.h> + #include <dt-bindings/gce/mt8183-gce.h> + + mdp3_ccorr: mdp3_ccorr@1401c000 { + compatible = "mediatek,mt8183-mdp3-ccorr"; + mediatek,mdp3-id = <0>; + reg = <0x1401c000 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0xc000 0x1000>; + clocks = <&mmsys CLK_MM_MDP_CCORR>; + }; +
Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml new file +241 -0
241 lines not on this page · raw message
Documentation/devicetree/bindings/media/mediatek,mdp3-rsz.yaml new file +66 -0
66 lines not on this page · raw message
Documentation/devicetree/bindings/media/mediatek,mdp3-wdma.yaml new file +71 -0
71 lines not on this page · raw message
Documentation/devicetree/bindings/media/mediatek,mdp3-wrot.yaml new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
2.18.0
Rob Herring
maintainerRe: [PATCH v6 3/5] dt-binding: mt8183: Add Mediatek MDP3 dt-bindings
Quoted 4 lines · Moudy Ho
This patch adds DT binding document for Media Data Path 3 (MDP3) a unit in multimedia system used for scaling and color format convert.
Signed-off-by Moudy Ho <[email protected]>
Quoted 13 lines
--- .../bindings/media/mediatek,mdp3-ccorr.yaml | 58 +++++ .../bindings/media/mediatek,mdp3-rdma.yaml | 241 ++++++++++++++++++ .../bindings/media/mediatek,mdp3-rsz.yaml | 66 +++++ .../bindings/media/mediatek,mdp3-wdma.yaml | 71 ++++++ .../bindings/media/mediatek,mdp3-wrot.yaml | 71 ++++++ 5 files changed, 507 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-ccorr.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-rsz.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-wdma.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-wrot.yaml
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
make[1]: *** Deleting file 'Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.example.dts'
Traceback (most recent call last):
File "/usr/local/bin/dt-extract-example", line 45, in <module>
binding = yaml.load(open(args.yamlfile, encoding='utf-8').read())
File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/main.py", line 434, in load
return constructor.get_single_data()
File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 120, in get_single_data
node = self.composer.get_single_node()
File "_ruamel_yaml.pyx", line 706, in _ruamel_yaml.CParser.get_single_node
File "_ruamel_yaml.pyx", line 724, in _ruamel_yaml.CParser._compose_document
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
File "_ruamel_yaml.pyx", line 773, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 848, in _ruamel_yaml.CParser._compose_sequence_node
File "_ruamel_yaml.pyx", line 904, in _ruamel_yaml.CParser._parse_next_event
ruamel.yaml.scanner.ScannerError: while scanning a block scalar
in "<unicode string>", line 171, column 5
found a tab character where an indentation space is expected
in "<unicode string>", line 183, column 1
make[1]: *** [Documentation/devicetree/bindings/Makefile:20: Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.example.dts] Error 1 make[1]: *** Waiting for unfinished jobs...../Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml: while scanning a block scalar
in "<unicode string>", line 171, column 5
found a tab character where an indentation space is expected
in "<unicode string>", line 183, column 1
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml: ignoring, error parsing file
warning: no schema found in file: ./Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml
make: *** [Makefile:1419: dt_binding_check] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/1518477
This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit.
Re: [PATCH v6 3/5] dt-binding: mt8183: Add Mediatek MDP3 dt-bindings
Quoted 17 lines · Rob Herring
Quoted 16 lines · Moudy Ho
This patch adds DT binding document for Media Data Path 3 (MDP3) a unit in multimedia system used for scaling and color format convert.
Signed-off-by Moudy Ho <[email protected]>--- .../bindings/media/mediatek,mdp3-ccorr.yaml | 58 +++++ .../bindings/media/mediatek,mdp3-rdma.yaml | 241 ++++++++++++++++++ .../bindings/media/mediatek,mdp3-rsz.yaml | 66 +++++ .../bindings/media/mediatek,mdp3-wdma.yaml | 71 ++++++ .../bindings/media/mediatek,mdp3-wrot.yaml | 71 ++++++ 5 files changed, 507 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-ccorr.yaml create mode 100644
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yamlcreate mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-rsz.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-wdma.yaml create mode 100644
Documentation/devicetree/bindings/media/mediatek,mdp3-wrot.yaml
Sorry for missing a space on line:183 of the file "mediatek,mdp3- rdma.yaml " caused an alignment error that make "dt_binding_check" fail.
It will be fixed in the further.
Quoted 64 lines
My bot found errors running 'make DT_CHECKER_FLAGS=-m
dt_binding_check'
on your patch (DT_CHECKER_FLAGSis new in v5.13):yamllint warnings/errors:
dtschema/dtc warnings/errors:
make[1]: *** Deleting file 'Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.example.dts'
Traceback (most recent call last):
File "/usr/local/bin/dt-extract-example", line 45, in <module>
binding =yaml.load(open(args.yamlfile, encoding='utf-8').read())
File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/main.py",
line 434, in load
returnconstructor.get_single_data()
File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 120, inget_single_data
node =self.composer.get_single_node()
File "_ruamel_yaml.pyx", line 706, in
_ruamel_yaml.CParser.get_single_node
File "_ruamel_yaml.pyx", line 724, in
_ruamel_yaml.CParser._compose_document
File "_ruamel_yaml.pyx", line 775, in
_ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 889, in
_ruamel_yaml.CParser._compose_mapping_node
File "_ruamel_yaml.pyx", line 773, in
_ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 848, in
_ruamel_yaml.CParser._compose_sequence_node
File "_ruamel_yaml.pyx", line 904, in
_ruamel_yaml.CParser._parse_next_event ruamel.yaml.scanner.ScannerError: while scanning a block scalar
in "<unicode string>", line 171, column 5
found a tab character where an indentation space is expected
in "<unicode string>", line 183, column 1
make[1]: *** [Documentation/devicetree/bindings/Makefile:20:Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.example.dts] Error 1
make[1]: *** Waiting for unfinished jobs...../Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml: while scanning a block scalar
in "<unicode string>", line 171, column 5
found a tab character where an indentation space is expected
in "<unicode string>", line 183, column 1
/builds/robherring/linux-dt- review/Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml: ignoring, error parsing file
warning: no schema found in file:./Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml
make: *** [Makefile:1419:dt_binding_check] Error 2doc reference errors (make refcheckdocs):
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
Quoted 9 lines
If you already ran 'make
dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:pip3 install dtschema --upgrade
Please check and re-submit.
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
PATCH v6 4/5 dts: arm64: mt8183: Add Mediatek MDP3 nodes
In reply to Moudy HoAdd device nodes for Media Data Path 3 (MDP3) modules.
--- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 110 +++++++++++++++++++++++ 1 file changed, 110 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183.dtsi +110 -0
@@ -1232,6 +1232,108 @@ mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0 0x1000>; }; + mdp3_rdma0: mdp3_rdma0@14001000 { + compatible = "mediatek,mt8183-mdp3", + "mediatek,mt8183-mdp3-rdma"; + mediatek,scp = <&scp>; + mediatek,mdp3-id = <0>; + mdp3-comps = "mediatek,mt8183-mdp3-dl1", "mediatek,mt8183-mdp3-dl2", + "mediatek,mt8183-mdp3-path1", "mediatek,mt8183-mdp3-path2", + "mediatek,mt8183-mdp3-imgi", "mediatek,mt8183-mdp3-exto"; + mdp3-comp-ids = <0 1 0 1 0 1>; + reg = <0 0x14001000 0 0x1000>, + <0 0x14000000 0 0x1000>, + <0 0x14005000 0 0x1000>, + <0 0x14006000 0 0x1000>, + <0 0x15020000 0 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x1000 0x1000>, + <&gce SUBSYS_1400XXXX 0 0x1000>, + <&gce SUBSYS_1400XXXX 0x5000 0x1000>, + <&gce SUBSYS_1400XXXX 0x6000 0x1000>, + <&gce SUBSYS_1502XXXX 0 0x1000>; + power-domains = <&spm MT8183_POWER_DOMAIN_DISP>; + clocks = <&mmsys CLK_MM_MDP_RDMA0>, + <&mmsys CLK_MM_MDP_RSZ1>, + <&mmsys CLK_MM_MDP_DL_TXCK>, + <&mmsys CLK_MM_MDP_DL_RX>, + <&mmsys CLK_MM_IPU_DL_TXCK>, + <&mmsys CLK_MM_IPU_DL_RX>; + iommus = <&iommu M4U_PORT_MDP_RDMA0>; + mediatek,mmsys = <&mmsys>; + mediatek,mm-mutex = <&mutex>; + mediatek,mailbox-gce = <&gce>; + mboxes = <&gce 20 CMDQ_THR_PRIO_LOWEST 0>, + <&gce 21 CMDQ_THR_PRIO_LOWEST 0>, + <&gce 22 CMDQ_THR_PRIO_LOWEST 0>, + <&gce 23 CMDQ_THR_PRIO_LOWEST 0>; + gce-subsys = <&gce 0x14000000 SUBSYS_1400XXXX>, + <&gce 0x14010000 SUBSYS_1401XXXX>, + <&gce 0x14020000 SUBSYS_1402XXXX>, + <&gce 0x15020000 SUBSYS_1502XXXX>; + mediatek,gce-events = <CMDQ_EVENT_MDP_RDMA0_SOF>, + <CMDQ_EVENT_MDP_RDMA0_EOF>, + <CMDQ_EVENT_MDP_RSZ0_SOF>, + <CMDQ_EVENT_MDP_RSZ1_SOF>, + <CMDQ_EVENT_MDP_TDSHP_SOF>, + <CMDQ_EVENT_MDP_WROT0_SOF>, + <CMDQ_EVENT_MDP_WROT0_EOF>, + <CMDQ_EVENT_MDP_WDMA0_SOF>, + <CMDQ_EVENT_MDP_WDMA0_EOF>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_0>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_1>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_2>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_3>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_4>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_5>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_6>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_7>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_8>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_9>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_10>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_11>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_12>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_13>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_14>, + <CMDQ_EVENT_WPE_A_DONE>, + <CMDQ_EVENT_SPE_B_DONE>; + }; + + mdp3_rsz0: mdp3_rsz0@14003000 { + compatible = "mediatek,mt8183-mdp3-rsz"; + mediatek,mdp3-id = <0>; + reg = <0 0x14003000 0 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x3000 0x1000>; + clocks = <&mmsys CLK_MM_MDP_RSZ0>; + }; + + mdp3_rsz1: mdp3_rsz1@14004000 { + compatible = "mediatek,mt8183-mdp3-rsz"; + mediatek,mdp3-id = <1>; + reg = <0 0x14004000 0 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x4000 0x1000>; + clocks = <&mmsys CLK_MM_MDP_RSZ1>; + }; + + mdp3_wrot0: mdp3_wrot0@14005000 { + compatible = "mediatek,mt8183-mdp3-wrot"; + mediatek,mdp3-id = <0>; + reg = <0 0x14005000 0 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x5000 0x1000>; + power-domains = <&spm MT8183_POWER_DOMAIN_DISP>; + clocks = <&mmsys CLK_MM_MDP_WROT0>; + iommus = <&iommu M4U_PORT_MDP_WROT0>; + }; + + mdp3_wdma: mdp3_wdma@14006000 { + compatible = "mediatek,mt8183-mdp3-wdma"; + mediatek,mdp3-id = <0>; + reg = <0 0x14006000 0 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x6000 0x1000>; + power-domains = <&spm MT8183_POWER_DOMAIN_DISP>; + clocks = <&mmsys CLK_MM_MDP_WDMA0>; + iommus = <&iommu M4U_PORT_MDP_WDMA0>; + }; + ovl0: ovl@14008000 { compatible = "mediatek,mt8183-disp-ovl"; reg = <0 0x14008000 0 0x1000>;
@@ -1378,6 +1480,14 @@ power-domains = <&spm MT8183_POWER_DOMAIN_DISP>; }; + mdp3_ccorr: mdp3_ccorr@1401c000 { + compatible = "mediatek,mt8183-mdp3-ccorr"; + mediatek,mdp3-id = <0>; + reg = <0 0x1401c000 0 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0xc000 0x1000>; + clocks = <&mmsys CLK_MM_MDP_CCORR>; + }; + imgsys: syscon@15020000 { compatible = "mediatek,mt8183-imgsys", "syscon"; reg = <0 0x15020000 0 0x1000>;
Signature · 1 line
2.18.0
Re: [PATCH v6 4/5] dts: arm64: mt8183: Add Mediatek MDP3 nodes
Hi, Moudy:
Quoted 48 lines · Moudy Ho
Add device nodes for Media Data Path 3 (MDP3) modules.
Signed-off-by Ping-Hsun Wu <[email protected]>Signed-off-by daoyuan huang <[email protected]>Signed-off-by Moudy Ho <[email protected]>--- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 110 +++++++++++++++++++++++ 1 file changed, 110 insertions(+)arch/arm64/boot/dts/mediatek/mt8183.dtsi +31
-0@@ -1232,6 +1232,108 @@ mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0 0x1000>; }; + mdp3_rdma0: mdp3_rdma0@14001000 { + compatible = "mediatek,mt8183-mdp3", + "mediatek,mt8183-mdp3-rdma"; + mediatek,scp = <&scp>; + mediatek,mdp3-id = <0>; + mdp3-comps = "mediatek,mt8183-mdp3-dl1", "mediatek,mt8183-mdp3-dl2", + "mediatek,mt8183-mdp3-path1", "mediatek,mt8183-mdp3-path2", + "mediatek,mt8183-mdp3-imgi", "mediatek,mt8183-mdp3-exto"; + mdp3-comp-ids = <0 1 0 1 0 1>; + reg = <0 0x14001000 0 0x1000>, + <0 0x14000000 0 0x1000>, + <0 0x14005000 0 0x1000>, + <0 0x14006000 0 0x1000>, + <0 0x15020000 0 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x1000 0x1000>, + <&gce SUBSYS_1400XXXX 0 0x1000>, + <&gce SUBSYS_1400XXXX 0x5000 0x1000>, + <&gce SUBSYS_1400XXXX 0x6000 0x1000>, + <&gce SUBSYS_1502XXXX 0 0x1000>; + power-domains = <&spm MT8183_POWER_DOMAIN_DISP>; + clocks = <&mmsys CLK_MM_MDP_RDMA0>, + <&mmsys CLK_MM_MDP_RSZ1>, + <&mmsys CLK_MM_MDP_DL_TXCK>, + <&mmsys CLK_MM_MDP_DL_RX>, + <&mmsys CLK_MM_IPU_DL_TXCK>, + <&mmsys CLK_MM_IPU_DL_RX>; + iommus = <&iommu M4U_PORT_MDP_RDMA0>; + mediatek,mmsys = <&mmsys>; + mediatek,mm-mutex = <&mutex>; + mediatek,mailbox-gce = <&gce>; + mboxes = <&gce 20 CMDQ_THR_PRIO_LOWEST 0>,
arch/arm64/boot/dts/mediatek/mt8183.dtsi line 1275
Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8183.dtsi +10
-0+ <&gce 21 CMDQ_THR_PRIO_LOWEST 0>, + <&gce 22 CMDQ_THR_PRIO_LOWEST 0>, + <&gce 23 CMDQ_THR_PRIO_LOWEST 0>; + gce-subsys = <&gce 0x14000000 SUBSYS_1400XXXX>, + <&gce 0x14010000 SUBSYS_1401XXXX>, + <&gce 0x14020000 SUBSYS_1402XXXX>, + <&gce 0x15020000 SUBSYS_1502XXXX>; + mediatek,gce-events = <CMDQ_EVENT_MDP_RDMA0_SOF>, + <CMDQ_EVENT_MDP_RDMA0_EOF>, + <CMDQ_EVENT_MDP_RSZ0_SOF>,
CMDQ_EVENT_MDP_RSZ0_SOF is sent from rsz0 to gce, so move this event to rsz0.
Regards,
CK
Quoted 79 lines
arch/arm64/boot/dts/mediatek/mt8183.dtsi +69
-0+ <CMDQ_EVENT_MDP_RSZ1_SOF>, + <CMDQ_EVENT_MDP_TDSHP_SOF>, + <CMDQ_EVENT_MDP_WROT0_SOF>, + <CMDQ_EVENT_MDP_WROT0_EOF>, + <CMDQ_EVENT_MDP_WDMA0_SOF>, + <CMDQ_EVENT_MDP_WDMA0_EOF>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_0>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_1>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_2>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_3>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_4>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_5>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_6>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_7>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_8>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_9>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_10>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_11>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_12>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_13>, + <CMDQ_EVENT_ISP_FRAME_DONE_P2_14>, + <CMDQ_EVENT_WPE_A_DONE>, + <CMDQ_EVENT_SPE_B_DONE>; + }; + + mdp3_rsz0: mdp3_rsz0@14003000 { + compatible = "mediatek,mt8183-mdp3-rsz"; + mediatek,mdp3-id = <0>; + reg = <0 0x14003000 0 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x3000 0x1000>; + clocks = <&mmsys CLK_MM_MDP_RSZ0>; + }; + + mdp3_rsz1: mdp3_rsz1@14004000 { + compatible = "mediatek,mt8183-mdp3-rsz"; + mediatek,mdp3-id = <1>; + reg = <0 0x14004000 0 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x4000 0x1000>; + clocks = <&mmsys CLK_MM_MDP_RSZ1>; + }; + + mdp3_wrot0: mdp3_wrot0@14005000 { + compatible = "mediatek,mt8183-mdp3-wrot"; + mediatek,mdp3-id = <0>; + reg = <0 0x14005000 0 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x5000 0x1000>; + power-domains = <&spm MT8183_POWER_DOMAIN_DISP>; + clocks = <&mmsys CLK_MM_MDP_WROT0>; + iommus = <&iommu M4U_PORT_MDP_WROT0>; + }; + + mdp3_wdma: mdp3_wdma@14006000 { + compatible = "mediatek,mt8183-mdp3-wdma"; + mediatek,mdp3-id = <0>; + reg = <0 0x14006000 0 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x6000 0x1000>; + power-domains = <&spm MT8183_POWER_DOMAIN_DISP>; + clocks = <&mmsys CLK_MM_MDP_WDMA0>; + iommus = <&iommu M4U_PORT_MDP_WDMA0>; + }; + ovl0: ovl@14008000 { compatible = "mediatek,mt8183-disp-ovl"; reg = <0 0x14008000 0 0x1000>;@@ -1378,6 +1480,14 @@ power-domains = <&spm MT8183_POWER_DOMAIN_DISP>; }; + mdp3_ccorr: mdp3_ccorr@1401c000 { + compatible = "mediatek,mt8183-mdp3-ccorr"; + mediatek,mdp3-id = <0>; + reg = <0 0x1401c000 0 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0xc000 0x1000>; + clocks = <&mmsys CLK_MM_MDP_CCORR>; + }; + imgsys: syscon@15020000 { compatible = "mediatek,mt8183-imgsys", "syscon"; reg = <0 0x15020000 0 0x1000>;
PATCH v6 5/5 media: platform: mtk-mdp3: Add Mediatek MDP3 driver
In reply to Moudy HoThis patch adds driver for Mediatek's Media Data Path ver.3 (MDP3). It provides the following functions:
color transform, format conversion, resize, crop, rotate, flip and additional image quality enhancement.
The MDP3 driver is mainly used for Google Chromebook products to import the new architecture to set the HW settings as shown below:
User -> V4L2 framework
-> MDP3 driver -> SCP (setting calculations)
-> MDP3 driver -> CMDQ (GCE driver) -> HWEach modules' related operation control is sited in mtk-mdp3-comp.c Each modules' register table is defined in file with "mdp_reg_" prefix GCE related API, operation control sited in mtk-mdp3-cmdq.c V4L2 m2m device functions are implemented in mtk-mdp3-m2m.c Probe, power, suspend/resume, system level functions are defined in mtk-mdp3-core.c
---
Depend on:
[1] https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/
[2] https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/
--- drivers/media/platform/Kconfig | 19 + drivers/media/platform/Makefile | 2 + drivers/media/platform/mtk-mdp3/Makefile | 7 + drivers/media/platform/mtk-mdp3/isp_reg.h | 27 + .../media/platform/mtk-mdp3/mdp_reg_ccorr.h | 19 + .../media/platform/mtk-mdp3/mdp_reg_rdma.h | 65 + drivers/media/platform/mtk-mdp3/mdp_reg_rsz.h | 39 + .../media/platform/mtk-mdp3/mdp_reg_wdma.h | 47 + .../media/platform/mtk-mdp3/mdp_reg_wrot.h | 55 + drivers/media/platform/mtk-mdp3/mtk-img-ipi.h | 281 ++++ .../media/platform/mtk-mdp3/mtk-mdp3-cmdq.c | 508 ++++++ .../media/platform/mtk-mdp3/mtk-mdp3-cmdq.h | 47 + .../media/platform/mtk-mdp3/mtk-mdp3-comp.c | 1357 +++++++++++++++++ .../media/platform/mtk-mdp3/mtk-mdp3-comp.h | 148 ++ .../media/platform/mtk-mdp3/mtk-mdp3-core.c | 300 ++++ .../media/platform/mtk-mdp3/mtk-mdp3-core.h | 75 + .../media/platform/mtk-mdp3/mtk-mdp3-m2m.c | 802 ++++++++++ .../media/platform/mtk-mdp3/mtk-mdp3-m2m.h | 42 + .../media/platform/mtk-mdp3/mtk-mdp3-regs.c | 747 +++++++++ .../media/platform/mtk-mdp3/mtk-mdp3-regs.h | 373 +++++ .../media/platform/mtk-mdp3/mtk-mdp3-vpu.c | 314 ++++ .../media/platform/mtk-mdp3/mtk-mdp3-vpu.h | 79 + 22 files changed, 5353 insertions(+) create mode 100644 drivers/media/platform/mtk-mdp3/Makefile create mode 100644 drivers/media/platform/mtk-mdp3/isp_reg.h create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_ccorr.h create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_rdma.h create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_rsz.h create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_wdma.h create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_wrot.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-img-ipi.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-core.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-m2m.c create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-m2m.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.c create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.h create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.h
drivers/media/platform/Kconfig +19 -0
@@ -299,6 +299,25 @@ config VIDEO_MEDIATEK_MDP To compile this driver as a module, choose M here: the module will be called mtk-mdp. +config VIDEO_MEDIATEK_MDP3 + tristate "Mediatek MDP v3 driver" + depends on MTK_IOMMU + depends on VIDEO_DEV && VIDEO_V4L2 + depends on ARCH_MEDIATEK || COMPILE_TEST + depends on HAS_DMA + select VIDEOBUF2_DMA_CONTIG + select V4L2_MEM2MEM_DEV + select VIDEO_MEDIATEK_VPU + select MTK_CMDQ + select MTK_SCP + default n + help + It is a v4l2 driver and present in Mediatek MT8183 SoC. + The driver supports for scaling and color space conversion. + + To compile this driver as a module, choose M here: the + module will be called mtk-mdp3. + config VIDEO_MEDIATEK_VCODEC tristate "Mediatek Video Codec driver" depends on MTK_IOMMU || COMPILE_TEST
drivers/media/platform/Makefile +2 -0
@@ -77,6 +77,8 @@ obj-$(CONFIG_VIDEO_MEDIATEK_VCODEC) += mtk-vcodec/ obj-$(CONFIG_VIDEO_MEDIATEK_MDP) += mtk-mdp/ +obj-$(CONFIG_VIDEO_MEDIATEK_MDP3) += mtk-mdp3/ + obj-$(CONFIG_VIDEO_MEDIATEK_JPEG) += mtk-jpeg/ obj-$(CONFIG_VIDEO_QCOM_CAMSS) += qcom/camss/
drivers/media/platform/mtk-mdp3/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only +mtk-mdp3-y += mtk-mdp3-core.o mtk-mdp3-vpu.o mtk-mdp3-regs.o +mtk-mdp3-y += mtk-mdp3-m2m.o +mtk-mdp3-y += mtk-mdp3-comp.o mtk-mdp3-cmdq.o + +obj-$(CONFIG_VIDEO_MEDIATEK_MDP3) += mtk-mdp3.o +
drivers/media/platform/mtk-mdp3/isp_reg.h new file +27 -0
@@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) 2021 MediaTek Inc. +* Author: Ping-Hsun Wu <[email protected]> +*/ + +#ifndef __ISP_REG_H__ +#define __ISP_REG_H__ + +enum isp_dip_cq { +ISP_DRV_DIP_CQ_THRE0 =0 , +ISP_DRV_DIP_CQ_THRE1 , +ISP_DRV_DIP_CQ_THRE2 , +ISP_DRV_DIP_CQ_THRE3 , +ISP_DRV_DIP_CQ_THRE4 , +ISP_DRV_DIP_CQ_THRE5 , +ISP_DRV_DIP_CQ_THRE6 , +ISP_DRV_DIP_CQ_THRE7 , +ISP_DRV_DIP_CQ_THRE8 , +ISP_DRV_DIP_CQ_THRE9 , +ISP_DRV_DIP_CQ_THRE10 , +ISP_DRV_DIP_CQ_THRE11 , +ISP_DRV_DIP_CQ_NUM , +ISP_DRV_DIP_CQ_NONE , +}; + +#endif // __ISP_REG_H__
drivers/media/platform/mtk-mdp3/mdp_reg_ccorr.h new file +19 -0
@@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) 2021 MediaTek Inc. +* Author: Ping-Hsun Wu <[email protected]> +*/ + +#ifndef __MDP_REG_CCORR_H__ +#define __MDP_REG_CCORR_H__ + +#define MDP_CCORR_EN 0x000 +#define MDP_CCORR_CFG 0x020 +#define MDP_CCORR_SIZE 0x030 + +/* MASK */ +#define MDP_CCORR_EN_MASK 0x00000001 +#define MDP_CCORR_CFG_MASK 0x70001317 +#define MDP_CCORR_SIZE_MASK 0x1fff1fff + +#endif // __MDP_REG_CCORR_H__
drivers/media/platform/mtk-mdp3/mdp_reg_rdma.h new file +65 -0
65 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mdp_reg_rsz.h new file +39 -0
@@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) 2021 MediaTek Inc. +* Author: Ping-Hsun Wu <[email protected]> +*/ + +#ifndef __MDP_REG_RSZ_H__ +#define __MDP_REG_RSZ_H__ + +#define PRZ_ENABLE 0x000 +#define PRZ_CONTROL_1 0x004 +#define PRZ_CONTROL_2 0x008 +#define PRZ_INPUT_IMAGE 0x010 +#define PRZ_OUTPUT_IMAGE 0x014 +#define PRZ_HORIZONTAL_COEFF_STEP 0x018 +#define PRZ_VERTICAL_COEFF_STEP 0x01c +#define PRZ_LUMA_HORIZONTAL_INTEGER_OFFSET 0x020 +#define PRZ_LUMA_HORIZONTAL_SUBPIXEL_OFFSET 0x024 +#define PRZ_LUMA_VERTICAL_INTEGER_OFFSET 0x028 +#define PRZ_LUMA_VERTICAL_SUBPIXEL_OFFSET 0x02c +#define PRZ_CHROMA_HORIZONTAL_INTEGER_OFFSET 0x030 +#define PRZ_CHROMA_HORIZONTAL_SUBPIXEL_OFFSET 0x034 + +/* MASK */ +#define PRZ_ENABLE_MASK 0x00010001 +#define PRZ_CONTROL_1_MASK 0xfffffff3 +#define PRZ_CONTROL_2_MASK 0x0ffffaff +#define PRZ_INPUT_IMAGE_MASK 0xffffffff +#define PRZ_OUTPUT_IMAGE_MASK 0xffffffff +#define PRZ_HORIZONTAL_COEFF_STEP_MASK 0x007fffff +#define PRZ_VERTICAL_COEFF_STEP_MASK 0x007fffff +#define PRZ_LUMA_HORIZONTAL_INTEGER_OFFSET_MASK 0x0000ffff +#define PRZ_LUMA_HORIZONTAL_SUBPIXEL_OFFSET_MASK 0x001fffff +#define PRZ_LUMA_VERTICAL_INTEGER_OFFSET_MASK 0x0000ffff +#define PRZ_LUMA_VERTICAL_SUBPIXEL_OFFSET_MASK 0x001fffff +#define PRZ_CHROMA_HORIZONTAL_INTEGER_OFFSET_MASK 0x0000ffff +#define PRZ_CHROMA_HORIZONTAL_SUBPIXEL_OFFSET_MASK 0x001fffff + +#endif // __MDP_REG_RSZ_H__
drivers/media/platform/mtk-mdp3/mdp_reg_wdma.h new file +47 -0
47 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mdp_reg_wrot.h new file +55 -0
55 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mtk-img-ipi.h new file +281 -0
281 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c new file +508 -0
508 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.h new file +47 -0
47 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c new file +1357 -0
1,357 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.h new file +148 -0
148 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c new file +300 -0
300 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mtk-mdp3-core.h new file +75 -0
67 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mtk-mdp3-m2m.c new file +802 -0
802 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mtk-mdp3-m2m.h new file +42 -0
42 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.c new file +747 -0
747 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.h new file +373 -0
373 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c new file +314 -0
314 lines not on this page · raw message
drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.h new file +79 -0
79 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.18.0
Part of the diff is not shown here. View the raw message.
kernel test robot
build botRe: [PATCH v6 5/5] media: platform: mtk-mdp3: Add Mediatek MDP3 driver
Thank you for the patch! Yet something to improve:
Hi Moudy,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on robh/for-next linus/master mediatek/for-next v5.14-rc6 next-20210819] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Moudy-Ho/media-mediatek-support-mdp3-on-mt8183-platform/20210819-151256 base: git://linuxtv.org/media_tree.git master config: arc-allyesconfig (attached as .config) compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/6e61c65aed8f518d32d648e1cbda294c13be2a20
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Moudy-Ho/media-mediatek-support-mdp3-on-mt8183-platform/20210819-151256 git checkout 6e61c65aed8f518d32d648e1cbda294c13be2a20
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
>> drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.c:171:35: error: 'V4L2_PIX_FMT_MM21' undeclared here (not in a function); did you mean 'V4L2_PIX_FMT_MT21C'?
171 | .pixelformat = V4L2_PIX_FMT_MM21,
| ^~~~~~~~~~~~~~~~~
| V4L2_PIX_FMT_MT21C
--
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c: In function 'mdp_path_config_subfrm':
>> drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:26:48: error: expected identifier before '(' token
26 | ((ctx)->comp->ops && (ctx)->comp->ops->(op))
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:28:10: note: in expansion of macro 'has_op'
28 | (has_op(ctx, op) ? (ctx)->comp->ops->(op)(ctx, ##__VA_ARGS__) : 0)
| ^~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:255:23: note: in expansion of macro 'call_op'
255 | ret = call_op(ctx, config_subfrm, cmd, count);
| ^~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:28:46: error: expected identifier before '(' token
28 | (has_op(ctx, op) ? (ctx)->comp->ops->(op)(ctx, ##__VA_ARGS__) : 0)
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:255:23: note: in expansion of macro 'call_op'
255 | ret = call_op(ctx, config_subfrm, cmd, count);
| ^~~~~~~
>> drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:26:48: error: expected identifier before '(' token
26 | ((ctx)->comp->ops && (ctx)->comp->ops->(op))
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:28:10: note: in expansion of macro 'has_op'
28 | (has_op(ctx, op) ? (ctx)->comp->ops->(op)(ctx, ##__VA_ARGS__) : 0)
| ^~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:268:23: note: in expansion of macro 'call_op'
268 | ret = call_op(ctx, wait_comp_event, cmd);
| ^~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:28:46: error: expected identifier before '(' token
28 | (has_op(ctx, op) ? (ctx)->comp->ops->(op)(ctx, ##__VA_ARGS__) : 0)
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:268:23: note: in expansion of macro 'call_op'
268 | ret = call_op(ctx, wait_comp_event, cmd);
| ^~~~~~~
>> drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:26:48: error: expected identifier before '(' token
26 | ((ctx)->comp->ops && (ctx)->comp->ops->(op))
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:28:10: note: in expansion of macro 'has_op'
28 | (has_op(ctx, op) ? (ctx)->comp->ops->(op)(ctx, ##__VA_ARGS__) : 0)
| ^~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:275:23: note: in expansion of macro 'call_op'
275 | ret = call_op(ctx, advance_subfrm, cmd, count);
| ^~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:28:46: error: expected identifier before '(' token
28 | (has_op(ctx, op) ? (ctx)->comp->ops->(op)(ctx, ##__VA_ARGS__) : 0)
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:275:23: note: in expansion of macro 'call_op'
275 | ret = call_op(ctx, advance_subfrm, cmd, count);
| ^~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c: In function 'mdp_path_config':
>> drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:26:48: error: expected identifier before '(' token
26 | ((ctx)->comp->ops && (ctx)->comp->ops->(op))
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:28:10: note: in expansion of macro 'has_op'
28 | (has_op(ctx, op) ? (ctx)->comp->ops->(op)(ctx, ##__VA_ARGS__) : 0)
| ^~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:298:23: note: in expansion of macro 'call_op'
298 | ret = call_op(ctx, init_comp, cmd);
| ^~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:28:46: error: expected identifier before '(' token
28 | (has_op(ctx, op) ? (ctx)->comp->ops->(op)(ctx, ##__VA_ARGS__) : 0)
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:298:23: note: in expansion of macro 'call_op'
298 | ret = call_op(ctx, init_comp, cmd);
| ^~~~~~~
>> drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:26:48: error: expected identifier before '(' token
26 | ((ctx)->comp->ops && (ctx)->comp->ops->(op))
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:28:10: note: in expansion of macro 'has_op'
28 | (has_op(ctx, op) ? (ctx)->comp->ops->(op)(ctx, ##__VA_ARGS__) : 0)
| ^~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:308:23: note: in expansion of macro 'call_op'
308 | ret = call_op(ctx, config_frame, cmd, compose);
| ^~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:28:46: error: expected identifier before '(' token
28 | (has_op(ctx, op) ? (ctx)->comp->ops->(op)(ctx, ##__VA_ARGS__) : 0)
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:308:23: note: in expansion of macro 'call_op'
308 | ret = call_op(ctx, config_frame, cmd, compose);
| ^~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:304:41: warning: unused variable 'compose' [-Wunused-variable]
304 | const struct v4l2_rect *compose =
| ^~~~~~~
>> drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:26:48: error: expected identifier before '(' token
26 | ((ctx)->comp->ops && (ctx)->comp->ops->(op))
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:28:10: note: in expansion of macro 'has_op'
28 | (has_op(ctx, op) ? (ctx)->comp->ops->(op)(ctx, ##__VA_ARGS__) : 0)
| ^~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:322:23: note: in expansion of macro 'call_op'
322 | ret = call_op(ctx, post_process, cmd);
| ^~~~~~~
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:28:46: error: expected identifier before '(' token
28 | (has_op(ctx, op) ? (ctx)->comp->ops->(op)(ctx, ##__VA_ARGS__) : 0)
| ^
drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c:322:23: note: in expansion of macro 'call_op'
322 | ret = call_op(ctx, post_process, cmd);
| ^~~~~~~vim +171 drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.c
12
13 static const struct mdp_format mdp_formats[] = {
14 {
15 .pixelformat = V4L2_PIX_FMT_GREY,
16 .mdp_color = MDP_COLOR_GREY,
17 .depth = { 8 },
18 .row_depth = { 8 },
19 .num_planes = 1,
20 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
21 }, {
22 .pixelformat = V4L2_PIX_FMT_RGB565X,
23 .mdp_color = MDP_COLOR_RGB565,
24 .depth = { 16 },
25 .row_depth = { 16 },
26 .num_planes = 1,
27 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
28 }, {
29 .pixelformat = V4L2_PIX_FMT_RGB565,
30 .mdp_color = MDP_COLOR_BGR565,
31 .depth = { 16 },
32 .row_depth = { 16 },
33 .num_planes = 1,
34 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
35 }, {
36 .pixelformat = V4L2_PIX_FMT_RGB24,
37 .mdp_color = MDP_COLOR_RGB888,
38 .depth = { 24 },
39 .row_depth = { 24 },
40 .num_planes = 1,
41 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
42 }, {
43 .pixelformat = V4L2_PIX_FMT_BGR24,
44 .mdp_color = MDP_COLOR_BGR888,
45 .depth = { 24 },
46 .row_depth = { 24 },
47 .num_planes = 1,
48 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
49 }, {
50 .pixelformat = V4L2_PIX_FMT_ABGR32,
51 .mdp_color = MDP_COLOR_BGRA8888,
52 .depth = { 32 },
53 .row_depth = { 32 },
54 .num_planes = 1,
55 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
56 }, {
57 .pixelformat = V4L2_PIX_FMT_ARGB32,
58 .mdp_color = MDP_COLOR_ARGB8888,
59 .depth = { 32 },
60 .row_depth = { 32 },
61 .num_planes = 1,
62 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
63 }, {
64 .pixelformat = V4L2_PIX_FMT_UYVY,
65 .mdp_color = MDP_COLOR_UYVY,
66 .depth = { 16 },
67 .row_depth = { 16 },
68 .num_planes = 1,
69 .walign = 1,
70 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
71 }, {
72 .pixelformat = V4L2_PIX_FMT_VYUY,
73 .mdp_color = MDP_COLOR_VYUY,
74 .depth = { 16 },
75 .row_depth = { 16 },
76 .num_planes = 1,
77 .walign = 1,
78 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
79 }, {
80 .pixelformat = V4L2_PIX_FMT_YUYV,
81 .mdp_color = MDP_COLOR_YUYV,
82 .depth = { 16 },
83 .row_depth = { 16 },
84 .num_planes = 1,
85 .walign = 1,
86 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
87 }, {
88 .pixelformat = V4L2_PIX_FMT_YVYU,
89 .mdp_color = MDP_COLOR_YVYU,
90 .depth = { 16 },
91 .row_depth = { 16 },
92 .num_planes = 1,
93 .walign = 1,
94 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
95 }, {
96 .pixelformat = V4L2_PIX_FMT_YUV420,
97 .mdp_color = MDP_COLOR_I420,
98 .depth = { 12 },
99 .row_depth = { 8 },
100 .num_planes = 1,
101 .walign = 1,
102 .halign = 1,
103 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
104 }, {
105 .pixelformat = V4L2_PIX_FMT_YVU420,
106 .mdp_color = MDP_COLOR_YV12,
107 .depth = { 12 },
108 .row_depth = { 8 },
109 .num_planes = 1,
110 .walign = 1,
111 .halign = 1,
112 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
113 }, {
114 .pixelformat = V4L2_PIX_FMT_NV12,
115 .mdp_color = MDP_COLOR_NV12,
116 .depth = { 12 },
117 .row_depth = { 8 },
118 .num_planes = 1,
119 .walign = 1,
120 .halign = 1,
121 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
122 }, {
123 .pixelformat = V4L2_PIX_FMT_NV21,
124 .mdp_color = MDP_COLOR_NV21,
125 .depth = { 12 },
126 .row_depth = { 8 },
127 .num_planes = 1,
128 .walign = 1,
129 .halign = 1,
130 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
131 }, {
132 .pixelformat = V4L2_PIX_FMT_NV16,
133 .mdp_color = MDP_COLOR_NV16,
134 .depth = { 16 },
135 .row_depth = { 8 },
136 .num_planes = 1,
137 .walign = 1,
138 .flags = MDP_FMT_FLAG_OUTPUT,
139 }, {
140 .pixelformat = V4L2_PIX_FMT_NV61,
141 .mdp_color = MDP_COLOR_NV61,
142 .depth = { 16 },
143 .row_depth = { 8 },
144 .num_planes = 1,
145 .walign = 1,
146 .flags = MDP_FMT_FLAG_OUTPUT,
147 }, {
148 .pixelformat = V4L2_PIX_FMT_NV24,
149 .mdp_color = MDP_COLOR_NV24,
150 .depth = { 24 },
151 .row_depth = { 8 },
152 .num_planes = 1,
153 .flags = MDP_FMT_FLAG_OUTPUT,
154 }, {
155 .pixelformat = V4L2_PIX_FMT_NV42,
156 .mdp_color = MDP_COLOR_NV42,
157 .depth = { 24 },
158 .row_depth = { 8 },
159 .num_planes = 1,
160 .flags = MDP_FMT_FLAG_OUTPUT,
161 }, {
162 .pixelformat = V4L2_PIX_FMT_MT21C,
163 .mdp_color = MDP_COLOR_420_BLK_UFO,
164 .depth = { 8, 4 },
165 .row_depth = { 8, 8 },
166 .num_planes = 2,
167 .walign = 4,
168 .halign = 5,
169 .flags = MDP_FMT_FLAG_OUTPUT,
170 }, {
> 171 .pixelformat = V4L2_PIX_FMT_MM21, 172 .mdp_color = MDP_COLOR_420_BLK,
173 .depth = { 8, 4 },
174 .row_depth = { 8, 8 },
175 .num_planes = 2,
176 .walign = 4,
177 .halign = 5,
178 .flags = MDP_FMT_FLAG_OUTPUT,
179 }, {
180 .pixelformat = V4L2_PIX_FMT_NV12M,
181 .mdp_color = MDP_COLOR_NV12,
182 .depth = { 8, 4 },
183 .row_depth = { 8, 8 },
184 .num_planes = 2,
185 .walign = 1,
186 .halign = 1,
187 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
188 }, {
189 .pixelformat = V4L2_PIX_FMT_NV21M,
190 .mdp_color = MDP_COLOR_NV21,
191 .depth = { 8, 4 },
192 .row_depth = { 8, 8 },
193 .num_planes = 2,
194 .walign = 1,
195 .halign = 1,
196 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
197 }, {
198 .pixelformat = V4L2_PIX_FMT_NV16M,
199 .mdp_color = MDP_COLOR_NV16,
200 .depth = { 8, 8 },
201 .row_depth = { 8, 8 },
202 .num_planes = 2,
203 .walign = 1,
204 .flags = MDP_FMT_FLAG_OUTPUT,
205 }, {
206 .pixelformat = V4L2_PIX_FMT_NV61M,
207 .mdp_color = MDP_COLOR_NV61,
208 .depth = { 8, 8 },
209 .row_depth = { 8, 8 },
210 .num_planes = 2,
211 .walign = 1,
212 .flags = MDP_FMT_FLAG_OUTPUT,
213 }, {
214 .pixelformat = V4L2_PIX_FMT_YUV420M,
215 .mdp_color = MDP_COLOR_I420,
216 .depth = { 8, 2, 2 },
217 .row_depth = { 8, 4, 4 },
218 .num_planes = 3,
219 .walign = 1,
220 .halign = 1,
221 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
222 }, {
223 .pixelformat = V4L2_PIX_FMT_YVU420M,
224 .mdp_color = MDP_COLOR_YV12,
225 .depth = { 8, 2, 2 },
226 .row_depth = { 8, 4, 4 },
227 .num_planes = 3,
228 .walign = 1,
229 .halign = 1,
230 .flags = MDP_FMT_FLAG_OUTPUT | MDP_FMT_FLAG_CAPTURE,
231 }
232 };
233
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org