diff options
author | Raphael Assenat <raph@8d.com> | 2006-12-08 05:40:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:29:06 -0500 |
commit | ea465250d41c99b4ee7dac1e6eb87b7106f7b11e (patch) | |
tree | c9c4d883562b14121390f6736f9ee3e6616d7f57 /include | |
parent | 128806c3b3e263c579af12c061a9b04db3950016 (diff) |
[PATCH] mbxfb: Add YUV video overlay support
This patch adds a way to create and use the video plane (YUV overlay) and
scaling video scaling features of the chip.
The overlay is configured, resized and modified using a device specific
ioctl.
Also included in this patch:
- If no platform data was passed, print an error and exit instead of crashing.
- Added a write_reg(_dly) macro. This improves readability when
manipulating chip registers. (no more udelay() after each write).
- Comments about some issues.
Signed-off-by: Raphael Assenat <raph@8d.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/video/mbxfb.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/video/mbxfb.h b/include/video/mbxfb.h index 3bde0f5cd55c..20b9002712ef 100644 --- a/include/video/mbxfb.h +++ b/include/video/mbxfb.h | |||
@@ -1,6 +1,9 @@ | |||
1 | #ifndef __MBX_FB_H | 1 | #ifndef __MBX_FB_H |
2 | #define __MBX_FB_H | 2 | #define __MBX_FB_H |
3 | 3 | ||
4 | #include <asm/ioctl.h> | ||
5 | #include <asm/types.h> | ||
6 | |||
4 | struct mbxfb_val { | 7 | struct mbxfb_val { |
5 | unsigned int defval; | 8 | unsigned int defval; |
6 | unsigned int min; | 9 | unsigned int min; |
@@ -25,4 +28,32 @@ struct mbxfb_platform_data { | |||
25 | int (*remove)(struct fb_info *fb); | 28 | int (*remove)(struct fb_info *fb); |
26 | }; | 29 | }; |
27 | 30 | ||
31 | /* planar */ | ||
32 | #define MBXFB_FMT_YUV12 0 | ||
33 | |||
34 | /* packed */ | ||
35 | #define MBXFB_FMT_UY0VY1 1 | ||
36 | #define MBXFB_FMT_VY0UY1 2 | ||
37 | #define MBXFB_FMT_Y0UY1V 3 | ||
38 | #define MBXFB_FMT_Y0VY1U 4 | ||
39 | struct mbxfb_overlaySetup { | ||
40 | __u32 enable; | ||
41 | __u32 x, y; | ||
42 | __u32 width, height; | ||
43 | __u32 alpha; | ||
44 | __u32 fmt; | ||
45 | __u32 mem_offset; | ||
46 | __u32 scaled_width; | ||
47 | __u32 scaled_height; | ||
48 | |||
49 | /* Filled by the driver */ | ||
50 | __u32 U_offset; | ||
51 | __u32 V_offset; | ||
52 | |||
53 | __u16 Y_stride; | ||
54 | __u16 UV_stride; | ||
55 | }; | ||
56 | |||
57 | #define MBXFB_IOCX_OVERLAY _IOWR(0xF4, 0x00,struct mbxfb_overlaySetup) | ||
58 | |||
28 | #endif /* __MBX_FB_H */ | 59 | #endif /* __MBX_FB_H */ |