Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208503
b: refs/heads/master
c: 04ab9ef
h: refs/heads/master
i:
  208501: 0dd7112
  208499: 9a398e4
  208495: 7871046
v: v3
  • Loading branch information
Pawel Osciak authored and Linus Torvalds committed Aug 11, 2010
1 parent 111aa39 commit 47591f6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8cfdcb2393b05cc80f89ed0110c0f90423d2fee1
refs/heads/master: 04ab9ef97771ba88789672a1f0d0ddcf8dbc0924
4 changes: 4 additions & 0 deletions trunk/arch/arm/plat-samsung/include/plat/regs-fb.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@
/* S5PV210 */
#define SHADOWCON (0x34)
#define SHADOWCON_WINx_PROTECT(_win) (1 << (10 + (_win)))
/* DMA channels (all windows) */
#define SHADOWCON_CHx_ENABLE(_win) (1 << (_win))
/* Local input channels (windows 0-2) */
#define SHADOWCON_CHx_LOCAL_ENABLE(_win) (1 << (5 + (_win)))

#define VIDOSDxA_TOPLEFT_X_MASK (0x7ff << 11)
#define VIDOSDxA_TOPLEFT_X_SHIFT (11)
Expand Down
15 changes: 15 additions & 0 deletions trunk/drivers/video/s3c-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 47591f6

Please sign in to comment.