aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_lcdcfb.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-07-13 06:13:47 -0400
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-08-19 02:22:40 -0400
commit49d79ba2e39b5d3346e9e3ddf894eda72c743c85 (patch)
tree10669b6abeb57806445bc39e622bded08a8e4414 /drivers/video/sh_mobile_lcdcfb.c
parent9a217e3444ec0c3a0dba35f7b4221af6671da67b (diff)
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.c22
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,
915 base_addr_c += 2 * var->xoffset; 915 base_addr_c += 2 * var->xoffset;
916 else 916 else
917 base_addr_c += var->xoffset; 917 base_addr_c += var->xoffset;
918 } else 918 }
919 base_addr_c = 0;
920 919
921 if (!ch->meram_enabled) { 920 if (ch->meram_enabled) {
922 lcdc_write_chan_mirror(ch, LDSA1R, base_addr_y);
923 if (base_addr_c)
924 lcdc_write_chan_mirror(ch, LDSA2R, base_addr_c);
925 } else {
926 struct sh_mobile_meram_cfg *cfg; 921 struct sh_mobile_meram_cfg *cfg;
927 struct sh_mobile_meram_info *mdev; 922 struct sh_mobile_meram_info *mdev;
928 unsigned long icb_addr_y, icb_addr_c;
929 int ret; 923 int ret;
930 924
931 cfg = ch->cfg.meram_cfg; 925 cfg = ch->cfg.meram_cfg;
932 mdev = priv->meram_dev; 926 mdev = priv->meram_dev;
933 ret = mdev->ops->meram_update(mdev, cfg, 927 ret = mdev->ops->meram_update(mdev, cfg,
934 base_addr_y, base_addr_c, 928 base_addr_y, base_addr_c,
935 &icb_addr_y, &icb_addr_c); 929 &base_addr_y, &base_addr_c);
936 if (ret) 930 if (ret)
937 return ret; 931 return ret;
932 }
938 933
939 lcdc_write_chan_mirror(ch, LDSA1R, icb_addr_y); 934 ch->base_addr_y = base_addr_y;
940 if (icb_addr_c) 935 ch->base_addr_c = base_addr_c;
941 lcdc_write_chan_mirror(ch, LDSA2R, icb_addr_c);
942 936
943 } 937 lcdc_write_chan_mirror(ch, LDSA1R, base_addr_y);
938 if (var->nonstd)
939 lcdc_write_chan_mirror(ch, LDSA2R, base_addr_c);
944 940
945 if (lcdc_chan_is_sublcd(ch)) 941 if (lcdc_chan_is_sublcd(ch))
946 lcdc_write(ch->lcdc, _LDRCNTR, ldrcntr ^ LDRCNTR_SRS); 942 lcdc_write(ch->lcdc, _LDRCNTR, ldrcntr ^ LDRCNTR_SRS);