summaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_lcdcfb.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-08-31 13:00:54 +0200
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-09-05 16:37:14 +0000
commited5bebf29e82beab3456901e26a495ae0a49ebad (patch)
treeb8d11b2cc49320fa5e44ae0f3278fb048bddc86a /drivers/video/sh_mobile_lcdcfb.c
parent0386219441d48e0f0902e9f145f0d75ad952d753 (diff)
fbdev: sh_mobile_lcdc: Add support for format changes at runtime
Implement .fb_set_par to support frame buffer format changes at runtime. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 33b0ff83c15..f9f420d3c40 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1154,6 +1154,19 @@ static int sh_mobile_check_var(struct fb_var_screeninfo *var, struct fb_info *in
return 0;
}
+static int sh_mobile_set_par(struct fb_info *info)
+{
+ struct sh_mobile_lcdc_chan *ch = info->par;
+ int ret;
+
+ sh_mobile_lcdc_stop(ch->lcdc);
+ ret = sh_mobile_lcdc_start(ch->lcdc);
+ if (ret < 0)
+ dev_err(info->dev, "%s: unable to restart LCDC\n", __func__);
+
+ return ret;
+}
+
/*
* Screen blanking. Behavior is as follows:
* FB_BLANK_UNBLANK: screen unblanked, clocks enabled
@@ -1211,6 +1224,7 @@ static struct fb_ops sh_mobile_lcdc_ops = {
.fb_open = sh_mobile_open,
.fb_release = sh_mobile_release,
.fb_check_var = sh_mobile_check_var,
+ .fb_set_par = sh_mobile_set_par,
};
static int sh_mobile_lcdc_update_bl(struct backlight_device *bdev)