Lines Matching refs:overlay

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