Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30304
b: refs/heads/master
c: 6931a76
h: refs/heads/master
v: v3
  • Loading branch information
Arnaud Patard authored and Linus Torvalds committed Jun 26, 2006
1 parent 63605b5 commit 089487f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c72755b3bdcf551dcfb1d061c8f09fc243e28f49
refs/heads/master: 6931a764e1cff26c59be23fbde94cd51fe96bf42
17 changes: 11 additions & 6 deletions trunk/drivers/video/s3c2410fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ static int __init s3c2410fb_probe(struct platform_device *pdev)
int ret;
int irq;
int i;
u32 lcdcon1;

mach_info = pdev->dev.platform_data;
if (mach_info == NULL) {
Expand Down Expand Up @@ -672,6 +673,11 @@ static int __init s3c2410fb_probe(struct platform_device *pdev)

memcpy(&info->regs, &mach_info->regs, sizeof(info->regs));

/* Stop the video and unset ENVID if set */
info->regs.lcdcon1 &= ~S3C2410_LCDCON1_ENVID;
lcdcon1 = readl(S3C2410_LCDCON1);
writel(lcdcon1 & ~S3C2410_LCDCON1_ENVID, S3C2410_LCDCON1);

info->mach_info = pdev->dev.platform_data;

fbinfo->fix.type = FB_TYPE_PACKED_PIXELS;
Expand Down Expand Up @@ -794,15 +800,14 @@ static int __init s3c2410fb_probe(struct platform_device *pdev)
* shutdown the lcd controller
*/

static void s3c2410fb_stop_lcd(void)
static void s3c2410fb_stop_lcd(struct s3c2410fb_info *fbi)
{
unsigned long flags;
unsigned long tmp;

local_irq_save(flags);

tmp = readl(S3C2410_LCDCON1);
writel(tmp & ~S3C2410_LCDCON1_ENVID, S3C2410_LCDCON1);
fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_ENVID;
writel(fbi->regs.lcdcon1, S3C2410_LCDCON1);

local_irq_restore(flags);
}
Expand All @@ -816,7 +821,7 @@ static int s3c2410fb_remove(struct platform_device *pdev)
struct s3c2410fb_info *info = fbinfo->par;
int irq;

s3c2410fb_stop_lcd();
s3c2410fb_stop_lcd(info);
msleep(1);

s3c2410fb_unmap_video_memory(info);
Expand Down Expand Up @@ -844,7 +849,7 @@ static int s3c2410fb_suspend(struct platform_device *dev, pm_message_t state)
struct fb_info *fbinfo = platform_get_drvdata(dev);
struct s3c2410fb_info *info = fbinfo->par;

s3c2410fb_stop_lcd();
s3c2410fb_stop_lcd(info);

/* sleep before disabling the clock, we need to ensure
* the LCD DMA engine is not going to get back on the bus
Expand Down

0 comments on commit 089487f

Please sign in to comment.