aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2013-04-05 16:12:39 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-04-06 13:33:29 -0400
commite3c74757c23cbbbb0c64b34c107732f3e2d67fa3 (patch)
tree6fdc324d46dd72b65dfbaf0a34c6a056a2a8290d /drivers/gpu/drm/i915/i915_dma.c
parentbae3699182027525d92b97d904578a533264b242 (diff)
drm/i915: Support PCH no display
GEN supports a fusing option which subtracts the PCH display (making the CPU display also useless). In this configuration MMIO which gets decoded to a certain range will hang the CPU. For us, this is sort of the equivalent of having no pipes, and we can easily modify some code to not do certain things with no pipes. v2: Moved the num pipes check up in the call chain, and removed extra checks noted by Daniel. For more details, see: http://lists.freedesktop.org/archives/intel-gfx/2013-March/025746.html v3: Drop the intel_setup_overlay check (Daniel) Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 4be58e3b8e4f..4a1a517b09e5 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1322,6 +1322,10 @@ static int i915_load_modeset_init(struct drm_device *dev)
1322 /* Always safe in the mode setting case. */ 1322 /* Always safe in the mode setting case. */
1323 /* FIXME: do pre/post-mode set stuff in core KMS code */ 1323 /* FIXME: do pre/post-mode set stuff in core KMS code */
1324 dev->vblank_disable_allowed = 1; 1324 dev->vblank_disable_allowed = 1;
1325 if (INTEL_INFO(dev)->num_pipes == 0) {
1326 dev_priv->mm.suspended = 0;
1327 return 0;
1328 }
1325 1329
1326 ret = intel_fbdev_init(dev); 1330 ret = intel_fbdev_init(dev);
1327 if (ret) 1331 if (ret)
@@ -1634,9 +1638,11 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1634 if (IS_VALLEYVIEW(dev)) 1638 if (IS_VALLEYVIEW(dev))
1635 dev_priv->num_plane = 2; 1639 dev_priv->num_plane = 2;
1636 1640
1637 ret = drm_vblank_init(dev, INTEL_INFO(dev)->num_pipes); 1641 if (INTEL_INFO(dev)->num_pipes) {
1638 if (ret) 1642 ret = drm_vblank_init(dev, INTEL_INFO(dev)->num_pipes);
1639 goto out_gem_unload; 1643 if (ret)
1644 goto out_gem_unload;
1645 }
1640 1646
1641 /* Start out suspended */ 1647 /* Start out suspended */
1642 dev_priv->mm.suspended = 1; 1648 dev_priv->mm.suspended = 1;
@@ -1651,9 +1657,11 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1651 1657
1652 i915_setup_sysfs(dev); 1658 i915_setup_sysfs(dev);
1653 1659
1654 /* Must be done after probing outputs */ 1660 if (INTEL_INFO(dev)->num_pipes) {
1655 intel_opregion_init(dev); 1661 /* Must be done after probing outputs */
1656 acpi_video_register(); 1662 intel_opregion_init(dev);
1663 acpi_video_register();
1664 }
1657 1665
1658 if (IS_GEN5(dev)) 1666 if (IS_GEN5(dev))
1659 intel_gpu_ips_init(dev_priv); 1667 intel_gpu_ips_init(dev_priv);