video: s3c-fb: remove 'default_win' element from platform data
The decision to enable or disable the data output to the lcd panel from the controller need not be based on the value of 'default_win' element in the platform data. Instead, the data output to the panel is enabled if any of the windows are active, else data output is disabled. Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
This commit is contained in:
parent
a4196febbe
commit
3c582647a9
@ -62,8 +62,6 @@ struct s3c_fb_platdata {
|
|||||||
struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
|
struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
|
||||||
struct fb_videomode *vtiming;
|
struct fb_videomode *vtiming;
|
||||||
|
|
||||||
u32 default_win;
|
|
||||||
|
|
||||||
u32 vidcon0;
|
u32 vidcon0;
|
||||||
u32 vidcon1;
|
u32 vidcon1;
|
||||||
};
|
};
|
||||||
|
@ -531,7 +531,7 @@ static int s3c_fb_set_par(struct fb_info *info)
|
|||||||
/* disable the window whilst we update it */
|
/* disable the window whilst we update it */
|
||||||
writel(0, regs + WINCON(win_no));
|
writel(0, regs + WINCON(win_no));
|
||||||
|
|
||||||
if (win_no == sfb->pdata->default_win)
|
if (!sfb->output_on)
|
||||||
s3c_fb_enable(sfb, 1);
|
s3c_fb_enable(sfb, 1);
|
||||||
|
|
||||||
/* write the buffer address */
|
/* write the buffer address */
|
||||||
@ -799,6 +799,7 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
|
|||||||
struct s3c_fb *sfb = win->parent;
|
struct s3c_fb *sfb = win->parent;
|
||||||
unsigned int index = win->index;
|
unsigned int index = win->index;
|
||||||
u32 wincon;
|
u32 wincon;
|
||||||
|
u32 output_on = sfb->output_on;
|
||||||
|
|
||||||
dev_dbg(sfb->dev, "blank mode %d\n", blank_mode);
|
dev_dbg(sfb->dev, "blank mode %d\n", blank_mode);
|
||||||
|
|
||||||
@ -837,34 +838,18 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info)
|
|||||||
|
|
||||||
shadow_protect_win(win, 1);
|
shadow_protect_win(win, 1);
|
||||||
writel(wincon, sfb->regs + sfb->variant.wincon + (index * 4));
|
writel(wincon, sfb->regs + sfb->variant.wincon + (index * 4));
|
||||||
shadow_protect_win(win, 0);
|
|
||||||
|
|
||||||
/* Check the enabled state to see if we need to be running the
|
/* Check the enabled state to see if we need to be running the
|
||||||
* main LCD interface, as if there are no active windows then
|
* main LCD interface, as if there are no active windows then
|
||||||
* it is highly likely that we also do not need to output
|
* it is highly likely that we also do not need to output
|
||||||
* anything.
|
* anything.
|
||||||
*/
|
*/
|
||||||
|
s3c_fb_enable(sfb, sfb->enabled ? 1 : 0);
|
||||||
/* We could do something like the following code, but the current
|
shadow_protect_win(win, 0);
|
||||||
* system of using framebuffer events means that we cannot make
|
|
||||||
* the distinction between just window 0 being inactive and all
|
|
||||||
* the windows being down.
|
|
||||||
*
|
|
||||||
* s3c_fb_enable(sfb, sfb->enabled ? 1 : 0);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* we're stuck with this until we can do something about overriding
|
|
||||||
* the power control using the blanking event for a single fb.
|
|
||||||
*/
|
|
||||||
if (index == sfb->pdata->default_win) {
|
|
||||||
shadow_protect_win(win, 1);
|
|
||||||
s3c_fb_enable(sfb, blank_mode != FB_BLANK_POWERDOWN ? 1 : 0);
|
|
||||||
shadow_protect_win(win, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
pm_runtime_put_sync(sfb->dev);
|
pm_runtime_put_sync(sfb->dev);
|
||||||
|
|
||||||
return 0;
|
return output_on == sfb->output_on;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user