• Moudy Ho's avatar
    media: platform: mtk-mdp3: decompose hardware-related information in shared memory · 09e694f1
    Moudy Ho authored
    The communication between the MDP3 kernel driver and SCP is to
    pass a shared memory through the cooperation of "mtk-mdp3-vpu.c" and
    remoteproc driver.
    The data structure of this shared memory is defined in "mtk-img-ipi.h",
    as shown below:
    
    vpu->work_addr -> +-----------------------------------------+
                      |                                         |
                      | To SCP : Input frame parameters         |
                      |          (struct img_ipi_frameparam)    |
                      |                                         |
         vpu->pool -> +-----------------------------------------+
                      |                                         |
                      | From SCP : Output component config pool |
                      |            (struct img_config)          |
                      |                                         |
                      |           *struct img_config 1          |
                      |                    |                    |
                      |                    |                    |
                      |                    v                    |
                      |           *struct img_config N          |
                      |            (N = MDP_CONFIG_POOL_SIZE)   |
                      +-----------------------------------------+
    
    One output component configuration contains the components
    currently used by the pipeline, and has the register settings
    that each component needs to set.
    
    Since the quantity, type and function of components on each chip
    will vary, the effect is that the size of the "struct img_config"
    and its substructures will be different on each chip.
    In addition, all chips will have to update their SCP firmware for
    every change if the output component config structure is defined
    and shared by a common header.
    
    Therefore, all functions that operate on "struct img_config" and
    its substructures must be separated by chips and so are the
    relevant definations.
    Signed-off-by: default avatarMoudy Ho <moudy.ho@mediatek.com>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    09e694f1
mtk-mdp3-cmdq.c 12.9 KB