diff options
author | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2009-08-07 05:04:26 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2009-12-09 05:04:33 -0500 |
commit | 640f9ca5fd783393c832f6bb5c56368f4d18b820 (patch) | |
tree | 8719e7ed6d05edf3cf106d11fc8b904f26df6c97 /arch | |
parent | afedec183e95bd5e126a7846a644acfdddb86a66 (diff) |
OMAP: Add support for VRFB rotation engine
VRFB rotation engine is a block in OMAP2/3 that offers 12 independent
contexts that can be used for framebuffer rotation.
Each context has a backend area of real memory, where it stores the
pixels in undisclosed format. This memory is offered to users via 4
virtual memory areas, which see the same memory area in different
rotation angles (0, 90, 180 and 270 degrees).
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-omap/include/plat/vrfb.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/vrfb.h b/arch/arm/plat-omap/include/plat/vrfb.h new file mode 100644 index 000000000000..d8a03ced3b10 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/vrfb.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * VRFB Rotation Engine | ||
3 | * | ||
4 | * Copyright (C) 2009 Nokia Corporation | ||
5 | * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __OMAP_VRFB_H__ | ||
22 | #define __OMAP_VRFB_H__ | ||
23 | |||
24 | #define OMAP_VRFB_LINE_LEN 2048 | ||
25 | |||
26 | struct vrfb { | ||
27 | u8 context; | ||
28 | void __iomem *vaddr[4]; | ||
29 | unsigned long paddr[4]; | ||
30 | u16 xres; | ||
31 | u16 yres; | ||
32 | u16 xoffset; | ||
33 | u16 yoffset; | ||
34 | u8 bytespp; | ||
35 | bool yuv_mode; | ||
36 | }; | ||
37 | |||
38 | extern int omap_vrfb_request_ctx(struct vrfb *vrfb); | ||
39 | extern void omap_vrfb_release_ctx(struct vrfb *vrfb); | ||
40 | extern void omap_vrfb_adjust_size(u16 *width, u16 *height, | ||
41 | u8 bytespp); | ||
42 | extern u32 omap_vrfb_min_phys_size(u16 width, u16 height, u8 bytespp); | ||
43 | extern u16 omap_vrfb_max_height(u32 phys_size, u16 width, u8 bytespp); | ||
44 | extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr, | ||
45 | u16 width, u16 height, | ||
46 | unsigned bytespp, bool yuv_mode); | ||
47 | extern int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot); | ||
48 | extern void omap_vrfb_restore_context(void); | ||
49 | |||
50 | #endif /* __VRFB_H */ | ||