blob: b8e79aeab7ec6941c92894d3b362e7c63eae9c89 [file] [log] [blame]
Rebecca Schultz Zavin45fe7a42010-08-06 19:14:45 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef _LINUX_TEGRAFB_H_
13#define _LINUX_TEGRAFB_H_
14
Erik Gilling1ec041f2010-10-27 17:43:36 -070015#include <linux/fb.h>
Rebecca Schultz Zavin45fe7a42010-08-06 19:14:45 -070016#include <linux/types.h>
17#include <asm/ioctl.h>
18
Erik Gilling614628b2010-09-08 15:29:08 -070019#define TEGRA_FB_WIN_FMT_P1 0
20#define TEGRA_FB_WIN_FMT_P2 1
21#define TEGRA_FB_WIN_FMT_P4 2
22#define TEGRA_FB_WIN_FMT_P8 3
23#define TEGRA_FB_WIN_FMT_B4G4R4A4 4
24#define TEGRA_FB_WIN_FMT_B5G5R5A 5
25#define TEGRA_FB_WIN_FMT_B5G6R5 6
26#define TEGRA_FB_WIN_FMT_AB5G5R5 7
27#define TEGRA_FB_WIN_FMT_B8G8R8A8 12
28#define TEGRA_FB_WIN_FMT_R8G8B8A8 13
29#define TEGRA_FB_WIN_FMT_B6x2G6x2R6x2A8 14
30#define TEGRA_FB_WIN_FMT_R6x2G6x2B6x2A8 15
31#define TEGRA_FB_WIN_FMT_YCbCr422 16
32#define TEGRA_FB_WIN_FMT_YUV422 17
33#define TEGRA_FB_WIN_FMT_YCbCr420P 18
34#define TEGRA_FB_WIN_FMT_YUV420P 19
35#define TEGRA_FB_WIN_FMT_YCbCr422P 20
36#define TEGRA_FB_WIN_FMT_YUV422P 21
37#define TEGRA_FB_WIN_FMT_YCbCr422R 22
38#define TEGRA_FB_WIN_FMT_YUV422R 23
39#define TEGRA_FB_WIN_FMT_YCbCr422RA 24
40#define TEGRA_FB_WIN_FMT_YUV422RA 25
41
42#define TEGRA_FB_WIN_BLEND_NONE 0
43#define TEGRA_FB_WIN_BLEND_PREMULT 1
44#define TEGRA_FB_WIN_BLEND_COVERAGE 2
45
46struct tegra_fb_windowattr {
47 __s32 index;
Rebecca Schultz Zavin45fe7a42010-08-06 19:14:45 -070048 __u32 buff_id;
Erik Gilling614628b2010-09-08 15:29:08 -070049 __u32 blend;
50 __u32 offset;
Erik Gilling6c57fbf2010-11-18 16:10:50 -080051 __u32 offset_u;
52 __u32 offset_v;
Erik Gilling614628b2010-09-08 15:29:08 -070053 __u32 stride;
Erik Gilling6c57fbf2010-11-18 16:10:50 -080054 __u32 stride_uv;
Erik Gilling614628b2010-09-08 15:29:08 -070055 __u32 pixformat;
56 __u32 x;
57 __u32 y;
58 __u32 w;
59 __u32 h;
60 __u32 out_x;
61 __u32 out_y;
62 __u32 out_w;
63 __u32 out_h;
64 __u32 z;
Rebecca Schultz Zavin45fe7a42010-08-06 19:14:45 -070065 __u32 pre_syncpt_id;
66 __u32 pre_syncpt_val;
Erik Gilling614628b2010-09-08 15:29:08 -070067};
68
69#define TEGRA_FB_FLIP_N_WINDOWS 3
70
71struct tegra_fb_flip_args {
72 struct tegra_fb_windowattr win[TEGRA_FB_FLIP_N_WINDOWS];
Rebecca Schultz Zavin45fe7a42010-08-06 19:14:45 -070073 __u32 post_syncpt_id;
74 __u32 post_syncpt_val;
75};
76
Erik Gilling1ec041f2010-10-27 17:43:36 -070077struct tegra_fb_modedb {
78 struct fb_var_screeninfo *modedb;
79 __u32 modedb_len;
80};
81
Rebecca Schultz Zavin45fe7a42010-08-06 19:14:45 -070082#define FBIO_TEGRA_SET_NVMAP_FD _IOW('F', 0x40, __u32)
83#define FBIO_TEGRA_FLIP _IOW('F', 0x41, struct tegra_fb_flip_args)
Erik Gilling1ec041f2010-10-27 17:43:36 -070084#define FBIO_TEGRA_GET_MODEDB _IOWR('F', 0x42, struct tegra_fb_modedb)
Rebecca Schultz Zavin45fe7a42010-08-06 19:14:45 -070085
86#endif
87