Lines Matching refs:path
122 struct mmp_path *path = overlay->path; in dmafetch_set_fmt() local
123 tmp = readl_relaxed(ctrl_regs(path) + dma_ctrl(0, path->id)); in dmafetch_set_fmt()
126 writel_relaxed(tmp, ctrl_regs(path) + dma_ctrl(0, path->id)); in dmafetch_set_fmt()
131 struct lcd_regs *regs = path_regs(overlay->path); in overlay_set_win()
164 struct mmp_path *path = overlay->path; in dmafetch_onoff() local
167 tmp = readl_relaxed(ctrl_regs(path) + dma_ctrl(0, path->id)); in dmafetch_onoff()
170 writel(tmp, ctrl_regs(path) + dma_ctrl(0, path->id)); in dmafetch_onoff()
174 static void path_enabledisable(struct mmp_path *path, int on) in path_enabledisable() argument
177 mutex_lock(&path->access_ok); in path_enabledisable()
178 tmp = readl_relaxed(ctrl_regs(path) + LCD_SCLK(path)); in path_enabledisable()
183 writel_relaxed(tmp, ctrl_regs(path) + LCD_SCLK(path)); in path_enabledisable()
184 mutex_unlock(&path->access_ok); in path_enabledisable()
187 static void path_onoff(struct mmp_path *path, int on) in path_onoff() argument
189 if (path->status == on) { in path_onoff()
190 dev_info(path->dev, "path %s is already %s\n", in path_onoff()
191 path->name, stat_name(path->status)); in path_onoff()
196 path_enabledisable(path, 1); in path_onoff()
198 if (path->panel && path->panel->set_onoff) in path_onoff()
199 path->panel->set_onoff(path->panel, 1); in path_onoff()
201 if (path->panel && path->panel->set_onoff) in path_onoff()
202 path->panel->set_onoff(path->panel, 0); in path_onoff()
204 path_enabledisable(path, 0); in path_onoff()
206 path->status = on; in path_onoff()
213 overlay->path->name, stat_name(overlay->status)); in overlay_set_onoff()
218 if (overlay->path->ops.check_status(overlay->path) in overlay_set_onoff()
219 != overlay->path->status) in overlay_set_onoff()
220 path_onoff(overlay->path, on); in overlay_set_onoff()
230 struct lcd_regs *regs = path_regs(overlay->path); in overlay_set_addr()
245 static void path_set_mode(struct mmp_path *path, struct mmp_mode *mode) in path_set_mode() argument
247 struct lcd_regs *regs = path_regs(path); in path_set_mode()
249 link_config = path_to_path_plat(path)->link_config, in path_set_mode()
250 dsi_rbswap = path_to_path_plat(path)->link_config; in path_set_mode()
253 memcpy(&path->mode, mode, sizeof(struct mmp_mode)); in path_set_mode()
255 mutex_lock(&path->access_ok); in path_set_mode()
258 tmp = readl_relaxed(ctrl_regs(path) + intf_ctrl(path->id)) & 0x1; in path_set_mode()
263 writel_relaxed(tmp, ctrl_regs(path) + intf_ctrl(path->id)); in path_set_mode()
266 tmp = readl_relaxed(ctrl_regs(path) + intf_rbswap_ctrl(path->id)) & in path_set_mode()
269 writel_relaxed(tmp, ctrl_regs(path) + intf_rbswap_ctrl(path->id)); in path_set_mode()
283 if (path->output_type == PATH_OUT_DSI) in path_set_mode()
291 sclk_src = clk_get_rate(path_to_ctrl(path)->clk); in path_set_mode()
296 dev_info(path->dev, "%s sclk_src %d sclk_div 0x%x pclk %d\n", in path_set_mode()
299 tmp = readl_relaxed(ctrl_regs(path) + LCD_SCLK(path)); in path_set_mode()
302 writel_relaxed(tmp, ctrl_regs(path) + LCD_SCLK(path)); in path_set_mode()
304 mutex_unlock(&path->access_ok); in path_set_mode()
336 static void path_set_default(struct mmp_path *path) in path_set_default() argument
338 struct lcd_regs *regs = path_regs(path); in path_set_default()
341 path_config = path_to_path_plat(path)->path_config; in path_set_default()
344 if (PATH_OUT_PARALLEL == path->output_type) { in path_set_default()
346 tmp = readl_relaxed(ctrl_regs(path) + SPU_IOPAD_CONTROL); in path_set_default()
349 writel_relaxed(tmp, ctrl_regs(path) + SPU_IOPAD_CONTROL); in path_set_default()
353 tmp = readl_relaxed(ctrl_regs(path) + LCD_SCLK(path)); in path_set_default()
356 writel_relaxed(tmp, ctrl_regs(path) + LCD_SCLK(path)); in path_set_default()
366 writel_relaxed(dma_ctrl1, ctrl_regs(path) + dma_ctrl(1, path->id)); in path_set_default()
379 tmp = readl_relaxed(ctrl_regs(path) + dma_ctrl(0, path->id)); in path_set_default()
381 if (PATH_TV == path->id) in path_set_default()
383 writel_relaxed(tmp, ctrl_regs(path) + dma_ctrl(0, path->id)); in path_set_default()
391 struct mmp_path *path = NULL; in path_init() local
409 path = mmp_register_path(path_info); in path_init()
410 if (!path) { in path_init()
414 path_plat->path = path; in path_init()
418 path_set_default(path); in path_init()
429 mmp_unregister_path(path_plat->path); in path_deinit()