aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-06-09 18:53:00 -0400
committerDave Airlie <airlied@redhat.com>2014-06-09 18:53:00 -0400
commit5330fb412948420be83d1d247b79d8108408efe6 (patch)
tree989160de55c87a081eb4e8d8e3aa9d0debe6f9c4
parent6c8a02bba826b52af1da3447af8acdc49eddad66 (diff)
parenta333f7ad1db5e77eea411b058d95a5d3587ab141 (diff)
Merge tag 'drm/panel/for-3.16-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next
drm/panel: Changes for v3.16-rc1 This set of commits contains a couple of fixes to existing panel drivers and support for some new panels. One commit touches the DRM core in that in modifies the MIPI DSI support to hook up the shutdown function so that drivers can provide code that's run on shutdown. This is used by a subsequent commit to make the simple panel driver power off the backlight on shutdown. * tag 'drm/panel/for-3.16-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/panel: simple - Add AUO B133XTN01 panel support drm/panel: simple - Disable panel on shutdown drm/panel: add support for EDT ET057090DHU panel drm/panel: Add support for EDT ETM0700G0DH6 and ET070080DH6 panels drm/panel: ld9040: add power control sequence drm/panel: s6e8aa0: silence array overflow warning drm/dsi: Support device shutdown
-rw-r--r--Documentation/devicetree/bindings/panel/auo,b133xtn01.txt7
-rw-r--r--Documentation/devicetree/bindings/panel/edt,et057090dhu.txt7
-rw-r--r--Documentation/devicetree/bindings/panel/edt,et070080dh6.txt10
-rw-r--r--Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt10
-rw-r--r--drivers/gpu/drm/drm_mipi_dsi.c10
-rw-r--r--drivers/gpu/drm/panel/panel-ld9040.c3
-rw-r--r--drivers/gpu/drm/panel/panel-s6e8aa0.c1
-rw-r--r--drivers/gpu/drm/panel/panel-simple.c99
-rw-r--r--include/drm/drm_mipi_dsi.h2
9 files changed, 149 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt b/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt
new file mode 100644
index 000000000000..7443b7c76769
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt
@@ -0,0 +1,7 @@
1AU Optronics Corporation 13.3" WXGA (1366x768) TFT LCD panel
2
3Required properties:
4- compatible: should be "auo,b133xtn01"
5
6This binding is compatible with the simple-panel binding, which is specified
7in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt b/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt
new file mode 100644
index 000000000000..4903d7b1d947
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt
@@ -0,0 +1,7 @@
1Emerging Display Technology Corp. 5.7" VGA TFT LCD panel
2
3Required properties:
4- compatible: should be "edt,et057090dhu"
5
6This binding is compatible with the simple-panel binding, which is specified
7in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt b/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt
new file mode 100644
index 000000000000..20cb38e836e4
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt
@@ -0,0 +1,10 @@
1Emerging Display Technology Corp. ET070080DH6 7.0" WVGA TFT LCD panel
2
3Required properties:
4- compatible: should be "edt,et070080dh6"
5
6This panel is the same as ETM0700G0DH6 except for the touchscreen.
7ET070080DH6 is the model with resistive touch.
8
9This binding is compatible with the simple-panel binding, which is specified
10in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt b/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt
new file mode 100644
index 000000000000..ee4b18053e40
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt
@@ -0,0 +1,10 @@
1Emerging Display Technology Corp. ETM0700G0DH6 7.0" WVGA TFT LCD panel
2
3Required properties:
4- compatible: should be "edt,etm0700g0dh6"
5
6This panel is the same as ET070080DH6 except for the touchscreen.
7ETM0700G0DH6 is the model with capacitive multitouch.
8
9This binding is compatible with the simple-panel binding, which is specified
10in simple-panel.txt in this directory.
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index 09821f46d768..e633df2f68d8 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -282,6 +282,14 @@ static int mipi_dsi_drv_remove(struct device *dev)
282 return drv->remove(dsi); 282 return drv->remove(dsi);
283} 283}
284 284
285static void mipi_dsi_drv_shutdown(struct device *dev)
286{
287 struct mipi_dsi_driver *drv = to_mipi_dsi_driver(dev->driver);
288 struct mipi_dsi_device *dsi = to_mipi_dsi_device(dev);
289
290 drv->shutdown(dsi);
291}
292
285/** 293/**
286 * mipi_dsi_driver_register - register a driver for DSI devices 294 * mipi_dsi_driver_register - register a driver for DSI devices
287 * @drv: DSI driver structure 295 * @drv: DSI driver structure
@@ -293,6 +301,8 @@ int mipi_dsi_driver_register(struct mipi_dsi_driver *drv)
293 drv->driver.probe = mipi_dsi_drv_probe; 301 drv->driver.probe = mipi_dsi_drv_probe;
294 if (drv->remove) 302 if (drv->remove)
295 drv->driver.remove = mipi_dsi_drv_remove; 303 drv->driver.remove = mipi_dsi_drv_remove;
304 if (drv->shutdown)
305 drv->driver.shutdown = mipi_dsi_drv_shutdown;
296 306
297 return driver_register(&drv->driver); 307 return driver_register(&drv->driver);
298} 308}
diff --git a/drivers/gpu/drm/panel/panel-ld9040.c b/drivers/gpu/drm/panel/panel-ld9040.c
index 1f1f8371a199..db1601fdbe29 100644
--- a/drivers/gpu/drm/panel/panel-ld9040.c
+++ b/drivers/gpu/drm/panel/panel-ld9040.c
@@ -27,6 +27,7 @@
27#define MCS_ELVSS_ON 0xb1 27#define MCS_ELVSS_ON 0xb1
28#define MCS_USER_SETTING 0xf0 28#define MCS_USER_SETTING 0xf0
29#define MCS_DISPCTL 0xf2 29#define MCS_DISPCTL 0xf2
30#define MCS_POWER_CTRL 0xf4
30#define MCS_GTCON 0xf7 31#define MCS_GTCON 0xf7
31#define MCS_PANEL_CONDITION 0xf8 32#define MCS_PANEL_CONDITION 0xf8
32#define MCS_GAMMA_SET1 0xf9 33#define MCS_GAMMA_SET1 0xf9
@@ -182,6 +183,8 @@ static void ld9040_init(struct ld9040 *ctx)
182 ld9040_dcs_write_seq_static(ctx, MCS_DISPCTL, 183 ld9040_dcs_write_seq_static(ctx, MCS_DISPCTL,
183 0x02, 0x08, 0x08, 0x10, 0x10); 184 0x02, 0x08, 0x08, 0x10, 0x10);
184 ld9040_dcs_write_seq_static(ctx, MCS_MANPWR, 0x04); 185 ld9040_dcs_write_seq_static(ctx, MCS_MANPWR, 0x04);
186 ld9040_dcs_write_seq_static(ctx, MCS_POWER_CTRL,
187 0x0a, 0x87, 0x25, 0x6a, 0x44, 0x02, 0x88);
185 ld9040_dcs_write_seq_static(ctx, MCS_ELVSS_ON, 0x0d, 0x00, 0x16); 188 ld9040_dcs_write_seq_static(ctx, MCS_ELVSS_ON, 0x0d, 0x00, 0x16);
186 ld9040_dcs_write_seq_static(ctx, MCS_GTCON, 0x09, 0x00, 0x00); 189 ld9040_dcs_write_seq_static(ctx, MCS_GTCON, 0x09, 0x00, 0x00);
187 ld9040_brightness_set(ctx); 190 ld9040_brightness_set(ctx);
diff --git a/drivers/gpu/drm/panel/panel-s6e8aa0.c b/drivers/gpu/drm/panel/panel-s6e8aa0.c
index 35941d2412b8..06e57a26db7a 100644
--- a/drivers/gpu/drm/panel/panel-s6e8aa0.c
+++ b/drivers/gpu/drm/panel/panel-s6e8aa0.c
@@ -847,6 +847,7 @@ static void s6e8aa0_read_mtp_id(struct s6e8aa0 *ctx)
847 if (i >= ARRAY_SIZE(s6e8aa0_variants)) { 847 if (i >= ARRAY_SIZE(s6e8aa0_variants)) {
848 dev_err(ctx->dev, "unsupported display version %d\n", id[1]); 848 dev_err(ctx->dev, "unsupported display version %d\n", id[1]);
849 ctx->error = -EINVAL; 849 ctx->error = -EINVAL;
850 return;
850 } 851 }
851 852
852 ctx->variant = &s6e8aa0_variants[i]; 853 ctx->variant = &s6e8aa0_variants[i];
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 309f29e9234a..a25136132c31 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -262,6 +262,13 @@ static int panel_simple_remove(struct device *dev)
262 return 0; 262 return 0;
263} 263}
264 264
265static void panel_simple_shutdown(struct device *dev)
266{
267 struct panel_simple *panel = dev_get_drvdata(dev);
268
269 panel_simple_disable(&panel->base);
270}
271
265static const struct drm_display_mode auo_b101aw03_mode = { 272static const struct drm_display_mode auo_b101aw03_mode = {
266 .clock = 51450, 273 .clock = 51450,
267 .hdisplay = 1024, 274 .hdisplay = 1024,
@@ -284,6 +291,28 @@ static const struct panel_desc auo_b101aw03 = {
284 }, 291 },
285}; 292};
286 293
294static const struct drm_display_mode auo_b133xtn01_mode = {
295 .clock = 69500,
296 .hdisplay = 1366,
297 .hsync_start = 1366 + 48,
298 .hsync_end = 1366 + 48 + 32,
299 .htotal = 1366 + 48 + 32 + 20,
300 .vdisplay = 768,
301 .vsync_start = 768 + 3,
302 .vsync_end = 768 + 3 + 6,
303 .vtotal = 768 + 3 + 6 + 13,
304 .vrefresh = 60,
305};
306
307static const struct panel_desc auo_b133xtn01 = {
308 .modes = &auo_b133xtn01_mode,
309 .num_modes = 1,
310 .size = {
311 .width = 293,
312 .height = 165,
313 },
314};
315
287static const struct drm_display_mode chunghwa_claa101wa01a_mode = { 316static const struct drm_display_mode chunghwa_claa101wa01a_mode = {
288 .clock = 72070, 317 .clock = 72070,
289 .hdisplay = 1366, 318 .hdisplay = 1366,
@@ -328,6 +357,52 @@ static const struct panel_desc chunghwa_claa101wb01 = {
328 }, 357 },
329}; 358};
330 359
360static const struct drm_display_mode edt_et057090dhu_mode = {
361 .clock = 25175,
362 .hdisplay = 640,
363 .hsync_start = 640 + 16,
364 .hsync_end = 640 + 16 + 30,
365 .htotal = 640 + 16 + 30 + 114,
366 .vdisplay = 480,
367 .vsync_start = 480 + 10,
368 .vsync_end = 480 + 10 + 3,
369 .vtotal = 480 + 10 + 3 + 32,
370 .vrefresh = 60,
371 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
372};
373
374static const struct panel_desc edt_et057090dhu = {
375 .modes = &edt_et057090dhu_mode,
376 .num_modes = 1,
377 .size = {
378 .width = 115,
379 .height = 86,
380 },
381};
382
383static const struct drm_display_mode edt_etm0700g0dh6_mode = {
384 .clock = 33260,
385 .hdisplay = 800,
386 .hsync_start = 800 + 40,
387 .hsync_end = 800 + 40 + 128,
388 .htotal = 800 + 40 + 128 + 88,
389 .vdisplay = 480,
390 .vsync_start = 480 + 10,
391 .vsync_end = 480 + 10 + 2,
392 .vtotal = 480 + 10 + 2 + 33,
393 .vrefresh = 60,
394 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
395};
396
397static const struct panel_desc edt_etm0700g0dh6 = {
398 .modes = &edt_etm0700g0dh6_mode,
399 .num_modes = 1,
400 .size = {
401 .width = 152,
402 .height = 91,
403 },
404};
405
331static const struct drm_display_mode lg_lp129qe_mode = { 406static const struct drm_display_mode lg_lp129qe_mode = {
332 .clock = 285250, 407 .clock = 285250,
333 .hdisplay = 2560, 408 .hdisplay = 2560,
@@ -377,12 +452,24 @@ static const struct of_device_id platform_of_match[] = {
377 .compatible = "auo,b101aw03", 452 .compatible = "auo,b101aw03",
378 .data = &auo_b101aw03, 453 .data = &auo_b101aw03,
379 }, { 454 }, {
455 .compatible = "auo,b133xtn01",
456 .data = &auo_b133xtn01,
457 }, {
380 .compatible = "chunghwa,claa101wa01a", 458 .compatible = "chunghwa,claa101wa01a",
381 .data = &chunghwa_claa101wa01a 459 .data = &chunghwa_claa101wa01a
382 }, { 460 }, {
383 .compatible = "chunghwa,claa101wb01", 461 .compatible = "chunghwa,claa101wb01",
384 .data = &chunghwa_claa101wb01 462 .data = &chunghwa_claa101wb01
385 }, { 463 }, {
464 .compatible = "edt,et057090dhu",
465 .data = &edt_et057090dhu,
466 }, {
467 .compatible = "edt,et070080dh6",
468 .data = &edt_etm0700g0dh6,
469 }, {
470 .compatible = "edt,etm0700g0dh6",
471 .data = &edt_etm0700g0dh6,
472 }, {
386 .compatible = "lg,lp129qe", 473 .compatible = "lg,lp129qe",
387 .data = &lg_lp129qe, 474 .data = &lg_lp129qe,
388 }, { 475 }, {
@@ -412,6 +499,11 @@ static int panel_simple_platform_remove(struct platform_device *pdev)
412 return panel_simple_remove(&pdev->dev); 499 return panel_simple_remove(&pdev->dev);
413} 500}
414 501
502static void panel_simple_platform_shutdown(struct platform_device *pdev)
503{
504 panel_simple_shutdown(&pdev->dev);
505}
506
415static struct platform_driver panel_simple_platform_driver = { 507static struct platform_driver panel_simple_platform_driver = {
416 .driver = { 508 .driver = {
417 .name = "panel-simple", 509 .name = "panel-simple",
@@ -420,6 +512,7 @@ static struct platform_driver panel_simple_platform_driver = {
420 }, 512 },
421 .probe = panel_simple_platform_probe, 513 .probe = panel_simple_platform_probe,
422 .remove = panel_simple_platform_remove, 514 .remove = panel_simple_platform_remove,
515 .shutdown = panel_simple_platform_shutdown,
423}; 516};
424 517
425struct panel_desc_dsi { 518struct panel_desc_dsi {
@@ -561,6 +654,11 @@ static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi)
561 return panel_simple_remove(&dsi->dev); 654 return panel_simple_remove(&dsi->dev);
562} 655}
563 656
657static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi)
658{
659 panel_simple_shutdown(&dsi->dev);
660}
661
564static struct mipi_dsi_driver panel_simple_dsi_driver = { 662static struct mipi_dsi_driver panel_simple_dsi_driver = {
565 .driver = { 663 .driver = {
566 .name = "panel-simple-dsi", 664 .name = "panel-simple-dsi",
@@ -569,6 +667,7 @@ static struct mipi_dsi_driver panel_simple_dsi_driver = {
569 }, 667 },
570 .probe = panel_simple_dsi_probe, 668 .probe = panel_simple_dsi_probe,
571 .remove = panel_simple_dsi_remove, 669 .remove = panel_simple_dsi_remove,
670 .shutdown = panel_simple_dsi_shutdown,
572}; 671};
573 672
574static int __init panel_simple_init(void) 673static int __init panel_simple_init(void)
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index 7209df15a3cd..944f33f8ba38 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -135,11 +135,13 @@ ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, unsigned int channel,
135 * @driver: device driver model driver 135 * @driver: device driver model driver
136 * @probe: callback for device binding 136 * @probe: callback for device binding
137 * @remove: callback for device unbinding 137 * @remove: callback for device unbinding
138 * @shutdown: called at shutdown time to quiesce the device
138 */ 139 */
139struct mipi_dsi_driver { 140struct mipi_dsi_driver {
140 struct device_driver driver; 141 struct device_driver driver;
141 int(*probe)(struct mipi_dsi_device *dsi); 142 int(*probe)(struct mipi_dsi_device *dsi);
142 int(*remove)(struct mipi_dsi_device *dsi); 143 int(*remove)(struct mipi_dsi_device *dsi);
144 void (*shutdown)(struct mipi_dsi_device *dsi);
143}; 145};
144 146
145#define to_mipi_dsi_driver(d) container_of(d, struct mipi_dsi_driver, driver) 147#define to_mipi_dsi_driver(d) container_of(d, struct mipi_dsi_driver, driver)