2 * include/video/tegrafb.h
4 * Copyright (C) 2010 Google, Inc.
5 * Author: Erik Gilling <konkers@android.com>
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
18 #ifndef _LINUX_TEGRAFB_H_
19 #define _LINUX_TEGRAFB_H_
22 #include <linux/types.h>
23 #include <asm/ioctl.h>
25 #define TEGRA_FB_WIN_FMT_P1 0
26 #define TEGRA_FB_WIN_FMT_P2 1
27 #define TEGRA_FB_WIN_FMT_P4 2
28 #define TEGRA_FB_WIN_FMT_P8 3
29 #define TEGRA_FB_WIN_FMT_B4G4R4A4 4
30 #define TEGRA_FB_WIN_FMT_B5G5R5A 5
31 #define TEGRA_FB_WIN_FMT_B5G6R5 6
32 #define TEGRA_FB_WIN_FMT_AB5G5R5 7
33 #define TEGRA_FB_WIN_FMT_B8G8R8A8 12
34 #define TEGRA_FB_WIN_FMT_R8G8B8A8 13
35 #define TEGRA_FB_WIN_FMT_B6x2G6x2R6x2A8 14
36 #define TEGRA_FB_WIN_FMT_R6x2G6x2B6x2A8 15
37 #define TEGRA_FB_WIN_FMT_YCbCr422 16
38 #define TEGRA_FB_WIN_FMT_YUV422 17
39 #define TEGRA_FB_WIN_FMT_YCbCr420P 18
40 #define TEGRA_FB_WIN_FMT_YUV420P 19
41 #define TEGRA_FB_WIN_FMT_YCbCr422P 20
42 #define TEGRA_FB_WIN_FMT_YUV422P 21
43 #define TEGRA_FB_WIN_FMT_YCbCr422R 22
44 #define TEGRA_FB_WIN_FMT_YUV422R 23
45 #define TEGRA_FB_WIN_FMT_YCbCr422RA 24
46 #define TEGRA_FB_WIN_FMT_YUV422RA 25
48 #define TEGRA_FB_WIN_BLEND_NONE 0
49 #define TEGRA_FB_WIN_BLEND_PREMULT 1
50 #define TEGRA_FB_WIN_BLEND_COVERAGE 2
52 #define TEGRA_FB_WIN_FLAG_INVERT_H (1 << 0)
53 #define TEGRA_FB_WIN_FLAG_INVERT_V (1 << 1)
54 #define TEGRA_FB_WIN_FLAG_TILED (1 << 2)
56 /* set index to -1 to ignore window data */
57 struct tegra_fb_windowattr {
81 #define TEGRA_FB_FLIP_N_WINDOWS 3
83 struct tegra_fb_flip_args {
84 struct tegra_fb_windowattr win[TEGRA_FB_FLIP_N_WINDOWS];
86 __u32 post_syncpt_val;
89 struct tegra_fb_modedb {
90 struct fb_var_screeninfo *modedb;
94 #define FBIO_TEGRA_SET_NVMAP_FD _IOW('F', 0x40, __u32)
95 #define FBIO_TEGRA_FLIP _IOW('F', 0x41, struct tegra_fb_flip_args)
96 #define FBIO_TEGRA_GET_MODEDB _IOWR('F', 0x42, struct tegra_fb_modedb)