diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-08-31 07:00:54 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-09-05 12:37:14 -0400 |
commit | ed5bebf29e82beab3456901e26a495ae0a49ebad (patch) | |
tree | b8d11b2cc49320fa5e44ae0f3278fb048bddc86a | |
parent | 0386219441d48e0f0902e9f145f0d75ad952d753 (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>
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 14 |
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 | |||
1154 | return 0; | 1154 | return 0; |
1155 | } | 1155 | } |
1156 | 1156 | ||
1157 | static int sh_mobile_set_par(struct fb_info *info) | ||
1158 | { | ||
1159 | struct sh_mobile_lcdc_chan *ch = info->par; | ||
1160 | int ret; | ||
1161 | |||
1162 | sh_mobile_lcdc_stop(ch->lcdc); | ||
1163 | ret = sh_mobile_lcdc_start(ch->lcdc); | ||
1164 | if (ret < 0) | ||
1165 | dev_err(info->dev, "%s: unable to restart LCDC\n", __func__); | ||
1166 | |||
1167 | return ret; | ||
1168 | } | ||
1169 | |||
1157 | /* | 1170 | /* |
1158 | * Screen blanking. Behavior is as follows: | 1171 | * Screen blanking. Behavior is as follows: |
1159 | * FB_BLANK_UNBLANK: screen unblanked, clocks enabled | 1172 | * FB_BLANK_UNBLANK: screen unblanked, clocks enabled |
@@ -1211,6 +1224,7 @@ static struct fb_ops sh_mobile_lcdc_ops = { | |||
1211 | .fb_open = sh_mobile_open, | 1224 | .fb_open = sh_mobile_open, |
1212 | .fb_release = sh_mobile_release, | 1225 | .fb_release = sh_mobile_release, |
1213 | .fb_check_var = sh_mobile_check_var, | 1226 | .fb_check_var = sh_mobile_check_var, |
1227 | .fb_set_par = sh_mobile_set_par, | ||
1214 | }; | 1228 | }; |
1215 | 1229 | ||
1216 | static int sh_mobile_lcdc_update_bl(struct backlight_device *bdev) | 1230 | static int sh_mobile_lcdc_update_bl(struct backlight_device *bdev) |