]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/blob - arch/arm/mach-tegra/include/mach/fb.h
1d0685003b055d8b6172e3024705eefa8b62fcb5
[sojka/nv-tegra/linux-3.10.git] / arch / arm / mach-tegra / include / mach / fb.h
1 /*
2  * arch/arm/mach-tegra/include/mach/fb.h
3  *
4  * Copyright (C) 2010 Google, Inc.
5  * Author: Erik Gilling <konkers@google.com>
6  *
7  * Copyright (c) 2010-2016, NVIDIA CORPORATION, All rights reserved.
8  *
9  * This software is licensed under the terms of the GNU General Public
10  * License version 2, as published by the Free Software Foundation, and
11  * may be copied, distributed, and modified under those terms.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  */
19
20 #ifndef __MACH_TEGRA_FB_H
21 #define __MACH_TEGRA_FB_H
22
23 #include <linux/fb.h>
24
25 struct platform_device;
26 struct tegra_dc;
27 struct tegra_fb_data;
28 struct tegra_fb_info;
29 struct resource;
30
31 #ifdef CONFIG_FB_TEGRA
32 struct tegra_fb_info *tegra_fb_register(struct platform_device *ndev,
33                                         struct tegra_dc *dc,
34                                         struct tegra_fb_data *fb_data,
35                                         struct resource *fb_mem,
36                                         void *virt_addr);
37 void tegra_fb_unregister(struct tegra_fb_info *fb_info);
38 void tegra_fb_pan_display_reset(struct tegra_fb_info *fb_info);
39 void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info,
40                               struct fb_monspecs *specs,
41                               bool (*mode_filter)(const struct tegra_dc *dc,
42                                                   struct fb_videomode *mode));
43 void tegra_fb_update_fix(struct tegra_fb_info *fb_info,
44                                 struct fb_monspecs *specs);
45 struct fb_var_screeninfo *tegra_fb_get_var(struct tegra_fb_info *fb_info);
46 int tegra_fb_create_sysfs(struct device *dev);
47 void tegra_fb_remove_sysfs(struct device *dev);
48 int tegra_fb_update_modelist(struct tegra_dc *dc, int fblistindex);
49 struct tegra_dc_win *tegra_fb_get_win(struct tegra_fb_info *tegra_fb);
50 struct tegra_dc_win *tegra_fb_get_blank_win(struct tegra_fb_info *tegra_fb);
51 #else
52 static inline struct tegra_fb_info *tegra_fb_register(
53         struct platform_device *ndev, struct tegra_dc *dc,
54         struct tegra_fb_data *fb_data, struct resource *fb_mem)
55 {
56         return NULL;
57 }
58
59 static inline void tegra_fb_unregister(struct tegra_fb_info *fb_info)
60 {
61 }
62
63 static inline void tegra_fb_pan_display_reset(struct tegra_fb_info *fb_info)
64 {
65 }
66
67 static inline void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info,
68                                             struct fb_monspecs *specs,
69                                 bool (*mode_filter)(struct fb_videomode *mode))
70 {
71 }
72
73 static inline void tegra_fb_update_fix(struct tegra_fb_info *fb_info,
74                                         struct fb_monspecs *specs)
75 {
76 }
77
78 static struct fb_var_screeninfo *tegra_fb_get_var(struct tegra_fb_info *fb_info)
79 {
80         return NULL;
81 }
82
83 static inline int tegra_fb_create_sysfs(struct device *dev)
84 {
85         return -ENOENT;
86 }
87
88 static inline void tegra_fb_remove_sysfs(struct device *dev)
89 {
90 }
91
92 static inline struct tegra_dc_win *tegra_fb_get_win(
93                                 struct tegra_fb_info *tegra_fb)
94 {
95         return NULL;
96 }
97
98 static inline struct tegra_dc_win *tegra_fb_get_blank_win(
99                                 struct tegra_fb_info *tegra_fb)
100 {
101         return NULL;
102 }
103 #endif
104 #endif