diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-07-13 12:13:47 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-08-19 08:22:40 +0200 |
commit | 49d79ba2e39b5d3346e9e3ddf894eda72c743c85 (patch) | |
tree | 10669b6abeb57806445bc39e622bded08a8e4414 /drivers/video/sh_mobile_lcdcfb.c | |
parent | fbdev: sh_mobile_lcdc: Split LCDC start code from sh_mobile_lcdc_start (diff) | |
download | linux-49d79ba2e39b5d3346e9e3ddf894eda72c743c85.tar.xz linux-49d79ba2e39b5d3346e9e3ddf894eda72c743c85.zip |
fbdev: sh_mobile_lcdc: Store the frame buffer base address when panning
When the frame buffer base address is changed by a panning operation,
store it in the channel structure. It will be reused when runtime PM
code will use __sh_mobile_lcdc_start().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 292cfc0111e1..69c267a64829 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -915,32 +915,28 @@ static int sh_mobile_fb_pan_display(struct fb_var_screeninfo *var, base_addr_c += 2 * var->xoffset; else base_addr_c += var->xoffset; - } else - base_addr_c = 0; + } - if (!ch->meram_enabled) { - lcdc_write_chan_mirror(ch, LDSA1R, base_addr_y); - if (base_addr_c) - lcdc_write_chan_mirror(ch, LDSA2R, base_addr_c); - } else { + if (ch->meram_enabled) { struct sh_mobile_meram_cfg *cfg; struct sh_mobile_meram_info *mdev; - unsigned long icb_addr_y, icb_addr_c; int ret; cfg = ch->cfg.meram_cfg; mdev = priv->meram_dev; ret = mdev->ops->meram_update(mdev, cfg, base_addr_y, base_addr_c, - &icb_addr_y, &icb_addr_c); + &base_addr_y, &base_addr_c); if (ret) return ret; + } - lcdc_write_chan_mirror(ch, LDSA1R, icb_addr_y); - if (icb_addr_c) - lcdc_write_chan_mirror(ch, LDSA2R, icb_addr_c); + ch->base_addr_y = base_addr_y; + ch->base_addr_c = base_addr_c; - } + lcdc_write_chan_mirror(ch, LDSA1R, base_addr_y); + if (var->nonstd) + lcdc_write_chan_mirror(ch, LDSA2R, base_addr_c); if (lcdc_chan_is_sublcd(ch)) lcdc_write(ch->lcdc, _LDRCNTR, ldrcntr ^ LDRCNTR_SRS); |