Lines Matching refs:comp
66 static inline struct mtk_disp_ovl *comp_to_ovl(struct mtk_ddp_comp *comp) in comp_to_ovl() argument
68 return container_of(comp, struct mtk_disp_ovl, ddp_comp); in comp_to_ovl()
87 static void mtk_ovl_enable_vblank(struct mtk_ddp_comp *comp, in mtk_ovl_enable_vblank() argument
90 struct mtk_disp_ovl *ovl = comp_to_ovl(comp); in mtk_ovl_enable_vblank()
93 writel(0x0, comp->regs + DISP_REG_OVL_INTSTA); in mtk_ovl_enable_vblank()
94 writel_relaxed(OVL_FME_CPL_INT, comp->regs + DISP_REG_OVL_INTEN); in mtk_ovl_enable_vblank()
97 static void mtk_ovl_disable_vblank(struct mtk_ddp_comp *comp) in mtk_ovl_disable_vblank() argument
99 struct mtk_disp_ovl *ovl = comp_to_ovl(comp); in mtk_ovl_disable_vblank()
102 writel_relaxed(0x0, comp->regs + DISP_REG_OVL_INTEN); in mtk_ovl_disable_vblank()
105 static void mtk_ovl_start(struct mtk_ddp_comp *comp) in mtk_ovl_start() argument
107 writel_relaxed(0x1, comp->regs + DISP_REG_OVL_EN); in mtk_ovl_start()
110 static void mtk_ovl_stop(struct mtk_ddp_comp *comp) in mtk_ovl_stop() argument
112 writel_relaxed(0x0, comp->regs + DISP_REG_OVL_EN); in mtk_ovl_stop()
115 static void mtk_ovl_config(struct mtk_ddp_comp *comp, unsigned int w, in mtk_ovl_config() argument
120 writel_relaxed(h << 16 | w, comp->regs + DISP_REG_OVL_ROI_SIZE); in mtk_ovl_config()
121 writel_relaxed(0x0, comp->regs + DISP_REG_OVL_ROI_BGCLR); in mtk_ovl_config()
123 writel(0x1, comp->regs + DISP_REG_OVL_RST); in mtk_ovl_config()
124 writel(0x0, comp->regs + DISP_REG_OVL_RST); in mtk_ovl_config()
127 static unsigned int mtk_ovl_layer_nr(struct mtk_ddp_comp *comp) in mtk_ovl_layer_nr() argument
132 static void mtk_ovl_layer_on(struct mtk_ddp_comp *comp, unsigned int idx) in mtk_ovl_layer_on() argument
136 writel(0x1, comp->regs + DISP_REG_OVL_RDMA_CTRL(idx)); in mtk_ovl_layer_on()
137 writel(OVL_RDMA_MEM_GMC, comp->regs + DISP_REG_OVL_RDMA_GMC(idx)); in mtk_ovl_layer_on()
139 reg = readl(comp->regs + DISP_REG_OVL_SRC_CON); in mtk_ovl_layer_on()
141 writel(reg, comp->regs + DISP_REG_OVL_SRC_CON); in mtk_ovl_layer_on()
144 static void mtk_ovl_layer_off(struct mtk_ddp_comp *comp, unsigned int idx) in mtk_ovl_layer_off() argument
148 reg = readl(comp->regs + DISP_REG_OVL_SRC_CON); in mtk_ovl_layer_off()
150 writel(reg, comp->regs + DISP_REG_OVL_SRC_CON); in mtk_ovl_layer_off()
152 writel(0x0, comp->regs + DISP_REG_OVL_RDMA_CTRL(idx)); in mtk_ovl_layer_off()
191 static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, in mtk_ovl_layer_config() argument
194 struct mtk_disp_ovl *ovl = comp_to_ovl(comp); in mtk_ovl_layer_config()
204 mtk_ovl_layer_off(comp, idx); in mtk_ovl_layer_config()
210 writel_relaxed(con, comp->regs + DISP_REG_OVL_CON(idx)); in mtk_ovl_layer_config()
211 writel_relaxed(pitch, comp->regs + DISP_REG_OVL_PITCH(idx)); in mtk_ovl_layer_config()
212 writel_relaxed(src_size, comp->regs + DISP_REG_OVL_SRC_SIZE(idx)); in mtk_ovl_layer_config()
213 writel_relaxed(offset, comp->regs + DISP_REG_OVL_OFFSET(idx)); in mtk_ovl_layer_config()
214 writel_relaxed(addr, comp->regs + DISP_REG_OVL_ADDR(ovl, idx)); in mtk_ovl_layer_config()
217 mtk_ovl_layer_on(comp, idx); in mtk_ovl_layer_config()