Skip to content

Commit

Permalink
fbdev: sh_mobile_lcdc: Add support for format changes at runtime
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Laurent Pinchart authored and Florian Tobias Schandinat committed Sep 5, 2011
1 parent 0386219 commit ed5bebf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/video/sh_mobile_lcdcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ed5bebf

Please sign in to comment.