aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/plat-samsung/include/plat/fb.h2
-rw-r--r--drivers/video/s3c-fb.c25
2 files changed, 5 insertions, 22 deletions
diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
index 39d6bd7af30..536002ff2ab 100644
--- a/arch/arm/plat-samsung/include/plat/fb.h
+++ b/arch/arm/plat-samsung/include/plat/fb.h
@@ -62,8 +62,6 @@ struct s3c_fb_platdata {
62 struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN]; 62 struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
63 struct fb_videomode *vtiming; 63 struct fb_videomode *vtiming;
64 64
65 u32 default_win;
66
67 u32 vidcon0; 65 u32 vidcon0;
68 u32 vidcon1; 66 u32 vidcon1;
69}; 67};
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index c94f40d2cc2..18c84b8d45b 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -531,7 +531,7 @@ static int s3c_fb_set_par(struct fb_info *info)
531 /* disable the window whilst we update it */ 531 /* disable the window whilst we update it */
532 writel(0, regs + WINCON(win_no)); 532 writel(0, regs + WINCON(win_no));
533 533
534 if (win_no == sfb->pdata->default_win) 534 if (!sfb->output_on)
535 s3c_fb_enable(sfb, 1); 535 s3c_fb_enable(sfb, 1);
536 536
537 /* write the buffer address */ 537 /* write the buffer address */
@@ -799,6 +799,7 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
799 struct s3c_fb *sfb = win->parent; 799 struct s3c_fb *sfb = win->parent;
800 unsigned int index = win->index; 800 unsigned int index = win->index;
801 u32 wincon; 801 u32 wincon;
802 u32 output_on = sfb->output_on;
802 803
803 dev_dbg(sfb->dev, "blank mode %d\n", blank_mode); 804 dev_dbg(sfb->dev, "blank mode %d\n", blank_mode);
804 805
@@ -837,34 +838,18 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
837 838
838 shadow_protect_win(win, 1); 839 shadow_protect_win(win, 1);
839 writel(wincon, sfb->regs + sfb->variant.wincon + (index * 4)); 840 writel(wincon, sfb->regs + sfb->variant.wincon + (index * 4));
840 shadow_protect_win(win, 0);
841 841
842 /* Check the enabled state to see if we need to be running the 842 /* Check the enabled state to see if we need to be running the
843 * main LCD interface, as if there are no active windows then 843 * main LCD interface, as if there are no active windows then
844 * it is highly likely that we also do not need to output 844 * it is highly likely that we also do not need to output
845 * anything. 845 * anything.
846 */ 846 */
847 847 s3c_fb_enable(sfb, sfb->enabled ? 1 : 0);
848 /* We could do something like the following code, but the current 848 shadow_protect_win(win, 0);
849 * system of using framebuffer events means that we cannot make
850 * the distinction between just window 0 being inactive and all
851 * the windows being down.
852 *
853 * s3c_fb_enable(sfb, sfb->enabled ? 1 : 0);
854 */
855
856 /* we're stuck with this until we can do something about overriding
857 * the power control using the blanking event for a single fb.
858 */
859 if (index == sfb->pdata->default_win) {
860 shadow_protect_win(win, 1);
861 s3c_fb_enable(sfb, blank_mode != FB_BLANK_POWERDOWN ? 1 : 0);
862 shadow_protect_win(win, 0);
863 }
864 849
865 pm_runtime_put_sync(sfb->dev); 850 pm_runtime_put_sync(sfb->dev);
866 851
867 return 0; 852 return output_on == sfb->output_on;
868} 853}
869 854
870/** 855/**