aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_meram.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-09-19 05:40:31 -0400
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-03-12 17:41:10 -0400
commit762f7cc94bc5c5c8c54f9d0073a07a275b106d89 (patch)
treea16e0f7f6531a443a7817d8c9faa6cb458f7d14a /drivers/video/sh_mobile_meram.c
parent2a618e0333f5d1d27bbd4d90d70f07e0a8dc0ba7 (diff)
fbdev: sh_mobile_meram: Don't inline everything
Let the compiler decide which complex functions to inline, and constify constant static arrays. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/video/sh_mobile_meram.c')
-rw-r--r--drivers/video/sh_mobile_meram.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/video/sh_mobile_meram.c b/drivers/video/sh_mobile_meram.c
index cddb180f8267..0c5b301697e1 100644
--- a/drivers/video/sh_mobile_meram.c
+++ b/drivers/video/sh_mobile_meram.c
@@ -83,14 +83,14 @@
83 83
84#define SH_MOBILE_MERAM_ICB_NUM 32 84#define SH_MOBILE_MERAM_ICB_NUM 32
85 85
86static unsigned long common_regs[] = { 86static const unsigned long common_regs[] = {
87 MEVCR1, 87 MEVCR1,
88 MEQSEL1, 88 MEQSEL1,
89 MEQSEL2, 89 MEQSEL2,
90}; 90};
91#define CMN_REGS_SIZE ARRAY_SIZE(common_regs) 91#define CMN_REGS_SIZE ARRAY_SIZE(common_regs)
92 92
93static unsigned long icb_regs[] = { 93static const unsigned long icb_regs[] = {
94 MExxCTL, 94 MExxCTL,
95 MExxBSIZE, 95 MExxBSIZE,
96 MExxMNCF, 96 MExxMNCF,
@@ -180,8 +180,8 @@ static inline unsigned long meram_read_reg(void __iomem *base, unsigned int off)
180 * check if there's no overlaps in MERAM allocation. 180 * check if there's no overlaps in MERAM allocation.
181 */ 181 */
182 182
183static inline int meram_check_overlap(struct sh_mobile_meram_priv *priv, 183static int meram_check_overlap(struct sh_mobile_meram_priv *priv,
184 const struct sh_mobile_meram_icb_cfg *new) 184 const struct sh_mobile_meram_icb_cfg *new)
185{ 185{
186 unsigned int used_start, used_end, meram_start, meram_end; 186 unsigned int used_start, used_end, meram_start, meram_end;
187 unsigned int i; 187 unsigned int i;
@@ -215,9 +215,9 @@ static inline int meram_check_overlap(struct sh_mobile_meram_priv *priv,
215 * mark the specified ICB as used 215 * mark the specified ICB as used
216 */ 216 */
217 217
218static inline void meram_mark(struct sh_mobile_meram_priv *priv, 218static void meram_mark(struct sh_mobile_meram_priv *priv,
219 const struct sh_mobile_meram_icb_cfg *new, 219 const struct sh_mobile_meram_icb_cfg *new,
220 int pixelformat) 220 int pixelformat)
221{ 221{
222 __set_bit(new->marker_icb, &priv->used_icb); 222 __set_bit(new->marker_icb, &priv->used_icb);
223 __set_bit(new->cache_icb, &priv->used_icb); 223 __set_bit(new->cache_icb, &priv->used_icb);
@@ -234,8 +234,8 @@ static inline void meram_mark(struct sh_mobile_meram_priv *priv,
234 * unmark the specified ICB as used 234 * unmark the specified ICB as used
235 */ 235 */
236 236
237static inline void meram_unmark(struct sh_mobile_meram_priv *priv, 237static void meram_unmark(struct sh_mobile_meram_priv *priv,
238 const struct sh_mobile_meram_icb_cfg *icb) 238 const struct sh_mobile_meram_icb_cfg *icb)
239{ 239{
240 __clear_bit(icb->marker_icb, &priv->used_icb); 240 __clear_bit(icb->marker_icb, &priv->used_icb);
241 __clear_bit(icb->cache_icb, &priv->used_icb); 241 __clear_bit(icb->cache_icb, &priv->used_icb);
@@ -244,7 +244,7 @@ static inline void meram_unmark(struct sh_mobile_meram_priv *priv,
244/* 244/*
245 * is this a YCbCr(NV12, NV16 or NV24) colorspace 245 * is this a YCbCr(NV12, NV16 or NV24) colorspace
246 */ 246 */
247static inline int is_nvcolor(int cspace) 247static int is_nvcolor(int cspace)
248{ 248{
249 if (cspace == SH_MOBILE_MERAM_PF_NV || 249 if (cspace == SH_MOBILE_MERAM_PF_NV ||
250 cspace == SH_MOBILE_MERAM_PF_NV24) 250 cspace == SH_MOBILE_MERAM_PF_NV24)
@@ -255,10 +255,10 @@ static inline int is_nvcolor(int cspace)
255/* 255/*
256 * set the next address to fetch 256 * set the next address to fetch
257 */ 257 */
258static inline void meram_set_next_addr(struct sh_mobile_meram_priv *priv, 258static void meram_set_next_addr(struct sh_mobile_meram_priv *priv,
259 const struct sh_mobile_meram_cfg *cfg, 259 const struct sh_mobile_meram_cfg *cfg,
260 unsigned long base_addr_y, 260 unsigned long base_addr_y,
261 unsigned long base_addr_c) 261 unsigned long base_addr_c)
262{ 262{
263 struct sh_mobile_meram_icb *icb = &priv->icbs[cfg->icb[0].marker_icb]; 263 struct sh_mobile_meram_icb *icb = &priv->icbs[cfg->icb[0].marker_icb];
264 unsigned long target; 264 unsigned long target;
@@ -285,7 +285,7 @@ static inline void meram_set_next_addr(struct sh_mobile_meram_priv *priv,
285/* 285/*
286 * get the next ICB address 286 * get the next ICB address
287 */ 287 */
288static inline void 288static void
289meram_get_next_icb_addr(struct sh_mobile_meram_info *pdata, 289meram_get_next_icb_addr(struct sh_mobile_meram_info *pdata,
290 const struct sh_mobile_meram_cfg *cfg, 290 const struct sh_mobile_meram_cfg *cfg,
291 unsigned long *icb_addr_y, unsigned long *icb_addr_c) 291 unsigned long *icb_addr_y, unsigned long *icb_addr_c)