drm/mediatek: use layer_nr function to get layer number to init plane
authorStu Hsieh <stu.hsieh@mediatek.com>
Thu, 9 Aug 2018 02:15:47 +0000 (10:15 +0800)
committerCK Hu <ck.hu@mediatek.com>
Mon, 27 Aug 2018 03:24:37 +0000 (11:24 +0800)
commit66b2cf9623facfad790b335fcfd717258a00896b
tree100ed95d5e137c767b1c00bc735d66ff595eda4e
parent98b6d76f957ba80017a3118fe0e33030b4bc017b
drm/mediatek: use layer_nr function to get layer number to init plane

This patch use layer_nr function to get layer number to init plane

When plane init in crtc create,
it use the number of OVL layer to init plane.
That's OVL can read 4 memory address.

For mt2712 third ddp, it use RDMA to read memory.
RDMA can read 1 memory address, so it just init one plane.

For compatibility, this patch use mtk_ddp_comp_layer_nr function
to get layer number from their HW component in ddp for plane init.

Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com>
Signed-off-by: CK Hu <ck.hu@mediatek.com>
drivers/gpu/drm/mediatek/mtk_drm_crtc.c
drivers/gpu/drm/mediatek/mtk_drm_crtc.h