return dev_drv->frame_time.framedone_t;
}
+/*
+ * set prmry screen status
+ */
+int rk_fb_set_prmry_screen_status(int status)
+{
+ struct rk_lcdc_driver *dev_drv = rk_get_prmry_lcdc_drv();
+ struct rk_screen *screen = dev_drv->cur_screen;
+
+ switch (status) {
+ case SCREEN_PREPARE_DDR_CHANGE:
+ if (screen->type == SCREEN_MIPI
+ || screen->type == SCREEN_DUAL_MIPI) {
+ if (dev_drv->trsm_ops->dsp_pwr_off)
+ dev_drv->trsm_ops->dsp_pwr_off();
+ }
+ break;
+ case SCREEN_UNPREPARE_DDR_CHANGE:
+ if (screen->type == SCREEN_MIPI
+ || screen->type == SCREEN_DUAL_MIPI) {
+ if (dev_drv->trsm_ops->dsp_pwr_on)
+ dev_drv->trsm_ops->dsp_pwr_on();
+ }
+ break;
+ default:
+ break;
+ }
+
+ return 0;
+}
+
#if 0
static struct rk_lcdc_driver *rk_get_extend_lcdc_drv(void)
{
static int rk32_mipi_dsi_enable_video_mode(void *arg, u32 enable);
static int rk32_mipi_dsi_enable_command_mode(void *arg, u32 enable);
static int rk32_mipi_dsi_is_enable(void *arg, u32 enable);
+static int rk32_mipi_power_down_DDR();
+static int rk32_mipi_power_up_DDR();
int rk_mipi_screen_standby(u8 enable);
#ifdef CONFIG_RK_3288_DSI_UBOOT
{
.enable = rk32_dsi_enable,
.disable = rk32_dsi_disable,
+ .dsp_pwr_on = rk32_mipi_power_up_DDR,
+ .dsp_pwr_off = rk32_mipi_power_down_DDR,
};
#endif
static void rk32_init_phy_mode(int lcdc_id)
}
#endif
#ifdef CONFIG_MIPI_DSI_LINUX
-int rk32_mipi_power_down_DDR(void)
+static int rk32_mipi_power_down_DDR(void)
{
dsi_is_enable(0, 0);
if (rk_mipi_get_dsi_num() ==2)
dsi_is_enable(1, 0);
return 0;
}
-EXPORT_SYMBOL(rk32_mipi_power_down_DDR);
-int rk32_mipi_power_up_DDR(void)
+
+static int rk32_mipi_power_up_DDR(void)
{
dsi_is_enable(0, 0);
if (rk_mipi_get_dsi_num() ==2)
dsi_is_enable(1, 1);
return 0;
}
-EXPORT_SYMBOL(rk32_mipi_power_up_DDR);
static int rk32_mipi_dsi_probe(struct platform_device *pdev)
{
extern u32 rk_fb_get_prmry_screen_ft(void);
extern u32 rk_fb_get_prmry_screen_vbt(void);
extern u64 rk_fb_get_prmry_screen_framedone_t(void);
+extern int rk_fb_set_prmry_screen_status(int status);
extern bool rk_fb_poll_wait_frame_complete(void);
/********************************************************************
H_COS = 0x1
} bcsh_hue_mode;
+typedef enum {
+ SCREEN_PREPARE_DDR_CHANGE = 0x0,
+ SCREEN_UNPREPARE_DDR_CHANGE,
+} screen_status;
struct rk_fb_rgb {
struct fb_bitfield red;
struct rk_fb_trsm_ops {
int (*enable)(void);
int (*disable)(void);
+ int (*dsp_pwr_on) (void);
+ int (*dsp_pwr_off) (void);
};
struct rk_lcdc_drv_ops {