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()
171 struct mmp_path *path = overlay->path; in dmafetch_onoff() local
174 tmp = readl_relaxed(ctrl_regs(path) + dma_ctrl(0, path->id)); in dmafetch_onoff()
177 writel(tmp, ctrl_regs(path) + dma_ctrl(0, path->id)); in dmafetch_onoff()
181 static void path_enabledisable(struct mmp_path *path, int on) in path_enabledisable() argument
184 mutex_lock(&path->access_ok); in path_enabledisable()
185 tmp = readl_relaxed(ctrl_regs(path) + LCD_SCLK(path)); in path_enabledisable()
190 writel_relaxed(tmp, ctrl_regs(path) + LCD_SCLK(path)); in path_enabledisable()
191 mutex_unlock(&path->access_ok); in path_enabledisable()
194 static void path_onoff(struct mmp_path *path, int on) in path_onoff() argument
196 if (path->status == on) { in path_onoff()
197 dev_info(path->dev, "path %s is already %s\n", in path_onoff()
198 path->name, stat_name(path->status)); in path_onoff()
203 path_enabledisable(path, 1); in path_onoff()
205 if (path->panel && path->panel->set_onoff) in path_onoff()
206 path->panel->set_onoff(path->panel, 1); in path_onoff()
208 if (path->panel && path->panel->set_onoff) in path_onoff()
209 path->panel->set_onoff(path->panel, 0); in path_onoff()
211 path_enabledisable(path, 0); in path_onoff()
213 path->status = on; in path_onoff()
220 overlay->path->name, stat_name(overlay->status)); 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()
237 struct lcd_regs *regs = path_regs(overlay->path); in overlay_set_addr()
252 static void path_set_mode(struct mmp_path *path, struct mmp_mode *mode) in path_set_mode() argument
254 struct lcd_regs *regs = path_regs(path); in path_set_mode()
256 link_config = path_to_path_plat(path)->link_config, in path_set_mode()
257 dsi_rbswap = path_to_path_plat(path)->link_config; in path_set_mode()
260 memcpy(&path->mode, mode, sizeof(struct mmp_mode)); in path_set_mode()
262 mutex_lock(&path->access_ok); in path_set_mode()
265 tmp = readl_relaxed(ctrl_regs(path) + intf_ctrl(path->id)) & 0x1; in path_set_mode()
270 writel_relaxed(tmp, ctrl_regs(path) + intf_ctrl(path->id)); in path_set_mode()
273 tmp = readl_relaxed(ctrl_regs(path) + intf_rbswap_ctrl(path->id)) & in path_set_mode()
276 writel_relaxed(tmp, ctrl_regs(path) + intf_rbswap_ctrl(path->id)); in path_set_mode()
292 if (path->output_type == PATH_OUT_DSI) in path_set_mode()
300 sclk_src = clk_get_rate(path_to_ctrl(path)->clk); in path_set_mode()
305 dev_info(path->dev, "%s sclk_src %d sclk_div 0x%x pclk %d\n", in path_set_mode()
308 tmp = readl_relaxed(ctrl_regs(path) + LCD_SCLK(path)); in path_set_mode()
311 writel_relaxed(tmp, ctrl_regs(path) + LCD_SCLK(path)); in path_set_mode()
313 mutex_unlock(&path->access_ok); in path_set_mode()
345 static void path_set_default(struct mmp_path *path) in path_set_default() argument
347 struct lcd_regs *regs = path_regs(path); in path_set_default()
350 path_config = path_to_path_plat(path)->path_config; in path_set_default()
353 if (PATH_OUT_PARALLEL == path->output_type) { in path_set_default()
355 tmp = readl_relaxed(ctrl_regs(path) + SPU_IOPAD_CONTROL); in path_set_default()
358 writel_relaxed(tmp, ctrl_regs(path) + SPU_IOPAD_CONTROL); in path_set_default()
362 tmp = readl_relaxed(ctrl_regs(path) + LCD_SCLK(path)); in path_set_default()
365 writel_relaxed(tmp, ctrl_regs(path) + LCD_SCLK(path)); in path_set_default()
375 writel_relaxed(dma_ctrl1, ctrl_regs(path) + dma_ctrl(1, path->id)); in path_set_default()
388 tmp = readl_relaxed(ctrl_regs(path) + dma_ctrl(0, path->id)); in path_set_default()
390 if (PATH_TV == path->id) in path_set_default()
392 writel_relaxed(tmp, ctrl_regs(path) + dma_ctrl(0, path->id)); in path_set_default()
400 struct mmp_path *path = NULL; in path_init() local
418 path = mmp_register_path(path_info); in path_init()
419 if (!path) { in path_init()
423 path_plat->path = path; in path_init()
427 path_set_default(path); in path_init()
438 mmp_unregister_path(path_plat->path); in path_deinit()