drm/mediatek: Add encoder_index interface for mtk_ddp_comp_funcs
authorJason-JH.Lin <jason-jh.lin@mediatek.com>
Wed, 4 Oct 2023 02:40:08 +0000 (10:40 +0800)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Sun, 8 Oct 2023 00:53:24 +0000 (00:53 +0000)
commita260f5624dfc6ec3eb7b5349f51d34c687c07b5c
treec7cf7891ee0eeaa5d471b77e55371ef694f26bc1
parentebba0960993045787ca00bb0932d83dad98c2e26
drm/mediatek: Add encoder_index interface for mtk_ddp_comp_funcs

To support dynamic connector selection function, each ddp_comp need to
get their encoder_index to identify which connector should be selected.

Add encoder_index interface for mtk_ddp_comp_funcs to get the encoder
identifier by drm_encoder_index().
Then drm driver will call mtk_ddp_comp_encoder_index_set() to store the
encoder_index to each ddp_comp in connector routes.

Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20231004024013.18956-5-jason-jh.lin@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h