blob: ea63e049931c0a6aa19a68b8afa1e2b55d61cb49 [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_
Ben Cheng4b29af02012-03-07 16:14:53 -080014
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>
Ben Cheng4b29af02012-03-07 16:14:53 -080018
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
Ben Cheng4b29af02012-03-07 16:14:53 -080041
Erik Gilling614628b2010-09-08 15:29:08 -070042#define TEGRA_FB_WIN_BLEND_NONE 0
43#define TEGRA_FB_WIN_BLEND_PREMULT 1
44#define TEGRA_FB_WIN_BLEND_COVERAGE 2
Ben Cheng4b29af02012-03-07 16:14:53 -080045
46#define TEGRA_FB_WIN_FLAG_INVERT_H (1<<0)
47#define TEGRA_FB_WIN_FLAG_INVERT_V (1<<1)
48#define TEGRA_FB_WIN_FLAG_TILED (1<<2)
49
Erik Gilling614628b2010-09-08 15:29:08 -070050struct tegra_fb_windowattr {
51 __s32 index;
Rebecca Schultz Zavin45fe7a42010-08-06 19:14:45 -070052 __u32 buff_id;
Michael I. Golda7f976c2011-05-13 15:23:26 -070053 __u32 flags;
Erik Gilling614628b2010-09-08 15:29:08 -070054 __u32 blend;
55 __u32 offset;
Erik Gilling6c57fbf2010-11-18 16:10:50 -080056 __u32 offset_u;
57 __u32 offset_v;
Erik Gilling614628b2010-09-08 15:29:08 -070058 __u32 stride;
Erik Gilling6c57fbf2010-11-18 16:10:50 -080059 __u32 stride_uv;
Erik Gilling614628b2010-09-08 15:29:08 -070060 __u32 pixformat;
61 __u32 x;
62 __u32 y;
63 __u32 w;
64 __u32 h;
65 __u32 out_x;
66 __u32 out_y;
67 __u32 out_w;
68 __u32 out_h;
69 __u32 z;
Rebecca Schultz Zavin45fe7a42010-08-06 19:14:45 -070070 __u32 pre_syncpt_id;
71 __u32 pre_syncpt_val;
Erik Gilling614628b2010-09-08 15:29:08 -070072};
Ben Cheng4b29af02012-03-07 16:14:53 -080073
Erik Gilling614628b2010-09-08 15:29:08 -070074#define TEGRA_FB_FLIP_N_WINDOWS 3
Ben Cheng4b29af02012-03-07 16:14:53 -080075
Erik Gilling614628b2010-09-08 15:29:08 -070076struct tegra_fb_flip_args {
77 struct tegra_fb_windowattr win[TEGRA_FB_FLIP_N_WINDOWS];
Rebecca Schultz Zavin45fe7a42010-08-06 19:14:45 -070078 __u32 post_syncpt_id;
79 __u32 post_syncpt_val;
80};
Ben Cheng4b29af02012-03-07 16:14:53 -080081
Erik Gilling1ec041f2010-10-27 17:43:36 -070082struct tegra_fb_modedb {
83 struct fb_var_screeninfo *modedb;
84 __u32 modedb_len;
85};
Ben Cheng4b29af02012-03-07 16:14:53 -080086
Rebecca Schultz Zavin45fe7a42010-08-06 19:14:45 -070087#define FBIO_TEGRA_SET_NVMAP_FD _IOW('F', 0x40, __u32)
88#define FBIO_TEGRA_FLIP _IOW('F', 0x41, struct tegra_fb_flip_args)
Erik Gilling1ec041f2010-10-27 17:43:36 -070089#define FBIO_TEGRA_GET_MODEDB _IOWR('F', 0x42, struct tegra_fb_modedb)
Ben Cheng4b29af02012-03-07 16:14:53 -080090
Rebecca Schultz Zavin45fe7a42010-08-06 19:14:45 -070091#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080092