Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc / drm: mediatek: Move DDP component defines into mtk-mmsys.h

MMSYS is the driver which controls the routing of these DDP components,
so the definition of the mtk_ddp_comp_id enum should be placed in mtk-mmsys.h

Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20201006193320.405529-2-enric.balletbo@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>

authored by

Yongqiang Niu and committed by
Matthias Brugger
51c0e618 0890beb2

+35 -36
+1 -33
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
··· 7 7 #define MTK_DRM_DDP_COMP_H 8 8 9 9 #include <linux/io.h> 10 + #include <linux/soc/mediatek/mtk-mmsys.h> 10 11 11 12 struct device; 12 13 struct device_node; ··· 34 33 MTK_DISP_OD, 35 34 MTK_DISP_BLS, 36 35 MTK_DDP_COMP_TYPE_MAX, 37 - }; 38 - 39 - enum mtk_ddp_comp_id { 40 - DDP_COMPONENT_AAL0, 41 - DDP_COMPONENT_AAL1, 42 - DDP_COMPONENT_BLS, 43 - DDP_COMPONENT_CCORR, 44 - DDP_COMPONENT_COLOR0, 45 - DDP_COMPONENT_COLOR1, 46 - DDP_COMPONENT_DITHER, 47 - DDP_COMPONENT_DPI0, 48 - DDP_COMPONENT_DPI1, 49 - DDP_COMPONENT_DSI0, 50 - DDP_COMPONENT_DSI1, 51 - DDP_COMPONENT_DSI2, 52 - DDP_COMPONENT_DSI3, 53 - DDP_COMPONENT_GAMMA, 54 - DDP_COMPONENT_OD0, 55 - DDP_COMPONENT_OD1, 56 - DDP_COMPONENT_OVL0, 57 - DDP_COMPONENT_OVL_2L0, 58 - DDP_COMPONENT_OVL_2L1, 59 - DDP_COMPONENT_OVL1, 60 - DDP_COMPONENT_PWM0, 61 - DDP_COMPONENT_PWM1, 62 - DDP_COMPONENT_PWM2, 63 - DDP_COMPONENT_RDMA0, 64 - DDP_COMPONENT_RDMA1, 65 - DDP_COMPONENT_RDMA2, 66 - DDP_COMPONENT_UFOE, 67 - DDP_COMPONENT_WDMA0, 68 - DDP_COMPONENT_WDMA1, 69 - DDP_COMPONENT_ID_MAX, 70 36 }; 71 37 72 38 struct mtk_ddp_comp;
+1 -3
drivers/soc/mediatek/mtk-mmsys.c
··· 5 5 */ 6 6 7 7 #include <linux/device.h> 8 + #include <linux/io.h> 8 9 #include <linux/of_device.h> 9 10 #include <linux/platform_device.h> 10 11 #include <linux/soc/mediatek/mtk-mmsys.h> 11 - 12 - #include "../../gpu/drm/mediatek/mtk_drm_ddp.h" 13 - #include "../../gpu/drm/mediatek/mtk_drm_ddp_comp.h" 14 12 15 13 #define DISP_REG_CONFIG_DISP_OVL0_MOUT_EN 0x040 16 14 #define DISP_REG_CONFIG_DISP_OVL1_MOUT_EN 0x044
+33
include/linux/soc/mediatek/mtk-mmsys.h
··· 9 9 enum mtk_ddp_comp_id; 10 10 struct device; 11 11 12 + enum mtk_ddp_comp_id { 13 + DDP_COMPONENT_AAL0, 14 + DDP_COMPONENT_AAL1, 15 + DDP_COMPONENT_BLS, 16 + DDP_COMPONENT_CCORR, 17 + DDP_COMPONENT_COLOR0, 18 + DDP_COMPONENT_COLOR1, 19 + DDP_COMPONENT_DITHER, 20 + DDP_COMPONENT_DPI0, 21 + DDP_COMPONENT_DPI1, 22 + DDP_COMPONENT_DSI0, 23 + DDP_COMPONENT_DSI1, 24 + DDP_COMPONENT_DSI2, 25 + DDP_COMPONENT_DSI3, 26 + DDP_COMPONENT_GAMMA, 27 + DDP_COMPONENT_OD0, 28 + DDP_COMPONENT_OD1, 29 + DDP_COMPONENT_OVL0, 30 + DDP_COMPONENT_OVL_2L0, 31 + DDP_COMPONENT_OVL_2L1, 32 + DDP_COMPONENT_OVL1, 33 + DDP_COMPONENT_PWM0, 34 + DDP_COMPONENT_PWM1, 35 + DDP_COMPONENT_PWM2, 36 + DDP_COMPONENT_RDMA0, 37 + DDP_COMPONENT_RDMA1, 38 + DDP_COMPONENT_RDMA2, 39 + DDP_COMPONENT_UFOE, 40 + DDP_COMPONENT_WDMA0, 41 + DDP_COMPONENT_WDMA1, 42 + DDP_COMPONENT_ID_MAX, 43 + }; 44 + 12 45 void mtk_mmsys_ddp_connect(struct device *dev, 13 46 enum mtk_ddp_comp_id cur, 14 47 enum mtk_ddp_comp_id next);