diff options
author | InKi Dae <inki.dae@samsung.com> | 2010-08-10 21:02:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-11 11:59:09 -0400 |
commit | ad04490a171915737c9b99d2fa5cb813830f24c1 (patch) | |
tree | be12ab706d2f68be30d8169ffaa2c5f3f8616fca | |
parent | 45649fdb54c2e3feb59a8648608ed601511f2098 (diff) |
s3c-fb: add default window feature.
s5pv210 has five window layers (window0 ~ 4), among them, window0 ~ 2
could be used for local path with fimc(capture device) and fimd writeback
feature so this patch makes default window layer for UI to be set at
machine code.
Signed-off-by: InKi Dae <inki.dae@samsung.com>
Reviewed-by: KyungMin Park <kyungmin.park.samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/arm/plat-samsung/include/plat/fb.h | 3 | ||||
-rw-r--r-- | drivers/video/s3c-fb.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h index 27d3b497b55b..cb3ca3adc685 100644 --- a/arch/arm/plat-samsung/include/plat/fb.h +++ b/arch/arm/plat-samsung/include/plat/fb.h | |||
@@ -42,6 +42,7 @@ struct s3c_fb_pd_win { | |||
42 | * @setup_gpio: Setup the external GPIO pins to the right state to transfer | 42 | * @setup_gpio: Setup the external GPIO pins to the right state to transfer |
43 | * the data from the display system to the connected display | 43 | * the data from the display system to the connected display |
44 | * device. | 44 | * device. |
45 | * @default_win: default window layer number to be used for UI layer. | ||
45 | * @vidcon0: The base vidcon0 values to control the panel data format. | 46 | * @vidcon0: The base vidcon0 values to control the panel data format. |
46 | * @vidcon1: The base vidcon1 values to control the panel data output. | 47 | * @vidcon1: The base vidcon1 values to control the panel data output. |
47 | * @win: The setup data for each hardware window, or NULL for unused. | 48 | * @win: The setup data for each hardware window, or NULL for unused. |
@@ -58,6 +59,8 @@ struct s3c_fb_platdata { | |||
58 | 59 | ||
59 | struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN]; | 60 | struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN]; |
60 | 61 | ||
62 | u32 default_win; | ||
63 | |||
61 | u32 vidcon0; | 64 | u32 vidcon0; |
62 | u32 vidcon1; | 65 | u32 vidcon1; |
63 | }; | 66 | }; |
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 9682ecc60e12..c4639c4e62f2 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c | |||
@@ -300,9 +300,9 @@ static int s3c_fb_set_par(struct fb_info *info) | |||
300 | /* disable the window whilst we update it */ | 300 | /* disable the window whilst we update it */ |
301 | writel(0, regs + WINCON(win_no)); | 301 | writel(0, regs + WINCON(win_no)); |
302 | 302 | ||
303 | /* use window 0 as the basis for the lcd output timings */ | 303 | /* use platform specified window as the basis for the lcd timings */ |
304 | 304 | ||
305 | if (win_no == 0) { | 305 | if (win_no == sfb->pdata->default_win) { |
306 | clkdiv = s3c_fb_calc_pixclk(sfb, var->pixclock); | 306 | clkdiv = s3c_fb_calc_pixclk(sfb, var->pixclock); |
307 | 307 | ||
308 | data = sfb->pdata->vidcon0; | 308 | data = sfb->pdata->vidcon0; |
@@ -636,7 +636,7 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info) | |||
636 | /* we're stuck with this until we can do something about overriding | 636 | /* we're stuck with this until we can do something about overriding |
637 | * the power control using the blanking event for a single fb. | 637 | * the power control using the blanking event for a single fb. |
638 | */ | 638 | */ |
639 | if (index == 0) | 639 | if (index == sfb->pdata->default_win) |
640 | s3c_fb_enable(sfb, blank_mode != FB_BLANK_POWERDOWN ? 1 : 0); | 640 | s3c_fb_enable(sfb, blank_mode != FB_BLANK_POWERDOWN ? 1 : 0); |
641 | 641 | ||
642 | return 0; | 642 | return 0; |