aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_lcdcfb.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-03-15 07:40:47 -0400
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-07-18 20:05:21 -0400
commit4a2371772146b30113c9c837eb32b64f18376c0d (patch)
treeefb13c1f047b4a1cc6859fa93f74534d522aeb6a /drivers/video/sh_mobile_lcdcfb.c
parent6fcdbc0c3a683003a00f383fceac80da1b7852ff (diff)
sh_mobile_meram: Rename operations to cache_[alloc|free|update]
The MERAM operations meram_register, meram_unregister and meram_update handle LCDC cache. In preparation for "raw" MERAM allocation, rename them to more appropriate names. 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.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 98e81b31fbc4..e593e8188720 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1104,7 +1104,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
1104 /* Compute frame buffer base address and pitch for each channel. */ 1104 /* Compute frame buffer base address and pitch for each channel. */
1105 for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { 1105 for (k = 0; k < ARRAY_SIZE(priv->ch); k++) {
1106 int pixelformat; 1106 int pixelformat;
1107 void *meram; 1107 void *cache;
1108 1108
1109 ch = &priv->ch[k]; 1109 ch = &priv->ch[k];
1110 if (!ch->enabled) 1110 if (!ch->enabled)
@@ -1119,12 +1119,10 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
1119 ch->cfg->meram_cfg == NULL) 1119 ch->cfg->meram_cfg == NULL)
1120 continue; 1120 continue;
1121 1121
1122 /* we need to de-init configured ICBs before we can 1122 /* Free the allocated MERAM cache. */
1123 * re-initialize them. 1123 if (ch->cache) {
1124 */ 1124 mdev->ops->cache_free(mdev, ch->cache);
1125 if (ch->meram) { 1125 ch->cache = NULL;
1126 mdev->ops->meram_unregister(mdev, ch->meram);
1127 ch->meram = NULL;
1128 } 1126 }
1129 1127
1130 switch (ch->format->fourcc) { 1128 switch (ch->format->fourcc) {
@@ -1146,14 +1144,14 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
1146 break; 1144 break;
1147 } 1145 }
1148 1146
1149 meram = mdev->ops->meram_register(mdev, ch->cfg->meram_cfg, 1147 cache = mdev->ops->cache_alloc(mdev, ch->cfg->meram_cfg,
1150 ch->pitch, ch->yres, pixelformat, 1148 ch->pitch, ch->yres, pixelformat,
1151 &ch->line_size); 1149 &ch->line_size);
1152 if (!IS_ERR(meram)) { 1150 if (!IS_ERR(cache)) {
1153 mdev->ops->meram_update(mdev, meram, 1151 mdev->ops->cache_update(mdev, cache,
1154 ch->base_addr_y, ch->base_addr_c, 1152 ch->base_addr_y, ch->base_addr_c,
1155 &ch->base_addr_y, &ch->base_addr_c); 1153 &ch->base_addr_y, &ch->base_addr_c);
1156 ch->meram = meram; 1154 ch->cache = cache;
1157 } 1155 }
1158 } 1156 }
1159 1157
@@ -1223,12 +1221,12 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
1223 1221
1224 sh_mobile_lcdc_display_off(ch); 1222 sh_mobile_lcdc_display_off(ch);
1225 1223
1226 /* disable the meram */ 1224 /* Free the MERAM cache. */
1227 if (ch->meram) { 1225 if (ch->cache) {
1228 struct sh_mobile_meram_info *mdev; 1226 struct sh_mobile_meram_info *mdev;
1229 mdev = priv->meram_dev; 1227 mdev = priv->meram_dev;
1230 mdev->ops->meram_unregister(mdev, ch->meram); 1228 mdev->ops->cache_free(mdev, ch->cache);
1231 ch->meram = 0; 1229 ch->cache = 0;
1232 } 1230 }
1233 1231
1234 } 1232 }
@@ -1839,11 +1837,11 @@ static int sh_mobile_lcdc_pan(struct fb_var_screeninfo *var,
1839 base_addr_c += var->xoffset; 1837 base_addr_c += var->xoffset;
1840 } 1838 }
1841 1839
1842 if (ch->meram) { 1840 if (ch->cache) {
1843 struct sh_mobile_meram_info *mdev; 1841 struct sh_mobile_meram_info *mdev;
1844 1842
1845 mdev = priv->meram_dev; 1843 mdev = priv->meram_dev;
1846 mdev->ops->meram_update(mdev, ch->meram, 1844 mdev->ops->cache_update(mdev, ch->cache,
1847 base_addr_y, base_addr_c, 1845 base_addr_y, base_addr_c,
1848 &base_addr_y, &base_addr_c); 1846 &base_addr_y, &base_addr_c);
1849 } 1847 }