mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Cc: InKi Dae <[email protected]> Cc: Ben Dooks <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
8cfdcb2393
commit
04ab9ef977
2 changed files with 19 additions and 0 deletions
|
|
@ -634,6 +634,13 @@ static int s3c_fb_set_par(struct fb_info *info)
|
|||
writel(data, regs + sfb->variant.wincon + (win_no * 4));
|
||||
writel(0x0, regs + sfb->variant.winmap + (win_no * 4));
|
||||
|
||||
/* Enable DMA channel for this window */
|
||||
if (sfb->variant.has_shadowcon) {
|
||||
data = readl(sfb->regs + SHADOWCON);
|
||||
data |= SHADOWCON_CHx_ENABLE(win_no);
|
||||
writel(data, sfb->regs + SHADOWCON);
|
||||
}
|
||||
|
||||
shadow_protect_win(win, 0);
|
||||
|
||||
return 0;
|
||||
|
|
@ -1091,7 +1098,15 @@ static void s3c_fb_free_memory(struct s3c_fb *sfb, struct s3c_fb_win *win)
|
|||
*/
|
||||
static void s3c_fb_release_win(struct s3c_fb *sfb, struct s3c_fb_win *win)
|
||||
{
|
||||
u32 data;
|
||||
|
||||
if (win->fbinfo) {
|
||||
if (sfb->variant.has_shadowcon) {
|
||||
data = readl(sfb->regs + SHADOWCON);
|
||||
data &= ~SHADOWCON_CHx_ENABLE(win->index);
|
||||
data &= ~SHADOWCON_CHx_LOCAL_ENABLE(win->index);
|
||||
writel(data, sfb->regs + SHADOWCON);
|
||||
}
|
||||
unregister_framebuffer(win->fbinfo);
|
||||
if (win->fbinfo->cmap.len)
|
||||
fb_dealloc_cmap(&win->fbinfo->cmap);
|
||||
|
|
|
|||
Loading…
Reference in a new issue