mbox series

[v2,0/2] MediaTek MDP3: use devicetree to retrieve SCP

Message ID 20231005104905.120544-1-angelogioacchino.delregno@collabora.com
Headers show
Series MediaTek MDP3: use devicetree to retrieve SCP | expand

Message

AngeloGioacchino Del Regno Oct. 5, 2023, 10:49 a.m. UTC
Changes in v2:
 - Rebased over media_stage master as of 05/10/2023
 - Reworked description of mediatek,scp property in bindings
   - Dropped Conor's and Chen-Yu's R-b tags from bindings patch due
     to the description rework.

Especially now that Multi-Core SCP support has landed, it makes sense to
retrieve the SCP handle by using the "mediatek,scp" property (as already
done in MediaTek VCODEC), both to select one specific SCP core for MDP3
and to avoid walking the parent node to find a SCP node.

AngeloGioacchino Del Regno (2):
  media: dt-bindings: mediatek: Add phandle to mediatek,scp on MDP3 RDMA
  media: platform: mtk-mdp3: Use devicetree phandle to retrieve SCP

 .../bindings/media/mediatek,mdp3-rdma.yaml       |  8 ++++++++
 .../media/platform/mediatek/mdp3/mtk-mdp3-core.c | 16 ++++++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

Comments

Alexandre Mergnat Oct. 10, 2023, 12:17 p.m. UTC | #1
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>

On 05/10/2023 12:49, AngeloGioacchino Del Regno wrote:
> Instead of walking the entire parent node for something that has the 
> right compatible, use the scp_get() function provided by the MediaTek 
> SCP remoteproc driver to retrieve a handle to mtk_scp through the 
> devicetree "mediatek,scp" (phandle) property. In case of multi-core SCP, 
> this also allows to select a specific core.