From 88ba5de0b5995cd32838fb5509b3c0824f222e4d Mon Sep 17 00:00:00 2001 From: hjc Date: Wed, 15 Apr 2015 19:28:05 +0800 Subject: [PATCH] rk fb: add fb disp policy for excessive stage Signed-off-by: hjc --- drivers/video/rockchip/rk_fb.c | 13 +++++++++---- include/dt-bindings/rkfb/rk_fb.h | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index c9fc8e212a13..1cdff42d44ef 100644 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -3195,7 +3195,8 @@ int rk_fb_switch_screen(struct rk_screen *screen, int enable, int lcdc_id) if ((rk_fb->disp_mode == ONE_DUAL) || (rk_fb->disp_mode == NO_DUAL)) { if ((dev_drv->ops->backlight_close) && - (rk_fb->disp_policy != DISPLAY_POLICY_BOX)) + (rk_fb->disp_policy != DISPLAY_POLICY_BOX) && + (rk_fb->disp_policy != DISPLAY_POLICY_BOX_TEMP)) dev_drv->ops->backlight_close(dev_drv, 1); if (dev_drv->ops->dsp_black) dev_drv->ops->dsp_black(dev_drv, 1); @@ -3217,7 +3218,8 @@ int rk_fb_switch_screen(struct rk_screen *screen, int enable, int lcdc_id) /* if used one lcdc to dual disp, no need to close win */ if ((rk_fb->disp_mode == ONE_DUAL) || ((rk_fb->disp_mode == NO_DUAL) && - (rk_fb->disp_policy != DISPLAY_POLICY_BOX))) { + (rk_fb->disp_policy != DISPLAY_POLICY_BOX) && + (rk_fb->disp_policy != DISPLAY_POLICY_BOX_TEMP))) { dev_drv->cur_screen = dev_drv->screen0; dev_drv->ops->load_screen(dev_drv, 1); /* force modify dsp size */ @@ -3235,7 +3237,8 @@ int rk_fb_switch_screen(struct rk_screen *screen, int enable, int lcdc_id) /*if (dev_drv->ops->dsp_black) dev_drv->ops->dsp_black(dev_drv, 0);*/ if ((dev_drv->ops->backlight_close) && - (rk_fb->disp_policy != DISPLAY_POLICY_BOX)) + (rk_fb->disp_policy != DISPLAY_POLICY_BOX) && + (rk_fb->disp_policy != DISPLAY_POLICY_BOX_TEMP)) dev_drv->ops->backlight_close(dev_drv, 0); } else if (rk_fb->num_lcdc > 1) { /* If there is more than one lcdc device, we disable @@ -3265,7 +3268,8 @@ int rk_fb_switch_screen(struct rk_screen *screen, int enable, int lcdc_id) dev_drv->cur_screen->y_mirror = dev_drv->rotate_mode & Y_MIRROR; } if ((!dev_drv->uboot_logo) || - (rk_fb->disp_policy != DISPLAY_POLICY_BOX)) { + ((rk_fb->disp_policy != DISPLAY_POLICY_BOX) && + (rk_fb->disp_policy != DISPLAY_POLICY_BOX_TEMP))) { for (i = 0; i < dev_drv->lcdc_win_num; i++) { info = rk_fb->fb[dev_drv->fb_index_base + i]; fb_par = (struct rk_fb_par *)info->par; @@ -3312,6 +3316,7 @@ int rk_fb_switch_screen(struct rk_screen *screen, int enable, int lcdc_id) dev_drv->ops->dsp_black(dev_drv, 0);*/ if ((dev_drv->ops->backlight_close) && (rk_fb->disp_policy != DISPLAY_POLICY_BOX) && + (rk_fb->disp_policy != DISPLAY_POLICY_BOX_TEMP) && (rk_fb->disp_mode == ONE_DUAL)) dev_drv->ops->backlight_close(dev_drv, 0); } diff --git a/include/dt-bindings/rkfb/rk_fb.h b/include/dt-bindings/rkfb/rk_fb.h index 9116f9ad2d4f..e1daff3c1c69 100755 --- a/include/dt-bindings/rkfb/rk_fb.h +++ b/include/dt-bindings/rkfb/rk_fb.h @@ -70,6 +70,7 @@ #define DISPLAY_POLICY_SDK 0 #define DISPLAY_POLICY_BOX 1 +#define DISPLAY_POLICY_BOX_TEMP 2 /* lvds connect config * -- 2.34.1