diff options
author | Pawel Osciak <p.osciak@samsung.com> | 2010-08-10 21:02:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-11 11:59:12 -0400 |
commit | 04ab9ef97771ba88789672a1f0d0ddcf8dbc0924 (patch) | |
tree | 2cdd3901815caf4a1dd9f2e9d108622068e35269 /drivers/video/s3c-fb.c | |
parent | 8cfdcb2393b05cc80f89ed0110c0f90423d2fee1 (diff) |
s3c-fb: add support for DMA channel control on S5PV210
S5PV210 SoCs allow enabling/disabling DMA channels per window. For a
window to display data from framebuffer memory, its channel has to be
enabled.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/s3c-fb.c')
-rw-r--r-- | drivers/video/s3c-fb.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index a95314ddf709..8ea974dd92c5 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c | |||
@@ -634,6 +634,13 @@ static int s3c_fb_set_par(struct fb_info *info) | |||
634 | writel(data, regs + sfb->variant.wincon + (win_no * 4)); | 634 | writel(data, regs + sfb->variant.wincon + (win_no * 4)); |
635 | writel(0x0, regs + sfb->variant.winmap + (win_no * 4)); | 635 | writel(0x0, regs + sfb->variant.winmap + (win_no * 4)); |
636 | 636 | ||
637 | /* Enable DMA channel for this window */ | ||
638 | if (sfb->variant.has_shadowcon) { | ||
639 | data = readl(sfb->regs + SHADOWCON); | ||
640 | data |= SHADOWCON_CHx_ENABLE(win_no); | ||
641 | writel(data, sfb->regs + SHADOWCON); | ||
642 | } | ||
643 | |||
637 | shadow_protect_win(win, 0); | 644 | shadow_protect_win(win, 0); |
638 | 645 | ||
639 | return 0; | 646 | return 0; |
@@ -1091,7 +1098,15 @@ static void s3c_fb_free_memory(struct s3c_fb *sfb, struct s3c_fb_win *win) | |||
1091 | */ | 1098 | */ |
1092 | static void s3c_fb_release_win(struct s3c_fb *sfb, struct s3c_fb_win *win) | 1099 | static void s3c_fb_release_win(struct s3c_fb *sfb, struct s3c_fb_win *win) |
1093 | { | 1100 | { |
1101 | u32 data; | ||
1102 | |||
1094 | if (win->fbinfo) { | 1103 | if (win->fbinfo) { |
1104 | if (sfb->variant.has_shadowcon) { | ||
1105 | data = readl(sfb->regs + SHADOWCON); | ||
1106 | data &= ~SHADOWCON_CHx_ENABLE(win->index); | ||
1107 | data &= ~SHADOWCON_CHx_LOCAL_ENABLE(win->index); | ||
1108 | writel(data, sfb->regs + SHADOWCON); | ||
1109 | } | ||
1095 | unregister_framebuffer(win->fbinfo); | 1110 | unregister_framebuffer(win->fbinfo); |
1096 | if (win->fbinfo->cmap.len) | 1111 | if (win->fbinfo->cmap.len) |
1097 | fb_dealloc_cmap(&win->fbinfo->cmap); | 1112 | fb_dealloc_cmap(&win->fbinfo->cmap); |