diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-08-17 16:14:01 +0000 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-08-17 16:14:01 +0000 |
commit | 94bd217e2d683719ab21a4ac117d8a1b91cbedc9 (patch) | |
tree | f2d506818cc1643ca816f609518ab5d1cdb28e66 /drivers/video/sh_mobile_meram.h | |
parent | 5dd72f12df00cbabc16de770b79b17ced63138be (diff) | |
parent | 93ee7a9340d64f20295aacc3fb6a22b759323280 (diff) | |
download | op-kernel-dev-94bd217e2d683719ab21a4ac117d8a1b91cbedc9.zip op-kernel-dev-94bd217e2d683719ab21a4ac117d8a1b91cbedc9.tar.gz |
Merge commit 'v3.1-rc2' into HEAD
Diffstat (limited to 'drivers/video/sh_mobile_meram.h')
-rw-r--r-- | drivers/video/sh_mobile_meram.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/video/sh_mobile_meram.h b/drivers/video/sh_mobile_meram.h new file mode 100644 index 0000000..82c54fb --- /dev/null +++ b/drivers/video/sh_mobile_meram.h @@ -0,0 +1,41 @@ +#ifndef __sh_mobile_meram_h__ +#define __sh_mobile_meram_h__ + +#include <linux/mutex.h> +#include <video/sh_mobile_meram.h> + +/* + * MERAM private + */ + +#define MERAM_ICB_Y 0x1 +#define MERAM_ICB_C 0x2 + +/* MERAM cache size */ +#define SH_MOBILE_MERAM_ICB_NUM 32 + +#define SH_MOBILE_MERAM_CACHE_OFFSET(p) ((p) >> 16) +#define SH_MOBILE_MERAM_CACHE_SIZE(p) ((p) & 0xffff) + +struct sh_mobile_meram_priv { + void __iomem *base; + struct mutex lock; + unsigned long used_icb; + int used_meram_cache_regions; + unsigned long used_meram_cache[SH_MOBILE_MERAM_ICB_NUM]; +}; + +int sh_mobile_meram_alloc_icb(const struct sh_mobile_meram_cfg *cfg, + int xres, + int yres, + unsigned int base_addr, + int yuv_mode, + int *marker_icb, + int *out_pitch); + +void sh_mobile_meram_free_icb(int marker_icb); + +#define SH_MOBILE_MERAM_START(ind, ab) \ + (0xC0000000 | ((ab & 0x1) << 23) | ((ind & 0x1F) << 24)) + +#endif /* !__sh_mobile_meram_h__ */ |