X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Fvideo%2Fsh_mobile_meram.h;h=062e6e7f955c42ebfc8d8d98bfc17e8e2755d031;hb=587a9e1f95794c05419d3bdb4c409a3274849f93;hp=29b2fd3b147e8773cadcd08f5f107fad0d7a7000;hpb=277b5fb35b770792f89fbe50df03daddb3fa9521;p=~andy%2Flinux diff --git a/include/video/sh_mobile_meram.h b/include/video/sh_mobile_meram.h index 29b2fd3b147..062e6e7f955 100644 --- a/include/video/sh_mobile_meram.h +++ b/include/video/sh_mobile_meram.h @@ -15,7 +15,6 @@ enum { struct sh_mobile_meram_priv; -struct sh_mobile_meram_ops; /* * struct sh_mobile_meram_info - MERAM platform data @@ -24,7 +23,6 @@ struct sh_mobile_meram_ops; struct sh_mobile_meram_info { int addr_mode; u32 reserved_icbs; - struct sh_mobile_meram_ops *ops; struct sh_mobile_meram_priv *priv; struct platform_device *pdev; }; @@ -38,26 +36,59 @@ struct sh_mobile_meram_cfg { struct sh_mobile_meram_icb_cfg icb[2]; }; -struct module; -struct sh_mobile_meram_ops { - struct module *module; - /* register usage of meram */ - void *(*meram_register)(struct sh_mobile_meram_info *meram_dev, - const struct sh_mobile_meram_cfg *cfg, - unsigned int xres, unsigned int yres, - unsigned int pixelformat, - unsigned int *pitch); - - /* unregister usage of meram */ - void (*meram_unregister)(struct sh_mobile_meram_info *meram_dev, - void *data); - - /* update meram settings */ - void (*meram_update)(struct sh_mobile_meram_info *meram_dev, void *data, +#if defined(CONFIG_FB_SH_MOBILE_MERAM) || \ + defined(CONFIG_FB_SH_MOBILE_MERAM_MODULE) +unsigned long sh_mobile_meram_alloc(struct sh_mobile_meram_info *meram_dev, + size_t size); +void sh_mobile_meram_free(struct sh_mobile_meram_info *meram_dev, + unsigned long mem, size_t size); +void *sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev, + const struct sh_mobile_meram_cfg *cfg, + unsigned int xres, unsigned int yres, + unsigned int pixelformat, + unsigned int *pitch); +void sh_mobile_meram_cache_free(struct sh_mobile_meram_info *dev, void *data); +void sh_mobile_meram_cache_update(struct sh_mobile_meram_info *dev, void *data, + unsigned long base_addr_y, + unsigned long base_addr_c, + unsigned long *icb_addr_y, + unsigned long *icb_addr_c); +#else +static inline unsigned long +sh_mobile_meram_alloc(struct sh_mobile_meram_info *meram_dev, size_t size) +{ + return 0; +} + +static inline void +sh_mobile_meram_free(struct sh_mobile_meram_info *meram_dev, + unsigned long mem, size_t size) +{ +} + +static inline void * +sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev, + const struct sh_mobile_meram_cfg *cfg, + unsigned int xres, unsigned int yres, + unsigned int pixelformat, + unsigned int *pitch) +{ + return ERR_PTR(-ENODEV); +} + +static inline void +sh_mobile_meram_cache_free(struct sh_mobile_meram_info *dev, void *data) +{ +} + +static inline void +sh_mobile_meram_cache_update(struct sh_mobile_meram_info *dev, void *data, unsigned long base_addr_y, unsigned long base_addr_c, unsigned long *icb_addr_y, - unsigned long *icb_addr_c); -}; + unsigned long *icb_addr_c) +{ +} +#endif #endif /* __VIDEO_SH_MOBILE_MERAM_H__ */