aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dsi.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-07 20:36:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-07 20:36:12 -0400
commita7d7a143d0b4cb1914705884ca5c25e322dba693 (patch)
tree0ee5e9e43f0863b38a29e8abc293e80eab177d74 /drivers/gpu/drm/i915/intel_dsi.c
parent43c40df2c7fedce640a6c39fcdf58764f6bbac5c (diff)
parent7963e9db1b1f842fdc53309baa8714d38e9f5681 (diff)
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull DRM updates from Dave Airlie: "Like all good pull reqs this ends with a revert, so it must mean we tested it, [ Ed. That's _one_ way of looking at it ] This pull is missing nouveau, Ben has been stuck trying to track down a very longstanding bug that revealed itself due to some other changes. I've asked him to send you a direct pull request for nouveau once he cleans things up. I'm away until Monday so don't want to delay things, you can make a decision on that when he sends it, I have my phone so I can ack things just not really merge much. It has one trivial conflict with your tree in armada_drv.c, and also the pull request contains some component changes that are already in your tree, the base tree from Russell went via Greg's tree already, but some stuff still shows up in here that doesn't when I merge my tree into yours. Otherwise all pretty standard graphics fare, one new driver and changes all over the place. New drivers: - sti kms driver for STMicroelectronics chipsets stih416 and stih407. core: - lots of cleanups to the drm core - DP MST helper code merged - universal cursor planes. - render nodes enabled by default panel: - better panel interfaces - new panel support - non-continuous cock advertising ability ttm: - shrinker fixes i915: - hopefully ditched UMS support - runtime pm fixes - psr tracking and locking - now enabled by default - userptr fixes - backlight brightness fixes - MST support merged - runtime PM for dpms - primary planes locking fixes - gen8 hw semaphore support - fbc fixes - runtime PM on SOix sleep state hw. - mmio base page flipping - lots of vlv/chv fixes. - universal cursor planes radeon: - Hawaii fixes - display scalar support for non-fixed mode displays - new firmware format support - dpm on more asics by default - GPUVM improvements - uncached and wc GTT buffers - BOs > visible VRAM exynos: - i80 interface support - module auto-loading - ipp driver consolidated. armada: - irq handling in crtc layer only - crtc renumbering - add component support - DT interaction changes. tegra: - load as module fixes - eDP bpp and sync polarity fixed - DSI non-continuous clock mode support - better support for importing buffers from nouveau msm: - mdp5/adq8084 v1.3 hw enablement - devicetree clk changse - ifc6410 board working tda998x: - component support - DT documentation update vmwgfx: - fix compat shader namespace" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (551 commits) Revert "drm: drop redundant drm_file->is_master" drm/panel: simple: Use devm_gpiod_get_optional() drm/dsi: Replace upcasting macro by function drm/panel: ld9040: Replace upcasting macro by function drm/exynos: dp: Modify driver to support drm_panel drm/exynos: Move DP setup into commit() drm/panel: simple: Add AUO B133HTN01 panel support drm/panel: simple: Support delays in panel functions drm/panel: simple: Add proper definition for prepare and unprepare drm/panel: s6e8aa0: Add proper definition for prepare and unprepare drm/panel: ld9040: Add proper definition for prepare and unprepare drm/tegra: Add support for panel prepare and unprepare routines drm/exynos: dsi: Add support for panel prepare and unprepare routines drm/exynos: dpi: Add support for panel prepare and unprepare routines drm/panel: simple: Add dummy prepare and unprepare routines drm/panel: s6e8aa0: Add dummy prepare and unprepare routines drm/panel: ld9040: Add dummy prepare and unprepare routines drm/panel: Provide convenience wrapper for .get_modes() drm/panel: add .prepare() and .unprepare() functions drm/panel: simple: Remove simple-panel compatible ...
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dsi.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dsi.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 3fd082933c87..bfcefbf33709 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -658,7 +658,7 @@ static const struct drm_connector_funcs intel_dsi_connector_funcs = {
658 .fill_modes = drm_helper_probe_single_connector_modes, 658 .fill_modes = drm_helper_probe_single_connector_modes,
659}; 659};
660 660
661bool intel_dsi_init(struct drm_device *dev) 661void intel_dsi_init(struct drm_device *dev)
662{ 662{
663 struct intel_dsi *intel_dsi; 663 struct intel_dsi *intel_dsi;
664 struct intel_encoder *intel_encoder; 664 struct intel_encoder *intel_encoder;
@@ -674,29 +674,29 @@ bool intel_dsi_init(struct drm_device *dev)
674 674
675 /* There is no detection method for MIPI so rely on VBT */ 675 /* There is no detection method for MIPI so rely on VBT */
676 if (!dev_priv->vbt.has_mipi) 676 if (!dev_priv->vbt.has_mipi)
677 return false; 677 return;
678
679 if (IS_VALLEYVIEW(dev)) {
680 dev_priv->mipi_mmio_base = VLV_MIPI_BASE;
681 } else {
682 DRM_ERROR("Unsupported Mipi device to reg base");
683 return;
684 }
678 685
679 intel_dsi = kzalloc(sizeof(*intel_dsi), GFP_KERNEL); 686 intel_dsi = kzalloc(sizeof(*intel_dsi), GFP_KERNEL);
680 if (!intel_dsi) 687 if (!intel_dsi)
681 return false; 688 return;
682 689
683 intel_connector = kzalloc(sizeof(*intel_connector), GFP_KERNEL); 690 intel_connector = kzalloc(sizeof(*intel_connector), GFP_KERNEL);
684 if (!intel_connector) { 691 if (!intel_connector) {
685 kfree(intel_dsi); 692 kfree(intel_dsi);
686 return false; 693 return;
687 } 694 }
688 695
689 intel_encoder = &intel_dsi->base; 696 intel_encoder = &intel_dsi->base;
690 encoder = &intel_encoder->base; 697 encoder = &intel_encoder->base;
691 intel_dsi->attached_connector = intel_connector; 698 intel_dsi->attached_connector = intel_connector;
692 699
693 if (IS_VALLEYVIEW(dev)) {
694 dev_priv->mipi_mmio_base = VLV_MIPI_BASE;
695 } else {
696 DRM_ERROR("Unsupported Mipi device to reg base");
697 return false;
698 }
699
700 connector = &intel_connector->base; 700 connector = &intel_connector->base;
701 701
702 drm_encoder_init(dev, encoder, &intel_dsi_funcs, DRM_MODE_ENCODER_DSI); 702 drm_encoder_init(dev, encoder, &intel_dsi_funcs, DRM_MODE_ENCODER_DSI);
@@ -743,7 +743,7 @@ bool intel_dsi_init(struct drm_device *dev)
743 743
744 intel_connector_attach_encoder(intel_connector, intel_encoder); 744 intel_connector_attach_encoder(intel_connector, intel_encoder);
745 745
746 drm_sysfs_connector_add(connector); 746 drm_connector_register(connector);
747 747
748 fixed_mode = dsi->dev_ops->get_modes(&intel_dsi->dev); 748 fixed_mode = dsi->dev_ops->get_modes(&intel_dsi->dev);
749 if (!fixed_mode) { 749 if (!fixed_mode) {
@@ -754,12 +754,10 @@ bool intel_dsi_init(struct drm_device *dev)
754 fixed_mode->type |= DRM_MODE_TYPE_PREFERRED; 754 fixed_mode->type |= DRM_MODE_TYPE_PREFERRED;
755 intel_panel_init(&intel_connector->panel, fixed_mode, NULL); 755 intel_panel_init(&intel_connector->panel, fixed_mode, NULL);
756 756
757 return true; 757 return;
758 758
759err: 759err:
760 drm_encoder_cleanup(&intel_encoder->base); 760 drm_encoder_cleanup(&intel_encoder->base);
761 kfree(intel_dsi); 761 kfree(intel_dsi);
762 kfree(intel_connector); 762 kfree(intel_connector);
763
764 return false;
765} 763}