aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/s3c2410fb.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index 9451932fbaf2..fbc411850686 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -641,6 +641,7 @@ static int __init s3c2410fb_probe(struct platform_device *pdev)
641 int ret; 641 int ret;
642 int irq; 642 int irq;
643 int i; 643 int i;
644 u32 lcdcon1;
644 645
645 mach_info = pdev->dev.platform_data; 646 mach_info = pdev->dev.platform_data;
646 if (mach_info == NULL) { 647 if (mach_info == NULL) {
@@ -672,6 +673,11 @@ static int __init s3c2410fb_probe(struct platform_device *pdev)
672 673
673 memcpy(&info->regs, &mach_info->regs, sizeof(info->regs)); 674 memcpy(&info->regs, &mach_info->regs, sizeof(info->regs));
674 675
676 /* Stop the video and unset ENVID if set */
677 info->regs.lcdcon1 &= ~S3C2410_LCDCON1_ENVID;
678 lcdcon1 = readl(S3C2410_LCDCON1);
679 writel(lcdcon1 & ~S3C2410_LCDCON1_ENVID, S3C2410_LCDCON1);
680
675 info->mach_info = pdev->dev.platform_data; 681 info->mach_info = pdev->dev.platform_data;
676 682
677 fbinfo->fix.type = FB_TYPE_PACKED_PIXELS; 683 fbinfo->fix.type = FB_TYPE_PACKED_PIXELS;
@@ -794,15 +800,14 @@ dealloc_fb:
794 * shutdown the lcd controller 800 * shutdown the lcd controller
795*/ 801*/
796 802
797static void s3c2410fb_stop_lcd(void) 803static void s3c2410fb_stop_lcd(struct s3c2410fb_info *fbi)
798{ 804{
799 unsigned long flags; 805 unsigned long flags;
800 unsigned long tmp;
801 806
802 local_irq_save(flags); 807 local_irq_save(flags);
803 808
804 tmp = readl(S3C2410_LCDCON1); 809 fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_ENVID;
805 writel(tmp & ~S3C2410_LCDCON1_ENVID, S3C2410_LCDCON1); 810 writel(fbi->regs.lcdcon1, S3C2410_LCDCON1);
806 811
807 local_irq_restore(flags); 812 local_irq_restore(flags);
808} 813}
@@ -816,7 +821,7 @@ static int s3c2410fb_remove(struct platform_device *pdev)
816 struct s3c2410fb_info *info = fbinfo->par; 821 struct s3c2410fb_info *info = fbinfo->par;
817 int irq; 822 int irq;
818 823
819 s3c2410fb_stop_lcd(); 824 s3c2410fb_stop_lcd(info);
820 msleep(1); 825 msleep(1);
821 826
822 s3c2410fb_unmap_video_memory(info); 827 s3c2410fb_unmap_video_memory(info);
@@ -844,7 +849,7 @@ static int s3c2410fb_suspend(struct platform_device *dev, pm_message_t state)
844 struct fb_info *fbinfo = platform_get_drvdata(dev); 849 struct fb_info *fbinfo = platform_get_drvdata(dev);
845 struct s3c2410fb_info *info = fbinfo->par; 850 struct s3c2410fb_info *info = fbinfo->par;
846 851
847 s3c2410fb_stop_lcd(); 852 s3c2410fb_stop_lcd(info);
848 853
849 /* sleep before disabling the clock, we need to ensure 854 /* sleep before disabling the clock, we need to ensure
850 * the LCD DMA engine is not going to get back on the bus 855 * the LCD DMA engine is not going to get back on the bus