aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 23:43:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 23:43:40 -0400
commit437538267b672f9320833907f1b5acbb2605f4be (patch)
treed10173b35a5b86bc037bb2ece1b406d5575a2094 /include
parent9586c959bfc917695893bef0102433a7d0675691 (diff)
parent6bff98b455cf3e666fd0e3d0d908eba874de0eee (diff)
Merge tag 'fbdev-updates-for-3.4' of git://github.com/schandinat/linux-2.6
Pull fbdev updates for 3.4 from Florian Tobias Schandinat: - drivers for Samsung Exynos MIPI DSI and display port - i740fb to support those old Intel chips - large updates to OMAP, viafb and sh_mobile_lcdcfb - some updates to s3c-fb and udlfb, few patches to others Fix up conflicts in drivers/video/udlfb.c due to Key Sievers' fix making it in twice. * tag 'fbdev-updates-for-3.4' of git://github.com/schandinat/linux-2.6: (156 commits) Revert "video:uvesafb: Fix oops that uvesafb try to execute NX-protected page" OMAPDSS: register dss drivers in module init video: pxafb: add clk_prepare/clk_unprepare calls fbdev: bfin_adv7393fb: Drop needless include fbdev: sh_mipi_dsi: add extra phyctrl for sh_mipi_dsi_info fbdev: remove dependency of FB_SH_MOBILE_MERAM from FB_SH_MOBILE_LCDC Revert "MAINTAINERS: add entry for exynos mipi display drivers" fbdev: da8xx: add support for SP10Q010 display fbdev: da8xx:: fix reporting of the display timing info drivers/video/pvr2fb.c: ensure arguments to request_irq and free_irq are compatible OMAPDSS: APPLY: fix clearing shadow dirty flag with manual update fbdev: sh_mobile_meram: Implement system suspend/resume fbdev: sh_mobile_meram: Remove unneeded sanity checks fbdev: sh_mobile_meram: Don't perform update in register operation arm: mach-shmobile: Constify sh_mobile_meram_cfg structures fbdev: sh_mobile_lcdc: Don't store copy of platform data fbdev: sh_mobile_meram: Remove unused sh_mobile_meram_icb_cfg fields arm: mach-shmobile: Don't set MERAM ICB numbers in platform data fbdev: sh_mobile_meram: Allocate ICBs automatically fbdev: sh_mobile_meram: Use genalloc to manage MERAM allocation ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/omapfb.h32
-rw-r--r--include/video/exynos_dp.h131
-rw-r--r--include/video/exynos_mipi_dsim.h359
-rw-r--r--include/video/sh_mipi_dsi.h1
-rw-r--r--include/video/sh_mobile_hdmi.h2
-rw-r--r--include/video/sh_mobile_lcdc.h35
-rw-r--r--include/video/sh_mobile_meram.h45
-rw-r--r--include/video/udlfb.h1
8 files changed, 528 insertions, 78 deletions
diff --git a/include/linux/omapfb.h b/include/linux/omapfb.h
index c0b018790f07..4ff57e81051d 100644
--- a/include/linux/omapfb.h
+++ b/include/linux/omapfb.h
@@ -222,41 +222,11 @@ struct omapfb_display_info {
222 222
223#include <plat/board.h> 223#include <plat/board.h>
224 224
225#ifdef CONFIG_ARCH_OMAP1
226#define OMAPFB_PLANE_NUM 1
227#else
228#define OMAPFB_PLANE_NUM 3
229#endif
230
231struct omapfb_mem_region {
232 u32 paddr;
233 void __iomem *vaddr;
234 unsigned long size;
235 u8 type; /* OMAPFB_PLANE_MEM_* */
236 enum omapfb_color_format format;/* OMAPFB_COLOR_* */
237 unsigned format_used:1; /* Must be set when format is set.
238 * Needed b/c of the badly chosen 0
239 * base for OMAPFB_COLOR_* values
240 */
241 unsigned alloc:1; /* allocated by the driver */
242 unsigned map:1; /* kernel mapped by the driver */
243};
244
245struct omapfb_mem_desc {
246 int region_cnt;
247 struct omapfb_mem_region region[OMAPFB_PLANE_NUM];
248};
249
250struct omapfb_platform_data { 225struct omapfb_platform_data {
251 struct omap_lcd_config lcd; 226 struct omap_lcd_config lcd;
252 struct omapfb_mem_desc mem_desc;
253 void *ctrl_platform_data;
254}; 227};
255 228
256/* in arch/arm/plat-omap/fb.c */ 229void __init omapfb_set_lcd_config(const struct omap_lcd_config *config);
257extern void omapfb_set_platform_data(struct omapfb_platform_data *data);
258extern void omapfb_set_ctrl_platform_data(void *pdata);
259extern void omapfb_reserve_sdram_memblock(void);
260 230
261#endif 231#endif
262 232
diff --git a/include/video/exynos_dp.h b/include/video/exynos_dp.h
new file mode 100644
index 000000000000..8847a9d6dd42
--- /dev/null
+++ b/include/video/exynos_dp.h
@@ -0,0 +1,131 @@
1/*
2 * Samsung SoC DP device support
3 *
4 * Copyright (C) 2012 Samsung Electronics Co., Ltd.
5 * Author: Jingoo Han <jg1.han@samsung.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef _EXYNOS_DP_H
13#define _EXYNOS_DP_H
14
15#define DP_TIMEOUT_LOOP_COUNT 100
16#define MAX_CR_LOOP 5
17#define MAX_EQ_LOOP 4
18
19enum link_rate_type {
20 LINK_RATE_1_62GBPS = 0x06,
21 LINK_RATE_2_70GBPS = 0x0a
22};
23
24enum link_lane_count_type {
25 LANE_COUNT1 = 1,
26 LANE_COUNT2 = 2,
27 LANE_COUNT4 = 4
28};
29
30enum link_training_state {
31 START,
32 CLOCK_RECOVERY,
33 EQUALIZER_TRAINING,
34 FINISHED,
35 FAILED
36};
37
38enum voltage_swing_level {
39 VOLTAGE_LEVEL_0,
40 VOLTAGE_LEVEL_1,
41 VOLTAGE_LEVEL_2,
42 VOLTAGE_LEVEL_3,
43};
44
45enum pre_emphasis_level {
46 PRE_EMPHASIS_LEVEL_0,
47 PRE_EMPHASIS_LEVEL_1,
48 PRE_EMPHASIS_LEVEL_2,
49 PRE_EMPHASIS_LEVEL_3,
50};
51
52enum pattern_set {
53 PRBS7,
54 D10_2,
55 TRAINING_PTN1,
56 TRAINING_PTN2,
57 DP_NONE
58};
59
60enum color_space {
61 COLOR_RGB,
62 COLOR_YCBCR422,
63 COLOR_YCBCR444
64};
65
66enum color_depth {
67 COLOR_6,
68 COLOR_8,
69 COLOR_10,
70 COLOR_12
71};
72
73enum color_coefficient {
74 COLOR_YCBCR601,
75 COLOR_YCBCR709
76};
77
78enum dynamic_range {
79 VESA,
80 CEA
81};
82
83enum pll_status {
84 PLL_UNLOCKED,
85 PLL_LOCKED
86};
87
88enum clock_recovery_m_value_type {
89 CALCULATED_M,
90 REGISTER_M
91};
92
93enum video_timing_recognition_type {
94 VIDEO_TIMING_FROM_CAPTURE,
95 VIDEO_TIMING_FROM_REGISTER
96};
97
98enum analog_power_block {
99 AUX_BLOCK,
100 CH0_BLOCK,
101 CH1_BLOCK,
102 CH2_BLOCK,
103 CH3_BLOCK,
104 ANALOG_TOTAL,
105 POWER_ALL
106};
107
108struct video_info {
109 char *name;
110
111 bool h_sync_polarity;
112 bool v_sync_polarity;
113 bool interlaced;
114
115 enum color_space color_space;
116 enum dynamic_range dynamic_range;
117 enum color_coefficient ycbcr_coeff;
118 enum color_depth color_depth;
119
120 enum link_rate_type link_rate;
121 enum link_lane_count_type lane_count;
122};
123
124struct exynos_dp_platdata {
125 struct video_info *video_info;
126
127 void (*phy_init)(void);
128 void (*phy_exit)(void);
129};
130
131#endif /* _EXYNOS_DP_H */
diff --git a/include/video/exynos_mipi_dsim.h b/include/video/exynos_mipi_dsim.h
new file mode 100644
index 000000000000..772c770535f1
--- /dev/null
+++ b/include/video/exynos_mipi_dsim.h
@@ -0,0 +1,359 @@
1/* include/video/exynos_mipi_dsim.h
2 *
3 * Platform data header for Samsung SoC MIPI-DSIM.
4 *
5 * Copyright (c) 2012 Samsung Electronics Co., Ltd
6 *
7 * InKi Dae <inki.dae@samsung.com>
8 * Donghwa Lee <dh09.lee@samsung.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#ifndef _EXYNOS_MIPI_DSIM_H
16#define _EXYNOS_MIPI_DSIM_H
17
18#include <linux/device.h>
19#include <linux/fb.h>
20
21#define PANEL_NAME_SIZE (32)
22
23/*
24 * Enumerate display interface type.
25 *
26 * DSIM_COMMAND means cpu interface and rgb interface for DSIM_VIDEO.
27 *
28 * P.S. MIPI DSI Master has two display controller intefaces, RGB Interface
29 * for main display and CPU Interface(same as I80 Interface) for main
30 * and sub display.
31 */
32enum mipi_dsim_interface_type {
33 DSIM_COMMAND,
34 DSIM_VIDEO
35};
36
37enum mipi_dsim_virtual_ch_no {
38 DSIM_VIRTUAL_CH_0,
39 DSIM_VIRTUAL_CH_1,
40 DSIM_VIRTUAL_CH_2,
41 DSIM_VIRTUAL_CH_3
42};
43
44enum mipi_dsim_burst_mode_type {
45 DSIM_NON_BURST_SYNC_EVENT,
46 DSIM_BURST_SYNC_EVENT,
47 DSIM_NON_BURST_SYNC_PULSE,
48 DSIM_BURST,
49 DSIM_NON_VIDEO_MODE
50};
51
52enum mipi_dsim_no_of_data_lane {
53 DSIM_DATA_LANE_1,
54 DSIM_DATA_LANE_2,
55 DSIM_DATA_LANE_3,
56 DSIM_DATA_LANE_4
57};
58
59enum mipi_dsim_byte_clk_src {
60 DSIM_PLL_OUT_DIV8,
61 DSIM_EXT_CLK_DIV8,
62 DSIM_EXT_CLK_BYPASS
63};
64
65enum mipi_dsim_pixel_format {
66 DSIM_CMD_3BPP,
67 DSIM_CMD_8BPP,
68 DSIM_CMD_12BPP,
69 DSIM_CMD_16BPP,
70 DSIM_VID_16BPP_565,
71 DSIM_VID_18BPP_666PACKED,
72 DSIM_18BPP_666LOOSELYPACKED,
73 DSIM_24BPP_888
74};
75
76/*
77 * struct mipi_dsim_config - interface for configuring mipi-dsi controller.
78 *
79 * @auto_flush: enable or disable Auto flush of MD FIFO using VSYNC pulse.
80 * @eot_disable: enable or disable EoT packet in HS mode.
81 * @auto_vertical_cnt: specifies auto vertical count mode.
82 * in Video mode, the vertical line transition uses line counter
83 * configured by VSA, VBP, and Vertical resolution.
84 * If this bit is set to '1', the line counter does not use VSA and VBP
85 * registers.(in command mode, this variable is ignored)
86 * @hse: set horizontal sync event mode.
87 * In VSYNC pulse and Vporch area, MIPI DSI master transfers only HSYNC
88 * start packet to MIPI DSI slave at MIPI DSI spec1.1r02.
89 * this bit transfers HSYNC end packet in VSYNC pulse and Vporch area
90 * (in mommand mode, this variable is ignored)
91 * @hfp: specifies HFP disable mode.
92 * if this variable is set, DSI master ignores HFP area in VIDEO mode.
93 * (in command mode, this variable is ignored)
94 * @hbp: specifies HBP disable mode.
95 * if this variable is set, DSI master ignores HBP area in VIDEO mode.
96 * (in command mode, this variable is ignored)
97 * @hsa: specifies HSA disable mode.
98 * if this variable is set, DSI master ignores HSA area in VIDEO mode.
99 * (in command mode, this variable is ignored)
100 * @cma_allow: specifies the number of horizontal lines, where command packet
101 * transmission is allowed after Stable VFP period.
102 * @e_interface: specifies interface to be used.(CPU or RGB interface)
103 * @e_virtual_ch: specifies virtual channel number that main or
104 * sub diaplsy uses.
105 * @e_pixel_format: specifies pixel stream format for main or sub display.
106 * @e_burst_mode: selects Burst mode in Video mode.
107 * in Non-burst mode, RGB data area is filled with RGB data and NULL
108 * packets, according to input bandwidth of RGB interface.
109 * In Burst mode, RGB data area is filled with RGB data only.
110 * @e_no_data_lane: specifies data lane count to be used by Master.
111 * @e_byte_clk: select byte clock source. (it must be DSIM_PLL_OUT_DIV8)
112 * DSIM_EXT_CLK_DIV8 and DSIM_EXT_CLK_BYPASSS are not supported.
113 * @pll_stable_time: specifies the PLL Timer for stability of the ganerated
114 * clock(System clock cycle base)
115 * if the timer value goes to 0x00000000, the clock stable bit of status
116 * and interrupt register is set.
117 * @esc_clk: specifies escape clock frequency for getting the escape clock
118 * prescaler value.
119 * @stop_holding_cnt: specifies the interval value between transmitting
120 * read packet(or write "set_tear_on" command) and BTA request.
121 * after transmitting read packet or write "set_tear_on" command,
122 * BTA requests to D-PHY automatically. this counter value specifies
123 * the interval between them.
124 * @bta_timeout: specifies the timer for BTA.
125 * this register specifies time out from BTA request to change
126 * the direction with respect to Tx escape clock.
127 * @rx_timeout: specifies the timer for LP Rx mode timeout.
128 * this register specifies time out on how long RxValid deasserts,
129 * after RxLpdt asserts with respect to Tx escape clock.
130 * - RxValid specifies Rx data valid indicator.
131 * - RxLpdt specifies an indicator that D-PHY is under RxLpdt mode.
132 * - RxValid and RxLpdt specifies signal from D-PHY.
133 */
134struct mipi_dsim_config {
135 unsigned char auto_flush;
136 unsigned char eot_disable;
137
138 unsigned char auto_vertical_cnt;
139 unsigned char hse;
140 unsigned char hfp;
141 unsigned char hbp;
142 unsigned char hsa;
143 unsigned char cmd_allow;
144
145 enum mipi_dsim_interface_type e_interface;
146 enum mipi_dsim_virtual_ch_no e_virtual_ch;
147 enum mipi_dsim_pixel_format e_pixel_format;
148 enum mipi_dsim_burst_mode_type e_burst_mode;
149 enum mipi_dsim_no_of_data_lane e_no_data_lane;
150 enum mipi_dsim_byte_clk_src e_byte_clk;
151
152 /*
153 * ===========================================
154 * | P | M | S | MHz |
155 * -------------------------------------------
156 * | 3 | 100 | 3 | 100 |
157 * | 3 | 100 | 2 | 200 |
158 * | 3 | 63 | 1 | 252 |
159 * | 4 | 100 | 1 | 300 |
160 * | 4 | 110 | 1 | 330 |
161 * | 12 | 350 | 1 | 350 |
162 * | 3 | 100 | 1 | 400 |
163 * | 4 | 150 | 1 | 450 |
164 * | 6 | 118 | 1 | 472 |
165 * | 3 | 120 | 1 | 480 |
166 * | 12 | 250 | 0 | 500 |
167 * | 4 | 100 | 0 | 600 |
168 * | 3 | 81 | 0 | 648 |
169 * | 3 | 88 | 0 | 704 |
170 * | 3 | 90 | 0 | 720 |
171 * | 3 | 100 | 0 | 800 |
172 * | 12 | 425 | 0 | 850 |
173 * | 4 | 150 | 0 | 900 |
174 * | 12 | 475 | 0 | 950 |
175 * | 6 | 250 | 0 | 1000 |
176 * -------------------------------------------
177 */
178
179 /*
180 * pms could be calculated as the following.
181 * M * 24 / P * 2 ^ S = MHz
182 */
183 unsigned char p;
184 unsigned short m;
185 unsigned char s;
186
187 unsigned int pll_stable_time;
188 unsigned long esc_clk;
189
190 unsigned short stop_holding_cnt;
191 unsigned char bta_timeout;
192 unsigned short rx_timeout;
193};
194
195/*
196 * struct mipi_dsim_device - global interface for mipi-dsi driver.
197 *
198 * @dev: driver model representation of the device.
199 * @id: unique device id.
200 * @clock: pointer to MIPI-DSI clock of clock framework.
201 * @irq: interrupt number to MIPI-DSI controller.
202 * @reg_base: base address to memory mapped SRF of MIPI-DSI controller.
203 * (virtual address)
204 * @lock: the mutex protecting this data structure.
205 * @dsim_info: infomation for configuring mipi-dsi controller.
206 * @master_ops: callbacks to mipi-dsi operations.
207 * @dsim_lcd_dev: pointer to activated ddi device.
208 * (it would be registered by mipi-dsi driver.)
209 * @dsim_lcd_drv: pointer to activated_ddi driver.
210 * (it would be registered by mipi-dsi driver.)
211 * @lcd_info: pointer to mipi_lcd_info structure.
212 * @state: specifies status of MIPI-DSI controller.
213 * the status could be RESET, INIT, STOP, HSCLKEN and ULPS.
214 * @data_lane: specifiec enabled data lane number.
215 * this variable would be set by driver according to e_no_data_lane
216 * automatically.
217 * @e_clk_src: select byte clock source.
218 * @pd: pointer to MIPI-DSI driver platform data.
219 */
220struct mipi_dsim_device {
221 struct device *dev;
222 int id;
223 struct resource *res;
224 struct clk *clock;
225 unsigned int irq;
226 void __iomem *reg_base;
227 struct mutex lock;
228
229 struct mipi_dsim_config *dsim_config;
230 struct mipi_dsim_master_ops *master_ops;
231 struct mipi_dsim_lcd_device *dsim_lcd_dev;
232 struct mipi_dsim_lcd_driver *dsim_lcd_drv;
233
234 unsigned int state;
235 unsigned int data_lane;
236 unsigned int e_clk_src;
237 bool suspended;
238
239 struct mipi_dsim_platform_data *pd;
240};
241
242/*
243 * struct mipi_dsim_platform_data - interface to platform data
244 * for mipi-dsi driver.
245 *
246 * @lcd_panel_name: specifies lcd panel name registered to mipi-dsi driver.
247 * lcd panel driver searched would be actived.
248 * @dsim_config: pointer of structure for configuring mipi-dsi controller.
249 * @enabled: indicate whether mipi controller got enabled or not.
250 * @lcd_panel_info: pointer for lcd panel specific structure.
251 * this structure specifies width, height, timing and polarity and so on.
252 * @phy_enable: pointer to a callback controlling D-PHY enable/reset
253 */
254struct mipi_dsim_platform_data {
255 char lcd_panel_name[PANEL_NAME_SIZE];
256
257 struct mipi_dsim_config *dsim_config;
258 unsigned int enabled;
259 void *lcd_panel_info;
260
261 int (*phy_enable)(struct platform_device *pdev, bool on);
262};
263
264/*
265 * struct mipi_dsim_master_ops - callbacks to mipi-dsi operations.
266 *
267 * @cmd_write: transfer command to lcd panel at LP mode.
268 * @cmd_read: read command from rx register.
269 * @get_dsim_frame_done: get the status that all screen data have been
270 * transferred to mipi-dsi.
271 * @clear_dsim_frame_done: clear frame done status.
272 * @get_fb_frame_done: get frame done status of display controller.
273 * @trigger: trigger display controller.
274 * - this one would be used only in case of CPU mode.
275 * @set_early_blank_mode: set framebuffer blank mode.
276 * - this callback should be called prior to fb_blank() by a client driver
277 * only if needing.
278 * @set_blank_mode: set framebuffer blank mode.
279 * - this callback should be called after fb_blank() by a client driver
280 * only if needing.
281 */
282
283struct mipi_dsim_master_ops {
284 int (*cmd_write)(struct mipi_dsim_device *dsim, unsigned int data_id,
285 const unsigned char *data0, unsigned int data1);
286 int (*cmd_read)(struct mipi_dsim_device *dsim, unsigned int data_id,
287 unsigned int data0, unsigned int req_size, u8 *rx_buf);
288 int (*get_dsim_frame_done)(struct mipi_dsim_device *dsim);
289 int (*clear_dsim_frame_done)(struct mipi_dsim_device *dsim);
290
291 int (*get_fb_frame_done)(struct fb_info *info);
292 void (*trigger)(struct fb_info *info);
293 int (*set_early_blank_mode)(struct mipi_dsim_device *dsim, int power);
294 int (*set_blank_mode)(struct mipi_dsim_device *dsim, int power);
295};
296
297/*
298 * device structure for mipi-dsi based lcd panel.
299 *
300 * @name: name of the device to use with this device, or an
301 * alias for that name.
302 * @dev: driver model representation of the device.
303 * @id: id of device to be registered.
304 * @bus_id: bus id for identifing connected bus
305 * and this bus id should be same as id of mipi_dsim_device.
306 * @irq: irq number for signaling when framebuffer transfer of
307 * lcd panel module is completed.
308 * this irq would be used only for MIPI-DSI based CPU mode lcd panel.
309 * @master: pointer to mipi-dsi master device object.
310 * @platform_data: lcd panel specific platform data.
311 */
312struct mipi_dsim_lcd_device {
313 char *name;
314 struct device dev;
315 int id;
316 int bus_id;
317 int irq;
318
319 struct mipi_dsim_device *master;
320 void *platform_data;
321};
322
323/*
324 * driver structure for mipi-dsi based lcd panel.
325 *
326 * this structure should be registered by lcd panel driver.
327 * mipi-dsi driver seeks lcd panel registered through name field
328 * and calls these callback functions in appropriate time.
329 *
330 * @name: name of the driver to use with this device, or an
331 * alias for that name.
332 * @id: id of driver to be registered.
333 * this id would be used for finding device object registered.
334 */
335struct mipi_dsim_lcd_driver {
336 char *name;
337 int id;
338
339 void (*power_on)(struct mipi_dsim_lcd_device *dsim_dev, int enable);
340 void (*set_sequence)(struct mipi_dsim_lcd_device *dsim_dev);
341 int (*probe)(struct mipi_dsim_lcd_device *dsim_dev);
342 int (*remove)(struct mipi_dsim_lcd_device *dsim_dev);
343 void (*shutdown)(struct mipi_dsim_lcd_device *dsim_dev);
344 int (*suspend)(struct mipi_dsim_lcd_device *dsim_dev);
345 int (*resume)(struct mipi_dsim_lcd_device *dsim_dev);
346};
347
348/*
349 * register mipi_dsim_lcd_device to mipi-dsi master.
350 */
351int exynos_mipi_dsi_register_lcd_device(struct mipi_dsim_lcd_device
352 *lcd_dev);
353/**
354 * register mipi_dsim_lcd_driver object defined by lcd panel driver
355 * to mipi-dsi driver.
356 */
357int exynos_mipi_dsi_register_lcd_driver(struct mipi_dsim_lcd_driver
358 *lcd_drv);
359#endif /* _EXYNOS_MIPI_DSIM_H */
diff --git a/include/video/sh_mipi_dsi.h b/include/video/sh_mipi_dsi.h
index 434d56b4a1a5..06c67fbc4eee 100644
--- a/include/video/sh_mipi_dsi.h
+++ b/include/video/sh_mipi_dsi.h
@@ -51,6 +51,7 @@ struct sh_mipi_dsi_info {
51 int lane; 51 int lane;
52 unsigned long flags; 52 unsigned long flags;
53 u32 clksrc; 53 u32 clksrc;
54 u32 phyctrl; /* for extra setting */
54 unsigned int vsynw_offset; 55 unsigned int vsynw_offset;
55 int (*set_dot_clock)(struct platform_device *pdev, 56 int (*set_dot_clock)(struct platform_device *pdev,
56 void __iomem *base, 57 void __iomem *base,
diff --git a/include/video/sh_mobile_hdmi.h b/include/video/sh_mobile_hdmi.h
index b56932927d0a..728f9de9c258 100644
--- a/include/video/sh_mobile_hdmi.h
+++ b/include/video/sh_mobile_hdmi.h
@@ -31,8 +31,6 @@ struct clk;
31#define HDMI_SND_SRC_HBR (3 << 0) 31#define HDMI_SND_SRC_HBR (3 << 0)
32 32
33struct sh_mobile_hdmi_info { 33struct sh_mobile_hdmi_info {
34 struct sh_mobile_lcdc_chan_cfg *lcd_chan;
35 struct device *lcd_dev;
36 unsigned int flags; 34 unsigned int flags;
37 long (*clk_optimize_parent)(unsigned long target, unsigned long *best_freq, 35 long (*clk_optimize_parent)(unsigned long target, unsigned long *best_freq,
38 unsigned long *parent_freq); 36 unsigned long *parent_freq);
diff --git a/include/video/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h
index fe30b759c51e..7571b27a0ba1 100644
--- a/include/video/sh_mobile_lcdc.h
+++ b/include/video/sh_mobile_lcdc.h
@@ -147,29 +147,23 @@ struct sh_mobile_lcdc_sys_bus_ops {
147 unsigned long (*read_data)(void *handle); 147 unsigned long (*read_data)(void *handle);
148}; 148};
149 149
150struct module; 150struct sh_mobile_lcdc_panel_cfg {
151struct sh_mobile_lcdc_board_cfg { 151 unsigned long width; /* Panel width in mm */
152 struct module *owner; 152 unsigned long height; /* Panel height in mm */
153 void *board_data; 153 int (*setup_sys)(void *sys_ops_handle,
154 int (*setup_sys)(void *board_data, void *sys_ops_handle,
155 struct sh_mobile_lcdc_sys_bus_ops *sys_ops); 154 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
156 void (*start_transfer)(void *board_data, void *sys_ops_handle, 155 void (*start_transfer)(void *sys_ops_handle,
157 struct sh_mobile_lcdc_sys_bus_ops *sys_ops); 156 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
158 void (*display_on)(void *board_data, struct fb_info *info); 157 void (*display_on)(void);
159 void (*display_off)(void *board_data); 158 void (*display_off)(void);
160 int (*set_brightness)(void *board_data, int brightness);
161 int (*get_brightness)(void *board_data);
162};
163
164struct sh_mobile_lcdc_lcd_size_cfg { /* width and height of panel in mm */
165 unsigned long width;
166 unsigned long height;
167}; 159};
168 160
169/* backlight info */ 161/* backlight info */
170struct sh_mobile_lcdc_bl_info { 162struct sh_mobile_lcdc_bl_info {
171 const char *name; 163 const char *name;
172 int max_brightness; 164 int max_brightness;
165 int (*set_brightness)(int brightness);
166 int (*get_brightness)(void);
173}; 167};
174 168
175struct sh_mobile_lcdc_chan_cfg { 169struct sh_mobile_lcdc_chan_cfg {
@@ -179,13 +173,14 @@ struct sh_mobile_lcdc_chan_cfg {
179 int interface_type; /* selects RGBn or SYSn I/F, see above */ 173 int interface_type; /* selects RGBn or SYSn I/F, see above */
180 int clock_divider; 174 int clock_divider;
181 unsigned long flags; /* LCDC_FLAGS_... */ 175 unsigned long flags; /* LCDC_FLAGS_... */
182 const struct fb_videomode *lcd_cfg; 176 const struct fb_videomode *lcd_modes;
183 int num_cfg; 177 int num_modes;
184 struct sh_mobile_lcdc_lcd_size_cfg lcd_size_cfg; 178 struct sh_mobile_lcdc_panel_cfg panel_cfg;
185 struct sh_mobile_lcdc_board_cfg board_cfg;
186 struct sh_mobile_lcdc_bl_info bl_info; 179 struct sh_mobile_lcdc_bl_info bl_info;
187 struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */ 180 struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */
188 struct sh_mobile_meram_cfg *meram_cfg; 181 const struct sh_mobile_meram_cfg *meram_cfg;
182
183 struct platform_device *tx_dev; /* HDMI/DSI transmitter device */
189}; 184};
190 185
191struct sh_mobile_lcdc_info { 186struct sh_mobile_lcdc_info {
diff --git a/include/video/sh_mobile_meram.h b/include/video/sh_mobile_meram.h
index af602d602b28..29b2fd3b147e 100644
--- a/include/video/sh_mobile_meram.h
+++ b/include/video/sh_mobile_meram.h
@@ -17,52 +17,47 @@ enum {
17struct sh_mobile_meram_priv; 17struct sh_mobile_meram_priv;
18struct sh_mobile_meram_ops; 18struct sh_mobile_meram_ops;
19 19
20/*
21 * struct sh_mobile_meram_info - MERAM platform data
22 * @reserved_icbs: Bitmask of reserved ICBs (for instance used through UIO)
23 */
20struct sh_mobile_meram_info { 24struct sh_mobile_meram_info {
21 int addr_mode; 25 int addr_mode;
26 u32 reserved_icbs;
22 struct sh_mobile_meram_ops *ops; 27 struct sh_mobile_meram_ops *ops;
23 struct sh_mobile_meram_priv *priv; 28 struct sh_mobile_meram_priv *priv;
24 struct platform_device *pdev; 29 struct platform_device *pdev;
25}; 30};
26 31
27/* icb config */ 32/* icb config */
28struct sh_mobile_meram_icb { 33struct sh_mobile_meram_icb_cfg {
29 int marker_icb; /* ICB # for Marker ICB */ 34 unsigned int meram_size; /* MERAM Buffer Size to use */
30 int cache_icb; /* ICB # for Cache ICB */
31 int meram_offset; /* MERAM Buffer Offset to use */
32 int meram_size; /* MERAM Buffer Size to use */
33
34 int cache_unit; /* bytes to cache per ICB */
35}; 35};
36 36
37struct sh_mobile_meram_cfg { 37struct sh_mobile_meram_cfg {
38 struct sh_mobile_meram_icb icb[2]; 38 struct sh_mobile_meram_icb_cfg icb[2];
39 int pixelformat;
40 int current_reg;
41}; 39};
42 40
43struct module; 41struct module;
44struct sh_mobile_meram_ops { 42struct sh_mobile_meram_ops {
45 struct module *module; 43 struct module *module;
46 /* register usage of meram */ 44 /* register usage of meram */
47 int (*meram_register)(struct sh_mobile_meram_info *meram_dev, 45 void *(*meram_register)(struct sh_mobile_meram_info *meram_dev,
48 struct sh_mobile_meram_cfg *cfg, 46 const struct sh_mobile_meram_cfg *cfg,
49 int xres, int yres, int pixelformat, 47 unsigned int xres, unsigned int yres,
50 unsigned long base_addr_y, 48 unsigned int pixelformat,
51 unsigned long base_addr_c, 49 unsigned int *pitch);
52 unsigned long *icb_addr_y,
53 unsigned long *icb_addr_c, int *pitch);
54 50
55 /* unregister usage of meram */ 51 /* unregister usage of meram */
56 int (*meram_unregister)(struct sh_mobile_meram_info *meram_dev, 52 void (*meram_unregister)(struct sh_mobile_meram_info *meram_dev,
57 struct sh_mobile_meram_cfg *cfg); 53 void *data);
58 54
59 /* update meram settings */ 55 /* update meram settings */
60 int (*meram_update)(struct sh_mobile_meram_info *meram_dev, 56 void (*meram_update)(struct sh_mobile_meram_info *meram_dev, void *data,
61 struct sh_mobile_meram_cfg *cfg, 57 unsigned long base_addr_y,
62 unsigned long base_addr_y, 58 unsigned long base_addr_c,
63 unsigned long base_addr_c, 59 unsigned long *icb_addr_y,
64 unsigned long *icb_addr_y, 60 unsigned long *icb_addr_c);
65 unsigned long *icb_addr_c);
66}; 61};
67 62
68#endif /* __VIDEO_SH_MOBILE_MERAM_H__ */ 63#endif /* __VIDEO_SH_MOBILE_MERAM_H__ */
diff --git a/include/video/udlfb.h b/include/video/udlfb.h
index c41f308c9636..f9466fa54ba4 100644
--- a/include/video/udlfb.h
+++ b/include/video/udlfb.h
@@ -41,6 +41,7 @@ struct dlfb_data {
41 char *backing_buffer; 41 char *backing_buffer;
42 int fb_count; 42 int fb_count;
43 bool virtualized; /* true when physical usb device not present */ 43 bool virtualized; /* true when physical usb device not present */
44 struct delayed_work init_framebuffer_work;
44 struct delayed_work free_framebuffer_work; 45 struct delayed_work free_framebuffer_work;
45 atomic_t usb_active; /* 0 = update virtual buffer, but no usb traffic */ 46 atomic_t usb_active; /* 0 = update virtual buffer, but no usb traffic */
46 atomic_t lost_pixels; /* 1 = a render op failed. Need screen refresh */ 47 atomic_t lost_pixels; /* 1 = a render op failed. Need screen refresh */