Commit ea465250 authored by Raphael Assenat's avatar Raphael Assenat Committed by Linus Torvalds

[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: default avatarRaphael Assenat <raph@8d.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Acked-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 128806c3
This diff is collapsed.
#ifndef __MBX_FB_H
#define __MBX_FB_H
#include <asm/ioctl.h>
#include <asm/types.h>
struct mbxfb_val {
unsigned int defval;
unsigned int min;
......@@ -25,4 +28,32 @@ struct mbxfb_platform_data {
int (*remove)(struct fb_info *fb);
};
/* planar */
#define MBXFB_FMT_YUV12 0
/* packed */
#define MBXFB_FMT_UY0VY1 1
#define MBXFB_FMT_VY0UY1 2
#define MBXFB_FMT_Y0UY1V 3
#define MBXFB_FMT_Y0VY1U 4
struct mbxfb_overlaySetup {
__u32 enable;
__u32 x, y;
__u32 width, height;
__u32 alpha;
__u32 fmt;
__u32 mem_offset;
__u32 scaled_width;
__u32 scaled_height;
/* Filled by the driver */
__u32 U_offset;
__u32 V_offset;
__u16 Y_stride;
__u16 UV_stride;
};
#define MBXFB_IOCX_OVERLAY _IOWR(0xF4, 0x00,struct mbxfb_overlaySetup)
#endif /* __MBX_FB_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment