0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef __OMAP_VRFB_H__
0010 #define __OMAP_VRFB_H__
0011
0012 #define OMAP_VRFB_LINE_LEN 2048
0013
0014 struct vrfb {
0015 u8 context;
0016 void __iomem *vaddr[4];
0017 unsigned long paddr[4];
0018 u16 xres;
0019 u16 yres;
0020 u16 xoffset;
0021 u16 yoffset;
0022 u8 bytespp;
0023 bool yuv_mode;
0024 };
0025
0026 #ifdef CONFIG_OMAP2_VRFB
0027 extern bool omap_vrfb_supported(void);
0028 extern int omap_vrfb_request_ctx(struct vrfb *vrfb);
0029 extern void omap_vrfb_release_ctx(struct vrfb *vrfb);
0030 extern void omap_vrfb_adjust_size(u16 *width, u16 *height,
0031 u8 bytespp);
0032 extern u32 omap_vrfb_min_phys_size(u16 width, u16 height, u8 bytespp);
0033 extern u16 omap_vrfb_max_height(u32 phys_size, u16 width, u8 bytespp);
0034 extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
0035 u16 width, u16 height,
0036 unsigned bytespp, bool yuv_mode);
0037 extern int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot);
0038 extern void omap_vrfb_restore_context(void);
0039
0040 #else
0041 static inline bool omap_vrfb_supported(void) { return false; }
0042 static inline int omap_vrfb_request_ctx(struct vrfb *vrfb) { return 0; }
0043 static inline void omap_vrfb_release_ctx(struct vrfb *vrfb) {}
0044 static inline void omap_vrfb_adjust_size(u16 *width, u16 *height,
0045 u8 bytespp) {}
0046 static inline u32 omap_vrfb_min_phys_size(u16 width, u16 height, u8 bytespp)
0047 { return 0; }
0048 static inline u16 omap_vrfb_max_height(u32 phys_size, u16 width, u8 bytespp)
0049 { return 0; }
0050 static inline void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr,
0051 u16 width, u16 height, unsigned bytespp, bool yuv_mode) {}
0052 static inline int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot)
0053 { return 0; }
0054 static inline void omap_vrfb_restore_context(void) {}
0055 #endif
0056 #endif