return ret;
}
-static int dsim_reg_set_hs_clock(u32 id, u32 en)
+int dsim_reg_set_hs_clock(u32 id, u32 en)
{
int reg = 0;
int is_noncont = dsim_reg_is_noncont_clk_enabled(id);
return reg;
}
-static void dsim_reg_set_int(u32 id, u32 en)
+void dsim_reg_set_int(u32 id, u32 en)
{
u32 val = en ? 0 : ~0;
u32 mask;
dsim_reg_set_config(id, lcd_info, clks);
+#if defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
+ dsim_reg_set_cmd_transfer_mode(dsim->id, 1);
+#endif
+
if (panel_ctrl)
dsim_reset_panel(dsim);
}
void dsim_reg_start(u32 id)
{
dsim_reg_set_hs_clock(id, 1);
- dsim_reg_set_int(id, 1);
}
/* Unset clocks and lanes and stop_state */
/* try to exit ULPS mode. The sequence is depends on DDI type */
ret = dsim_reg_set_ulps_by_ddi(id, ddi_type, lanes, 0);
+#if !defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
dsim_reg_start(id);
+#endif
+ dsim_reg_set_int(id, 1);
return ret;
}
dsim = container_of(decon->out_sd[0], struct dsim_device, sd);
decon_reg_start(decon->id, &psr);
decon_reg_set_int(decon->id, &psr, 1);
+#if defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
+ if (decon->dt.out_type == DECON_OUT_DSI)
+ v4l2_subdev_call(decon->out_sd[0], core, ioctl,
+ DSIM_IOC_LPDT_CMD, (unsigned long *)1);
+#endif
call_panel_ops(dsim, displayon, dsim);
+#if defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
+ if (decon->dt.out_type == DECON_OUT_DSI) {
+ v4l2_subdev_call(decon->out_sd[0], core, ioctl,
+ DSIM_IOC_HS_CLK_ENABLE, NULL);
+ v4l2_subdev_call(decon->out_sd[0], core, ioctl,
+ DSIM_IOC_LPDT_CMD, (unsigned long *)0);
+
+ }
+#endif
decon_wait_for_vsync(decon, VSYNC_TIMEOUT_MSEC);
if (decon_reg_wait_update_done_and_mask(decon->id, &psr,
SHADOW_UPDATE_TIMEOUT) < 0)
panel_ctrl = (state == DSIM_STATE_ON) ? true : false;
dsim_reg_init(dsim->id, &dsim->lcd_info, &dsim->clks, panel_ctrl);
+#if !defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
dsim_reg_start(dsim->id);
+#endif
+ dsim_reg_set_int(dsim->id, 1);
dsim->state = state;
enable_irq(dsim->res.irq);
goto out;
}
- if (prev_state != DSIM_STATE_INIT)
+ if (prev_state != DSIM_STATE_INIT) {
+#if defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
+ dsim_reg_set_cmd_transfer_mode(dsim->id, 1);
+#endif
call_panel_ops(dsim, displayon, dsim);
+#if defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
+ dsim_reg_start(dsim->id);
+ dsim_reg_set_cmd_transfer_mode(dsim->id, 0);
+#endif
+ }
dsim_info("dsim-%d %s - (state:%s -> %s)\n", dsim->id, __func__,
dsim_state_names[prev_state],
dsim->id, dsim_state_names[next_state], ret);
goto out;
}
- if (prev_state != DSIM_STATE_INIT)
+ if (prev_state != DSIM_STATE_INIT) {
+#if defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
+ dsim_reg_set_cmd_transfer_mode(dsim->id, 1);
+#endif
call_panel_ops(dsim, doze, dsim);
+#if defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
+ dsim_reg_set_cmd_transfer_mode(dsim->id, 0);
+#endif
+ }
dsim_info("dsim-%d %s - (state:%s -> %s)\n", dsim->id, __func__,
dsim_state_names[prev_state],
dsim_state_names[dsim->state]);
return 0;
}
+#if defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
+ dsim_reg_set_hs_clock(dsim->id, 0);
+ dsim_reg_set_cmd_transfer_mode(dsim->id, 1);
+#endif
dsim_info("dsim-%d %s +\n", dsim->id, __func__);
call_panel_ops(dsim, suspend, dsim);
+#if defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
+ dsim_reg_set_cmd_transfer_mode(dsim->id, 0);
+#endif
ret = _dsim_disable(dsim, next_state);
if (ret < 0) {
dsim_err("dsim-%d failed to set %s (ret %d)\n",
return 0;
}
+#if defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
+ dsim_reg_set_cmd_transfer_mode(dsim->id, 1);
+#endif
dsim_info("dsim-%d %s +\n", dsim->id, __func__);
call_panel_ops(dsim, doze_suspend, dsim);
+#if defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
+ dsim_reg_set_cmd_transfer_mode(dsim->id, 0);
+#endif
ret = _dsim_disable(dsim, next_state);
if (ret < 0) {
dsim_err("dsim-%d failed to set %s (ret %d)\n",
ret = dsim_doze_suspend(dsim);
break;
+ case DSIM_IOC_HS_CLK_ENABLE:
+ ret = dsim_reg_set_hs_clock(dsim->id, 1);
+ break;
+
+ case DSIM_IOC_LPDT_CMD:
+ if ((unsigned long)arg)
+ dsim_reg_set_cmd_transfer_mode(dsim->id, 1);
+ else
+ dsim_reg_set_cmd_transfer_mode(dsim->id, 0);
+
+ break;
+
default:
dsim_err("unsupported ioctl");
ret = -EINVAL;
switch (cmd) {
case 1:
ret = dsim_cmd_sysfs_read(dsim);
+#if defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
+ dsim_reg_set_cmd_transfer_mode(dsim->id, 1);
+#endif
call_panel_ops(dsim, dump, dsim);
+#if defined(CONFIG_EXYNOS_PANEL_INIT_LPDT)
+ dsim_reg_set_cmd_transfer_mode(dsim->id, 0);
+#endif
if (ret)
return ret;
break;