aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/panel/panel-simple.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-15 18:52:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-15 18:52:01 -0500
commit988adfdffdd43cfd841df734664727993076d7cb (patch)
tree6794f7bba8f595500c2b7d33376ad6614adcfaf2 /drivers/gpu/drm/panel/panel-simple.c
parent26178ec11ef3c6c814bf16a0a2b9c2f7242e3c64 (diff)
parent4e0cd68115620bc3236ff4e58e4c073948629b41 (diff)
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie: "Highlights: - AMD KFD driver merge This is the AMD HSA interface for exposing a lowlevel interface for GPGPU use. They have an open source userspace built on top of this interface, and the code looks as good as it was going to get out of tree. - Initial atomic modesetting work The need for an atomic modesetting interface to allow userspace to try and send a complete set of modesetting state to the driver has arisen, and been suffering from neglect this past year. No more, the start of the common code and changes for msm driver to use it are in this tree. Ongoing work to get the userspace ioctl finished and the code clean will probably wait until next kernel. - DisplayID 1.3 and tiled monitor exposed to userspace. Tiled monitor property is now exposed for userspace to make use of. - Rockchip drm driver merged. - imx gpu driver moved out of staging Other stuff: - core: panel - MIPI DSI + new panels. expose suggested x/y properties for virtual GPUs - i915: Initial Skylake (SKL) support gen3/4 reset work start of dri1/ums removal infoframe tracking fixes for lots of things. - nouveau: tegra k1 voltage support GM204 modesetting support GT21x memory reclocking work - radeon: CI dpm fixes GPUVM improvements Initial DPM fan control - rcar-du: HDMI support added removed some support for old boards slave encoder driver for Analog Devices adv7511 - exynos: Exynos4415 SoC support - msm: a4xx gpu support atomic helper conversion - tegra: iommu support universal plane support ganged-mode DSI support - sti: HDMI i2c improvements - vmwgfx: some late fixes. - qxl: use suggested x/y properties" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (969 commits) drm: sti: fix module compilation issue drm/i915: save/restore GMBUS freq across suspend/resume on gen4 drm: sti: correctly cleanup CRTC and planes drm: sti: add HQVDP plane drm: sti: add cursor plane drm: sti: enable auxiliary CRTC drm: sti: fix delay in VTG programming drm: sti: prepare sti_tvout to support auxiliary crtc drm: sti: use drm_crtc_vblank_{on/off} instead of drm_vblank_{on/off} drm: sti: fix hdmi avi infoframe drm: sti: remove event lock while disabling vblank drm: sti: simplify gdp code drm: sti: clear all mixer control drm: sti: remove gpio for HDMI hot plug detection drm: sti: allow to change hdmi ddc i2c adapter drm/doc: Document drm_add_modes_noedid() usage drm/i915: Remove '& 0xffff' from the mask given to WA_REG() drm/i915: Invert the mask and val arguments in wa_add() and WA_REG() drm: Zero out DRM object memory upon cleanup drm/i915/bdw: Fix the write setting up the WIZ hashing mode ...
Diffstat (limited to 'drivers/gpu/drm/panel/panel-simple.c')
-rw-r--r--drivers/gpu/drm/panel/panel-simple.c133
1 files changed, 117 insertions, 16 deletions
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 12bc8a0ab1cf..e95385bf8356 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -247,21 +247,14 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
247 if (IS_ERR(panel->supply)) 247 if (IS_ERR(panel->supply))
248 return PTR_ERR(panel->supply); 248 return PTR_ERR(panel->supply);
249 249
250 panel->enable_gpio = devm_gpiod_get_optional(dev, "enable"); 250 panel->enable_gpio = devm_gpiod_get_optional(dev, "enable",
251 GPIOD_OUT_LOW);
251 if (IS_ERR(panel->enable_gpio)) { 252 if (IS_ERR(panel->enable_gpio)) {
252 err = PTR_ERR(panel->enable_gpio); 253 err = PTR_ERR(panel->enable_gpio);
253 dev_err(dev, "failed to request GPIO: %d\n", err); 254 dev_err(dev, "failed to request GPIO: %d\n", err);
254 return err; 255 return err;
255 } 256 }
256 257
257 if (panel->enable_gpio) {
258 err = gpiod_direction_output(panel->enable_gpio, 0);
259 if (err < 0) {
260 dev_err(dev, "failed to setup GPIO: %d\n", err);
261 return err;
262 }
263 }
264
265 backlight = of_parse_phandle(dev->of_node, "backlight", 0); 258 backlight = of_parse_phandle(dev->of_node, "backlight", 0);
266 if (backlight) { 259 if (backlight) {
267 panel->backlight = of_find_backlight_by_node(backlight); 260 panel->backlight = of_find_backlight_by_node(backlight);
@@ -376,6 +369,29 @@ static const struct panel_desc auo_b101xtn01 = {
376 }, 369 },
377}; 370};
378 371
372static const struct drm_display_mode auo_b116xw03_mode = {
373 .clock = 70589,
374 .hdisplay = 1366,
375 .hsync_start = 1366 + 40,
376 .hsync_end = 1366 + 40 + 40,
377 .htotal = 1366 + 40 + 40 + 32,
378 .vdisplay = 768,
379 .vsync_start = 768 + 10,
380 .vsync_end = 768 + 10 + 12,
381 .vtotal = 768 + 10 + 12 + 6,
382 .vrefresh = 60,
383};
384
385static const struct panel_desc auo_b116xw03 = {
386 .modes = &auo_b116xw03_mode,
387 .num_modes = 1,
388 .bpc = 6,
389 .size = {
390 .width = 256,
391 .height = 144,
392 },
393};
394
379static const struct drm_display_mode auo_b133xtn01_mode = { 395static const struct drm_display_mode auo_b133xtn01_mode = {
380 .clock = 69500, 396 .clock = 69500,
381 .hdisplay = 1366, 397 .hdisplay = 1366,
@@ -415,6 +431,7 @@ static const struct drm_display_mode auo_b133htn01_mode = {
415static const struct panel_desc auo_b133htn01 = { 431static const struct panel_desc auo_b133htn01 = {
416 .modes = &auo_b133htn01_mode, 432 .modes = &auo_b133htn01_mode,
417 .num_modes = 1, 433 .num_modes = 1,
434 .bpc = 6,
418 .size = { 435 .size = {
419 .width = 293, 436 .width = 293,
420 .height = 165, 437 .height = 165,
@@ -536,22 +553,92 @@ static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = {
536static const struct panel_desc foxlink_fl500wvr00_a0t = { 553static const struct panel_desc foxlink_fl500wvr00_a0t = {
537 .modes = &foxlink_fl500wvr00_a0t_mode, 554 .modes = &foxlink_fl500wvr00_a0t_mode,
538 .num_modes = 1, 555 .num_modes = 1,
556 .bpc = 8,
539 .size = { 557 .size = {
540 .width = 108, 558 .width = 108,
541 .height = 65, 559 .height = 65,
542 }, 560 },
543}; 561};
544 562
545static const struct drm_display_mode innolux_n116bge_mode = { 563static const struct drm_display_mode hannstar_hsd070pww1_mode = {
564 .clock = 71100,
565 .hdisplay = 1280,
566 .hsync_start = 1280 + 1,
567 .hsync_end = 1280 + 1 + 158,
568 .htotal = 1280 + 1 + 158 + 1,
569 .vdisplay = 800,
570 .vsync_start = 800 + 1,
571 .vsync_end = 800 + 1 + 21,
572 .vtotal = 800 + 1 + 21 + 1,
573 .vrefresh = 60,
574};
575
576static const struct panel_desc hannstar_hsd070pww1 = {
577 .modes = &hannstar_hsd070pww1_mode,
578 .num_modes = 1,
579 .bpc = 6,
580 .size = {
581 .width = 151,
582 .height = 94,
583 },
584};
585
586static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = {
587 .clock = 33333,
588 .hdisplay = 800,
589 .hsync_start = 800 + 85,
590 .hsync_end = 800 + 85 + 86,
591 .htotal = 800 + 85 + 86 + 85,
592 .vdisplay = 480,
593 .vsync_start = 480 + 16,
594 .vsync_end = 480 + 16 + 13,
595 .vtotal = 480 + 16 + 13 + 16,
596 .vrefresh = 60,
597};
598
599static const struct panel_desc hitachi_tx23d38vm0caa = {
600 .modes = &hitachi_tx23d38vm0caa_mode,
601 .num_modes = 1,
602 .bpc = 6,
603 .size = {
604 .width = 195,
605 .height = 117,
606 },
607};
608
609static const struct drm_display_mode innolux_g121i1_l01_mode = {
546 .clock = 71000, 610 .clock = 71000,
611 .hdisplay = 1280,
612 .hsync_start = 1280 + 64,
613 .hsync_end = 1280 + 64 + 32,
614 .htotal = 1280 + 64 + 32 + 64,
615 .vdisplay = 800,
616 .vsync_start = 800 + 9,
617 .vsync_end = 800 + 9 + 6,
618 .vtotal = 800 + 9 + 6 + 9,
619 .vrefresh = 60,
620};
621
622static const struct panel_desc innolux_g121i1_l01 = {
623 .modes = &innolux_g121i1_l01_mode,
624 .num_modes = 1,
625 .bpc = 6,
626 .size = {
627 .width = 261,
628 .height = 163,
629 },
630};
631
632static const struct drm_display_mode innolux_n116bge_mode = {
633 .clock = 76420,
547 .hdisplay = 1366, 634 .hdisplay = 1366,
548 .hsync_start = 1366 + 64, 635 .hsync_start = 1366 + 136,
549 .hsync_end = 1366 + 64 + 6, 636 .hsync_end = 1366 + 136 + 30,
550 .htotal = 1366 + 64 + 6 + 64, 637 .htotal = 1366 + 136 + 30 + 60,
551 .vdisplay = 768, 638 .vdisplay = 768,
552 .vsync_start = 768 + 8, 639 .vsync_start = 768 + 8,
553 .vsync_end = 768 + 8 + 4, 640 .vsync_end = 768 + 8 + 12,
554 .vtotal = 768 + 8 + 4 + 8, 641 .vtotal = 768 + 8 + 12 + 12,
555 .vrefresh = 60, 642 .vrefresh = 60,
556 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 643 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
557}; 644};
@@ -643,6 +730,9 @@ static const struct of_device_id platform_of_match[] = {
643 .compatible = "auo,b101xtn01", 730 .compatible = "auo,b101xtn01",
644 .data = &auo_b101xtn01, 731 .data = &auo_b101xtn01,
645 }, { 732 }, {
733 .compatible = "auo,b116xw03",
734 .data = &auo_b116xw03,
735 }, {
646 .compatible = "auo,b133htn01", 736 .compatible = "auo,b133htn01",
647 .data = &auo_b133htn01, 737 .data = &auo_b133htn01,
648 }, { 738 }, {
@@ -667,6 +757,15 @@ static const struct of_device_id platform_of_match[] = {
667 .compatible = "foxlink,fl500wvr00-a0t", 757 .compatible = "foxlink,fl500wvr00-a0t",
668 .data = &foxlink_fl500wvr00_a0t, 758 .data = &foxlink_fl500wvr00_a0t,
669 }, { 759 }, {
760 .compatible = "hannstar,hsd070pww1",
761 .data = &hannstar_hsd070pww1,
762 }, {
763 .compatible = "hit,tx23d38vm0caa",
764 .data = &hitachi_tx23d38vm0caa
765 }, {
766 .compatible ="innolux,g121i1-l01",
767 .data = &innolux_g121i1_l01
768 }, {
670 .compatible = "innolux,n116bge", 769 .compatible = "innolux,n116bge",
671 .data = &innolux_n116bge, 770 .data = &innolux_n116bge,
672 }, { 771 }, {
@@ -740,6 +839,7 @@ static const struct panel_desc_dsi lg_ld070wx3_sl01 = {
740 .desc = { 839 .desc = {
741 .modes = &lg_ld070wx3_sl01_mode, 840 .modes = &lg_ld070wx3_sl01_mode,
742 .num_modes = 1, 841 .num_modes = 1,
842 .bpc = 8,
743 .size = { 843 .size = {
744 .width = 94, 844 .width = 94,
745 .height = 151, 845 .height = 151,
@@ -767,6 +867,7 @@ static const struct panel_desc_dsi lg_lh500wx1_sd03 = {
767 .desc = { 867 .desc = {
768 .modes = &lg_lh500wx1_sd03_mode, 868 .modes = &lg_lh500wx1_sd03_mode,
769 .num_modes = 1, 869 .num_modes = 1,
870 .bpc = 8,
770 .size = { 871 .size = {
771 .width = 62, 872 .width = 62,
772 .height = 110, 873 .height = 110,
@@ -794,6 +895,7 @@ static const struct panel_desc_dsi panasonic_vvx10f004b00 = {
794 .desc = { 895 .desc = {
795 .modes = &panasonic_vvx10f004b00_mode, 896 .modes = &panasonic_vvx10f004b00_mode,
796 .num_modes = 1, 897 .num_modes = 1,
898 .bpc = 8,
797 .size = { 899 .size = {
798 .width = 217, 900 .width = 217,
799 .height = 136, 901 .height = 136,
@@ -863,7 +965,6 @@ static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi)
863static struct mipi_dsi_driver panel_simple_dsi_driver = { 965static struct mipi_dsi_driver panel_simple_dsi_driver = {
864 .driver = { 966 .driver = {
865 .name = "panel-simple-dsi", 967 .name = "panel-simple-dsi",
866 .owner = THIS_MODULE,
867 .of_match_table = dsi_of_match, 968 .of_match_table = dsi_of_match,
868 }, 969 },
869 .probe = panel_simple_dsi_probe, 970 .probe = panel_simple_dsi_probe,