aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/displays
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-01-08 10:30:34 -0500
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-01-08 10:30:34 -0500
commit193984f43decedd2604547022e3a26249dc18b3e (patch)
tree5a2637a0fd775e4430fc537f8107f499eea470ea /drivers/video/omap2/displays
parentc5627f65d6b860023f8ee985df61c20617dd21b5 (diff)
parent9a9016832d2601a290db4dce6dd55552bdae5b1a (diff)
Merge branch 'for-florian' of git://gitorious.org/linux-omap-dss2/linux into fbdev-next
Diffstat (limited to 'drivers/video/omap2/displays')
-rw-r--r--drivers/video/omap2/displays/Kconfig2
-rw-r--r--drivers/video/omap2/displays/panel-generic-dpi.c66
-rw-r--r--drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c61
-rw-r--r--drivers/video/omap2/displays/panel-taal.c38
4 files changed, 133 insertions, 34 deletions
diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
index 8d8e1fe1901c..74d29b552901 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -41,7 +41,7 @@ config PANEL_NEC_NL8048HL11_01B
41 41
42config PANEL_PICODLP 42config PANEL_PICODLP
43 tristate "TI PICO DLP mini-projector" 43 tristate "TI PICO DLP mini-projector"
44 depends on OMAP2_DSS && I2C 44 depends on OMAP2_DSS_DPI && I2C
45 help 45 help
46 A mini-projector used in TI's SDP4430 and EVM boards 46 A mini-projector used in TI's SDP4430 and EVM boards
47 For more info please visit http://www.dlp.com/projector/ 47 For more info please visit http://www.dlp.com/projector/
diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c
index 519c47d2057f..28b9a6d61b0f 100644
--- a/drivers/video/omap2/displays/panel-generic-dpi.c
+++ b/drivers/video/omap2/displays/panel-generic-dpi.c
@@ -297,6 +297,72 @@ static struct panel_config generic_dpi_panels[] = {
297 297
298 .name = "apollon", 298 .name = "apollon",
299 }, 299 },
300 /* FocalTech ETM070003DH6 */
301 {
302 {
303 .x_res = 800,
304 .y_res = 480,
305
306 .pixel_clock = 28000,
307
308 .hsw = 48,
309 .hfp = 40,
310 .hbp = 40,
311
312 .vsw = 3,
313 .vfp = 13,
314 .vbp = 29,
315 },
316 .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
317 OMAP_DSS_LCD_IHS,
318 .name = "focaltech_etm070003dh6",
319 },
320
321 /* Microtips Technologies - UMSH-8173MD */
322 {
323 {
324 .x_res = 800,
325 .y_res = 480,
326
327 .pixel_clock = 34560,
328
329 .hsw = 13,
330 .hfp = 101,
331 .hbp = 101,
332
333 .vsw = 23,
334 .vfp = 1,
335 .vbp = 1,
336 },
337 .acbi = 0x0,
338 .acb = 0x0,
339 .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
340 OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC,
341 .power_on_delay = 0,
342 .power_off_delay = 0,
343 .name = "microtips_umsh_8173md",
344 },
345
346 /* OrtusTech COM43H4M10XTC */
347 {
348 {
349 .x_res = 480,
350 .y_res = 272,
351
352 .pixel_clock = 8000,
353
354 .hsw = 41,
355 .hfp = 8,
356 .hbp = 4,
357
358 .vsw = 10,
359 .vfp = 4,
360 .vbp = 2,
361 },
362 .config = OMAP_DSS_LCD_TFT,
363
364 .name = "ortustech_com43h4m10xtc",
365 },
300}; 366};
301 367
302struct panel_drv_data { 368struct panel_drv_data {
diff --git a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
index 8365e77e09ff..0eb31caddca8 100644
--- a/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
+++ b/drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c
@@ -163,50 +163,93 @@ static void nec_8048_panel_remove(struct omap_dss_device *dssdev)
163 kfree(necd); 163 kfree(necd);
164} 164}
165 165
166static int nec_8048_panel_enable(struct omap_dss_device *dssdev) 166static int nec_8048_panel_power_on(struct omap_dss_device *dssdev)
167{ 167{
168 int r = 0; 168 int r;
169 struct nec_8048_data *necd = dev_get_drvdata(&dssdev->dev); 169 struct nec_8048_data *necd = dev_get_drvdata(&dssdev->dev);
170 struct backlight_device *bl = necd->bl; 170 struct backlight_device *bl = necd->bl;
171 171
172 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
173 return 0;
174
175 r = omapdss_dpi_display_enable(dssdev);
176 if (r)
177 goto err0;
178
172 if (dssdev->platform_enable) { 179 if (dssdev->platform_enable) {
173 r = dssdev->platform_enable(dssdev); 180 r = dssdev->platform_enable(dssdev);
174 if (r) 181 if (r)
175 return r; 182 goto err1;
176 } 183 }
177 184
178 r = nec_8048_bl_update_status(bl); 185 r = nec_8048_bl_update_status(bl);
179 if (r < 0) 186 if (r < 0)
180 dev_err(&dssdev->dev, "failed to set lcd brightness\n"); 187 dev_err(&dssdev->dev, "failed to set lcd brightness\n");
181 188
182 r = omapdss_dpi_display_enable(dssdev); 189 return 0;
183 190err1:
191 omapdss_dpi_display_disable(dssdev);
192err0:
184 return r; 193 return r;
185} 194}
186 195
187static void nec_8048_panel_disable(struct omap_dss_device *dssdev) 196static void nec_8048_panel_power_off(struct omap_dss_device *dssdev)
188{ 197{
189 struct nec_8048_data *necd = dev_get_drvdata(&dssdev->dev); 198 struct nec_8048_data *necd = dev_get_drvdata(&dssdev->dev);
190 struct backlight_device *bl = necd->bl; 199 struct backlight_device *bl = necd->bl;
191 200
192 omapdss_dpi_display_disable(dssdev); 201 if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
202 return;
193 203
194 bl->props.brightness = 0; 204 bl->props.brightness = 0;
195 nec_8048_bl_update_status(bl); 205 nec_8048_bl_update_status(bl);
196 206
197 if (dssdev->platform_disable) 207 if (dssdev->platform_disable)
198 dssdev->platform_disable(dssdev); 208 dssdev->platform_disable(dssdev);
209
210 omapdss_dpi_display_disable(dssdev);
211}
212
213static int nec_8048_panel_enable(struct omap_dss_device *dssdev)
214{
215 int r;
216
217 r = nec_8048_panel_power_on(dssdev);
218 if (r)
219 return r;
220
221 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
222
223 return 0;
224}
225
226static void nec_8048_panel_disable(struct omap_dss_device *dssdev)
227{
228 nec_8048_panel_power_off(dssdev);
229
230 dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
199} 231}
200 232
201static int nec_8048_panel_suspend(struct omap_dss_device *dssdev) 233static int nec_8048_panel_suspend(struct omap_dss_device *dssdev)
202{ 234{
203 nec_8048_panel_disable(dssdev); 235 nec_8048_panel_power_off(dssdev);
236
237 dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;
238
204 return 0; 239 return 0;
205} 240}
206 241
207static int nec_8048_panel_resume(struct omap_dss_device *dssdev) 242static int nec_8048_panel_resume(struct omap_dss_device *dssdev)
208{ 243{
209 return nec_8048_panel_enable(dssdev); 244 int r;
245
246 r = nec_8048_panel_power_on(dssdev);
247 if (r)
248 return r;
249
250 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
251
252 return 0;
210} 253}
211 254
212static int nec_8048_recommended_bpp(struct omap_dss_device *dssdev) 255static int nec_8048_recommended_bpp(struct omap_dss_device *dssdev)
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index 80c3f6ab1a94..00c5c615585f 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -198,12 +198,6 @@ struct taal_data {
198 bool te_enabled; 198 bool te_enabled;
199 199
200 atomic_t do_update; 200 atomic_t do_update;
201 struct {
202 u16 x;
203 u16 y;
204 u16 w;
205 u16 h;
206 } update_region;
207 int channel; 201 int channel;
208 202
209 struct delayed_work te_timeout_work; 203 struct delayed_work te_timeout_work;
@@ -1188,6 +1182,10 @@ static int taal_power_on(struct omap_dss_device *dssdev)
1188 if (r) 1182 if (r)
1189 goto err; 1183 goto err;
1190 1184
1185 r = dsi_enable_video_output(dssdev, td->channel);
1186 if (r)
1187 goto err;
1188
1191 td->enabled = 1; 1189 td->enabled = 1;
1192 1190
1193 if (!td->intro_printed) { 1191 if (!td->intro_printed) {
@@ -1217,6 +1215,8 @@ static void taal_power_off(struct omap_dss_device *dssdev)
1217 struct taal_data *td = dev_get_drvdata(&dssdev->dev); 1215 struct taal_data *td = dev_get_drvdata(&dssdev->dev);
1218 int r; 1216 int r;
1219 1217
1218 dsi_disable_video_output(dssdev, td->channel);
1219
1220 r = taal_dcs_write_0(td, MIPI_DCS_SET_DISPLAY_OFF); 1220 r = taal_dcs_write_0(td, MIPI_DCS_SET_DISPLAY_OFF);
1221 if (!r) 1221 if (!r)
1222 r = taal_sleep_in(td); 1222 r = taal_sleep_in(td);
@@ -1394,12 +1394,8 @@ static irqreturn_t taal_te_isr(int irq, void *data)
1394 if (old) { 1394 if (old) {
1395 cancel_delayed_work(&td->te_timeout_work); 1395 cancel_delayed_work(&td->te_timeout_work);
1396 1396
1397 r = omap_dsi_update(dssdev, td->channel, 1397 r = omap_dsi_update(dssdev, td->channel, taal_framedone_cb,
1398 td->update_region.x, 1398 dssdev);
1399 td->update_region.y,
1400 td->update_region.w,
1401 td->update_region.h,
1402 taal_framedone_cb, dssdev);
1403 if (r) 1399 if (r)
1404 goto err; 1400 goto err;
1405 } 1401 }
@@ -1444,26 +1440,20 @@ static int taal_update(struct omap_dss_device *dssdev,
1444 goto err; 1440 goto err;
1445 } 1441 }
1446 1442
1447 r = omap_dsi_prepare_update(dssdev, &x, &y, &w, &h, true); 1443 /* XXX no need to send this every frame, but dsi break if not done */
1448 if (r) 1444 r = taal_set_update_window(td, 0, 0,
1449 goto err; 1445 td->panel_config->timings.x_res,
1450 1446 td->panel_config->timings.y_res);
1451 r = taal_set_update_window(td, x, y, w, h);
1452 if (r) 1447 if (r)
1453 goto err; 1448 goto err;
1454 1449
1455 if (td->te_enabled && panel_data->use_ext_te) { 1450 if (td->te_enabled && panel_data->use_ext_te) {
1456 td->update_region.x = x;
1457 td->update_region.y = y;
1458 td->update_region.w = w;
1459 td->update_region.h = h;
1460 barrier();
1461 schedule_delayed_work(&td->te_timeout_work, 1451 schedule_delayed_work(&td->te_timeout_work,
1462 msecs_to_jiffies(250)); 1452 msecs_to_jiffies(250));
1463 atomic_set(&td->do_update, 1); 1453 atomic_set(&td->do_update, 1);
1464 } else { 1454 } else {
1465 r = omap_dsi_update(dssdev, td->channel, x, y, w, h, 1455 r = omap_dsi_update(dssdev, td->channel, taal_framedone_cb,
1466 taal_framedone_cb, dssdev); 1456 dssdev);
1467 if (r) 1457 if (r)
1468 goto err; 1458 goto err;
1469 } 1459 }