|
4 | 4 | $id: http://devicetree.org/schemas/media/mediatek,vcodec-subdev-decoder.yaml#
|
5 | 5 | $schema: http://devicetree.org/meta-schemas/core.yaml#
|
6 | 6 |
|
7 |
| -title: Mediatek Video Decode Accelerator With Multi Hardware |
| 7 | +title: MediaTek Video Decode Accelerator With Multi Hardware |
8 | 8 |
|
9 | 9 | maintainers:
|
10 | 10 | - Yunfei Dong <yunfei.dong@mediatek.com>
|
11 | 11 |
|
12 | 12 | description: |
|
13 |
| - Mediatek Video Decode is the video decode hardware present in Mediatek |
14 |
| - SoCs which supports high resolution decoding functionalities. Required |
15 |
| - parent and child device node. |
16 |
| -
|
17 |
| - About the Decoder Hardware Block Diagram, please check below: |
18 |
| -
|
19 |
| - +------------------------------------------------+-------------------------------------+ |
20 |
| - | | | |
21 |
| - | input -> lat soc HW -> lat HW -> lat buffer --|--> lat buffer -> core HW -> output | |
22 |
| - | || || | || | |
23 |
| - +------------||-------------||-------------------+---------------------||--------------+ |
24 |
| - || lat || | core workqueue <parent> |
25 |
| - -------------||-------------||-------------------|---------------------||--------------- |
26 |
| - ||<------------||----------------HW index---------------->|| <child> |
27 |
| - \/ \/ \/ |
28 |
| - +-------------------------------------------------------------+ |
29 |
| - | enable/disable | |
30 |
| - | clk power irq iommu | |
31 |
| - | (lat/lat soc/core0/core1) | |
32 |
| - +-------------------------------------------------------------+ |
33 |
| -
|
34 |
| - As above, there are parent and child devices, child mean each hardware. The child device |
35 |
| - controls the information of each hardware independent which include clk/power/irq. |
36 |
| -
|
37 |
| - There are two workqueues in parent device: lat workqueue and core workqueue. They are used |
38 |
| - to lat and core hardware decoder. Lat workqueue need to get input bitstream and lat buffer, |
39 |
| - then enable lat to decode, writing the result to lat buffer, dislabe hardware when lat decode |
40 |
| - done. Core workqueue need to get lat buffer and output buffer, then enable core to decode, |
41 |
| - writing the result to output buffer, disable hardware when core decode done. These two |
42 |
| - hardwares will decode each frame cyclically. |
43 |
| -
|
44 |
| - For the smi common may not the same for each hardware, can't combine all hardware in one node, |
45 |
| - or leading to iommu fault when access dram data. |
46 |
| -
|
47 |
| - Lat soc is a hardware which is related with some larb(local arbiter) ports. For mt8195 |
48 |
| - platform, there are some ports like RDMA, UFO in lat soc larb, need to enable its power and |
49 |
| - clock when lat start to work, don't have interrupt. |
50 |
| -
|
51 |
| - mt8195: lat soc HW + lat HW + core HW |
52 |
| - mt8192: lat HW + core HW |
| 13 | + MediaTek Video Decode Accelerator is the video decoding hardware present in |
| 14 | + MediaTek SoCs that supports high-resolution decoding functionalities. |
| 15 | + It consists of parent and child nodes. |
| 16 | +
|
| 17 | + The decoder hardware block diagram is shown below: |
| 18 | +
|
| 19 | + +------------------------------------------------+------------------------------+ |
| 20 | + | | | |
| 21 | + | input -> LAT-SoC HW -> LAT HW -> LAT buffer --|--> Core HW -> output buffer | |
| 22 | + | || || | || | |
| 23 | + +--------------||-----------||-------------------+-------||---------------------+ |
| 24 | + LAT Workqueue | Core Workqueue <parent> |
| 25 | + ---------------||-----------||-------------------|-------||---------------------- |
| 26 | + ||<----------||---------HW index--------->|| <child> |
| 27 | + \/ \/ \/ |
| 28 | + +-------------------------------------------------------------+ |
| 29 | + | enable/disable | |
| 30 | + | clk power irq iommu | |
| 31 | + | (lat/lat-soc/core0/core1) | |
| 32 | + +-------------------------------------------------------------+ |
| 33 | +
|
| 34 | + The child nodes represent the individual hardware blocks within the decoding |
| 35 | + pipeline, such as LAT-SoC, LAT and Core. |
| 36 | + Each child node is responsible for managing the dedicated resources of the |
| 37 | + hardware, such as clocks, power domains, interrupts and IOMMUs. |
| 38 | +
|
| 39 | + The parent node is a central point of control for the child nodes. |
| 40 | + It identifies the specific video decoding pipeline architecture used by the |
| 41 | + SoC, manages the shared resources like workqueues and platform data, and |
| 42 | + handles V4L2 API calls on behalf of the underlying hardware. |
| 43 | +
|
| 44 | + The parent utilizes two workqueues to manage the decoding process. |
| 45 | + 1. LAT Workqueue, for LAT-SoC and LAT decoder: |
| 46 | + Its workers take input bitstream and LAT buffer, enable the hardware for |
| 47 | + decoding tasks, write the result to LAT buffer, and disable the hardware |
| 48 | + after the LAT decoding is done. |
| 49 | + 2. Core Workqueue, for Core decoder: |
| 50 | + Its workers take LAT buffer and output buffer, enable the hardware for |
| 51 | + decoding tasks, write the result to output buffer, and disable the hardware |
| 52 | + after the Core decoding is done. |
| 53 | +
|
| 54 | + These hardware decode each frame cyclically. |
| 55 | +
|
| 56 | + The hardware might be associated with different SMI-common devices. |
| 57 | + To prevent IOMMU faults during DRAM access in such cases, each hardware with |
| 58 | + the unique SMI-common device must be placed under a separate parent node in |
| 59 | + the device tree. |
| 60 | +
|
| 61 | + LAT-SoC refers to another hardware block that connected to additional LARB |
| 62 | + (local arbiter) ports, such as RDMA and UFO. |
| 63 | + It requires independent power and clock control to work with LAT decoder, and |
| 64 | + it doesn't have a dedicated interrupt. |
| 65 | +
|
| 66 | + The used video decoding pipeline architecture across various Mediatek SoC: |
| 67 | + MT8195: LAT-SoC + LAT + Core |
| 68 | + MT8192: LAT + Core |
| 69 | + MT8188: LAT + Core |
| 70 | + MT8186: Core |
53 | 71 |
|
54 | 72 | properties:
|
55 | 73 | compatible:
|
|
0 commit comments