diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/platform_data/video-vt8500lcdfb.h | 31 | ||||
-rw-r--r-- | include/linux/platform_data/video_s3c.h | 54 | ||||
-rw-r--r-- | include/video/auo_k190xfb.h | 3 | ||||
-rw-r--r-- | include/video/display_timing.h | 57 | ||||
-rw-r--r-- | include/video/videomode.h | 18 |
5 files changed, 87 insertions, 76 deletions
diff --git a/include/linux/platform_data/video-vt8500lcdfb.h b/include/linux/platform_data/video-vt8500lcdfb.h deleted file mode 100644 index 7f399c370fe0..000000000000 --- a/include/linux/platform_data/video-vt8500lcdfb.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * VT8500/WM8505 Frame Buffer platform data definitions | ||
3 | * | ||
4 | * Copyright (C) 2010 Ed Spiridonov <edo.rus@gmail.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | */ | ||
15 | |||
16 | #ifndef _VT8500FB_H | ||
17 | #define _VT8500FB_H | ||
18 | |||
19 | #include <linux/fb.h> | ||
20 | |||
21 | struct vt8500fb_platform_data { | ||
22 | struct fb_videomode mode; | ||
23 | u32 xres_virtual; | ||
24 | u32 yres_virtual; | ||
25 | u32 bpp; | ||
26 | unsigned long video_mem_phys; | ||
27 | void *video_mem_virt; | ||
28 | unsigned long video_mem_len; | ||
29 | }; | ||
30 | |||
31 | #endif /* _VT8500FB_H */ | ||
diff --git a/include/linux/platform_data/video_s3c.h b/include/linux/platform_data/video_s3c.h new file mode 100644 index 000000000000..48883995f47f --- /dev/null +++ b/include/linux/platform_data/video_s3c.h | |||
@@ -0,0 +1,54 @@ | |||
1 | #ifndef __PLATFORM_DATA_VIDEO_S3C | ||
2 | #define __PLATFORM_DATA_VIDEO_S3C | ||
3 | |||
4 | /* S3C_FB_MAX_WIN | ||
5 | * Set to the maximum number of windows that any of the supported hardware | ||
6 | * can use. Since the platform data uses this for an array size, having it | ||
7 | * set to the maximum of any version of the hardware can do is safe. | ||
8 | */ | ||
9 | #define S3C_FB_MAX_WIN (5) | ||
10 | |||
11 | /** | ||
12 | * struct s3c_fb_pd_win - per window setup data | ||
13 | * @xres : The window X size. | ||
14 | * @yres : The window Y size. | ||
15 | * @virtual_x: The virtual X size. | ||
16 | * @virtual_y: The virtual Y size. | ||
17 | */ | ||
18 | struct s3c_fb_pd_win { | ||
19 | unsigned short default_bpp; | ||
20 | unsigned short max_bpp; | ||
21 | unsigned short xres; | ||
22 | unsigned short yres; | ||
23 | unsigned short virtual_x; | ||
24 | unsigned short virtual_y; | ||
25 | }; | ||
26 | |||
27 | /** | ||
28 | * struct s3c_fb_platdata - S3C driver platform specific information | ||
29 | * @setup_gpio: Setup the external GPIO pins to the right state to transfer | ||
30 | * the data from the display system to the connected display | ||
31 | * device. | ||
32 | * @vidcon0: The base vidcon0 values to control the panel data format. | ||
33 | * @vidcon1: The base vidcon1 values to control the panel data output. | ||
34 | * @vtiming: Video timing when connected to a RGB type panel. | ||
35 | * @win: The setup data for each hardware window, or NULL for unused. | ||
36 | * @display_mode: The LCD output display mode. | ||
37 | * | ||
38 | * The platform data supplies the video driver with all the information | ||
39 | * it requires to work with the display(s) attached to the machine. It | ||
40 | * controls the initial mode, the number of display windows (0 is always | ||
41 | * the base framebuffer) that are initialised etc. | ||
42 | * | ||
43 | */ | ||
44 | struct s3c_fb_platdata { | ||
45 | void (*setup_gpio)(void); | ||
46 | |||
47 | struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN]; | ||
48 | struct fb_videomode *vtiming; | ||
49 | |||
50 | u32 vidcon0; | ||
51 | u32 vidcon1; | ||
52 | }; | ||
53 | |||
54 | #endif | ||
diff --git a/include/video/auo_k190xfb.h b/include/video/auo_k190xfb.h index 609efe8c686e..ac329ee1d753 100644 --- a/include/video/auo_k190xfb.h +++ b/include/video/auo_k190xfb.h | |||
@@ -22,6 +22,8 @@ | |||
22 | */ | 22 | */ |
23 | #define AUOK190X_RESOLUTION_800_600 0 | 23 | #define AUOK190X_RESOLUTION_800_600 0 |
24 | #define AUOK190X_RESOLUTION_1024_768 1 | 24 | #define AUOK190X_RESOLUTION_1024_768 1 |
25 | #define AUOK190X_RESOLUTION_600_800 4 | ||
26 | #define AUOK190X_RESOLUTION_768_1024 5 | ||
25 | 27 | ||
26 | /* | 28 | /* |
27 | * struct used by auok190x. board specific stuff comes from *board | 29 | * struct used by auok190x. board specific stuff comes from *board |
@@ -98,7 +100,6 @@ struct auok190x_board { | |||
98 | int gpio_nbusy; | 100 | int gpio_nbusy; |
99 | 101 | ||
100 | int resolution; | 102 | int resolution; |
101 | int rotation; | ||
102 | int quirks; | 103 | int quirks; |
103 | int fps; | 104 | int fps; |
104 | }; | 105 | }; |
diff --git a/include/video/display_timing.h b/include/video/display_timing.h index 71e9a383a981..5d0259b08e01 100644 --- a/include/video/display_timing.h +++ b/include/video/display_timing.h | |||
@@ -12,19 +12,22 @@ | |||
12 | #include <linux/bitops.h> | 12 | #include <linux/bitops.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | 14 | ||
15 | /* VESA display monitor timing parameters */ | 15 | enum display_flags { |
16 | #define VESA_DMT_HSYNC_LOW BIT(0) | 16 | DISPLAY_FLAGS_HSYNC_LOW = BIT(0), |
17 | #define VESA_DMT_HSYNC_HIGH BIT(1) | 17 | DISPLAY_FLAGS_HSYNC_HIGH = BIT(1), |
18 | #define VESA_DMT_VSYNC_LOW BIT(2) | 18 | DISPLAY_FLAGS_VSYNC_LOW = BIT(2), |
19 | #define VESA_DMT_VSYNC_HIGH BIT(3) | 19 | DISPLAY_FLAGS_VSYNC_HIGH = BIT(3), |
20 | 20 | ||
21 | /* display specific flags */ | 21 | /* data enable flag */ |
22 | #define DISPLAY_FLAGS_DE_LOW BIT(0) /* data enable flag */ | 22 | DISPLAY_FLAGS_DE_LOW = BIT(4), |
23 | #define DISPLAY_FLAGS_DE_HIGH BIT(1) | 23 | DISPLAY_FLAGS_DE_HIGH = BIT(5), |
24 | #define DISPLAY_FLAGS_PIXDATA_POSEDGE BIT(2) /* drive data on pos. edge */ | 24 | /* drive data on pos. edge */ |
25 | #define DISPLAY_FLAGS_PIXDATA_NEGEDGE BIT(3) /* drive data on neg. edge */ | 25 | DISPLAY_FLAGS_PIXDATA_POSEDGE = BIT(6), |
26 | #define DISPLAY_FLAGS_INTERLACED BIT(4) | 26 | /* drive data on neg. edge */ |
27 | #define DISPLAY_FLAGS_DOUBLESCAN BIT(5) | 27 | DISPLAY_FLAGS_PIXDATA_NEGEDGE = BIT(7), |
28 | DISPLAY_FLAGS_INTERLACED = BIT(8), | ||
29 | DISPLAY_FLAGS_DOUBLESCAN = BIT(9), | ||
30 | }; | ||
28 | 31 | ||
29 | /* | 32 | /* |
30 | * A single signal can be specified via a range of minimal and maximal values | 33 | * A single signal can be specified via a range of minimal and maximal values |
@@ -36,12 +39,6 @@ struct timing_entry { | |||
36 | u32 max; | 39 | u32 max; |
37 | }; | 40 | }; |
38 | 41 | ||
39 | enum timing_entry_index { | ||
40 | TE_MIN = 0, | ||
41 | TE_TYP = 1, | ||
42 | TE_MAX = 2, | ||
43 | }; | ||
44 | |||
45 | /* | 42 | /* |
46 | * Single "mode" entry. This describes one set of signal timings a display can | 43 | * Single "mode" entry. This describes one set of signal timings a display can |
47 | * have in one setting. This struct can later be converted to struct videomode | 44 | * have in one setting. This struct can later be converted to struct videomode |
@@ -72,8 +69,7 @@ struct display_timing { | |||
72 | struct timing_entry vback_porch; /* ver. back porch */ | 69 | struct timing_entry vback_porch; /* ver. back porch */ |
73 | struct timing_entry vsync_len; /* ver. sync len */ | 70 | struct timing_entry vsync_len; /* ver. sync len */ |
74 | 71 | ||
75 | unsigned int dmt_flags; /* VESA DMT flags */ | 72 | enum display_flags flags; /* display flags */ |
76 | unsigned int data_flags; /* video data flags */ | ||
77 | }; | 73 | }; |
78 | 74 | ||
79 | /* | 75 | /* |
@@ -89,25 +85,6 @@ struct display_timings { | |||
89 | struct display_timing **timings; | 85 | struct display_timing **timings; |
90 | }; | 86 | }; |
91 | 87 | ||
92 | /* get value specified by index from struct timing_entry */ | ||
93 | static inline u32 display_timing_get_value(const struct timing_entry *te, | ||
94 | enum timing_entry_index index) | ||
95 | { | ||
96 | switch (index) { | ||
97 | case TE_MIN: | ||
98 | return te->min; | ||
99 | break; | ||
100 | case TE_TYP: | ||
101 | return te->typ; | ||
102 | break; | ||
103 | case TE_MAX: | ||
104 | return te->max; | ||
105 | break; | ||
106 | default: | ||
107 | return te->typ; | ||
108 | } | ||
109 | } | ||
110 | |||
111 | /* get one entry from struct display_timings */ | 88 | /* get one entry from struct display_timings */ |
112 | static inline struct display_timing *display_timings_get(const struct | 89 | static inline struct display_timing *display_timings_get(const struct |
113 | display_timings *disp, | 90 | display_timings *disp, |
diff --git a/include/video/videomode.h b/include/video/videomode.h index a42156234dd4..3f1049d870d5 100644 --- a/include/video/videomode.h +++ b/include/video/videomode.h | |||
@@ -29,20 +29,30 @@ struct videomode { | |||
29 | u32 vback_porch; | 29 | u32 vback_porch; |
30 | u32 vsync_len; | 30 | u32 vsync_len; |
31 | 31 | ||
32 | unsigned int dmt_flags; /* VESA DMT flags */ | 32 | enum display_flags flags; /* display flags */ |
33 | unsigned int data_flags; /* video data flags */ | ||
34 | }; | 33 | }; |
35 | 34 | ||
36 | /** | 35 | /** |
37 | * videomode_from_timing - convert display timing to videomode | 36 | * videomode_from_timing - convert display timing to videomode |
37 | * @dt: display_timing structure | ||
38 | * @vm: return value | ||
39 | * | ||
40 | * DESCRIPTION: | ||
41 | * This function converts a struct display_timing to a struct videomode. | ||
42 | */ | ||
43 | void videomode_from_timing(const struct display_timing *dt, | ||
44 | struct videomode *vm); | ||
45 | |||
46 | /** | ||
47 | * videomode_from_timings - convert one display timings entry to videomode | ||
38 | * @disp: structure with all possible timing entries | 48 | * @disp: structure with all possible timing entries |
39 | * @vm: return value | 49 | * @vm: return value |
40 | * @index: index into the list of display timings in devicetree | 50 | * @index: index into the list of display timings in devicetree |
41 | * | 51 | * |
42 | * DESCRIPTION: | 52 | * DESCRIPTION: |
43 | * This function converts a struct display_timing to a struct videomode. | 53 | * This function converts one struct display_timing entry to a struct videomode. |
44 | */ | 54 | */ |
45 | int videomode_from_timing(const struct display_timings *disp, | 55 | int videomode_from_timings(const struct display_timings *disp, |
46 | struct videomode *vm, unsigned int index); | 56 | struct videomode *vm, unsigned int index); |
47 | 57 | ||
48 | #endif | 58 | #endif |