Lines Matching full:overlay

48 static u32 fmt_to_reg(struct mmp_overlay *overlay, int pix_fmt)  in fmt_to_reg()  argument
52 vid = overlay_is_vid(overlay); in fmt_to_reg()
119 static void dmafetch_set_fmt(struct mmp_overlay *overlay) in dmafetch_set_fmt() argument
122 struct mmp_path *path = overlay->path; in dmafetch_set_fmt()
124 tmp &= ~dma_mask(overlay_is_vid(overlay)); in dmafetch_set_fmt()
125 tmp |= fmt_to_reg(overlay, overlay->win.pix_fmt); in dmafetch_set_fmt()
129 static void overlay_set_win(struct mmp_overlay *overlay, struct mmp_win *win) in overlay_set_win() argument
131 struct lcd_regs *regs = path_regs(overlay->path); in overlay_set_win()
134 memcpy(&overlay->win, win, sizeof(struct mmp_win)); in overlay_set_win()
136 mutex_lock(&overlay->access_ok); in overlay_set_win()
138 if (overlay_is_vid(overlay)) { in overlay_set_win()
161 dmafetch_set_fmt(overlay); in overlay_set_win()
162 mutex_unlock(&overlay->access_ok); in overlay_set_win()
165 static void dmafetch_onoff(struct mmp_overlay *overlay, int on) in dmafetch_onoff() argument
167 u32 mask = overlay_is_vid(overlay) ? CFG_DMA_ENA_MASK : in dmafetch_onoff()
169 u32 enable = overlay_is_vid(overlay) ? CFG_DMA_ENA(1) : CFG_GRA_ENA(1); in dmafetch_onoff()
171 struct mmp_path *path = overlay->path; in dmafetch_onoff()
173 mutex_lock(&overlay->access_ok); in dmafetch_onoff()
178 mutex_unlock(&overlay->access_ok); in dmafetch_onoff()
216 static void overlay_set_onoff(struct mmp_overlay *overlay, int on) in overlay_set_onoff() argument
218 if (overlay->status == on) { in overlay_set_onoff()
219 dev_info(overlay_to_ctrl(overlay)->dev, "overlay %s is already %s\n", in overlay_set_onoff()
220 overlay->path->name, stat_name(overlay->status)); in overlay_set_onoff()
223 overlay->status = on; in overlay_set_onoff()
224 dmafetch_onoff(overlay, on); in overlay_set_onoff()
225 if (overlay->path->ops.check_status(overlay->path) in overlay_set_onoff()
226 != overlay->path->status) in overlay_set_onoff()
227 path_onoff(overlay->path, on); in overlay_set_onoff()
230 static void overlay_set_fetch(struct mmp_overlay *overlay, int fetch_id) in overlay_set_fetch() argument
232 overlay->dmafetch_id = fetch_id; in overlay_set_fetch()
235 static int overlay_set_addr(struct mmp_overlay *overlay, struct mmp_addr *addr) in overlay_set_addr() argument
237 struct lcd_regs *regs = path_regs(overlay->path); in overlay_set_addr()
240 memcpy(&overlay->addr, addr, sizeof(struct mmp_addr)); in overlay_set_addr()
242 if (overlay_is_vid(overlay)) { in overlay_set_addr()
249 return overlay->addr.phys[0]; in overlay_set_addr()