Skip to content

Commit

Permalink
drm/i915: Support PCH no display
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Widawsky authored and Daniel Vetter committed Apr 6, 2013
1 parent bae3699 commit e3c7475
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
20 changes: 14 additions & 6 deletions drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,10 @@ static int i915_load_modeset_init(struct drm_device *dev)
/* Always safe in the mode setting case. */
/* FIXME: do pre/post-mode set stuff in core KMS code */
dev->vblank_disable_allowed = 1;
if (INTEL_INFO(dev)->num_pipes == 0) {
dev_priv->mm.suspended = 0;
return 0;
}

ret = intel_fbdev_init(dev);
if (ret)
Expand Down Expand Up @@ -1634,9 +1638,11 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
if (IS_VALLEYVIEW(dev))
dev_priv->num_plane = 2;

ret = drm_vblank_init(dev, INTEL_INFO(dev)->num_pipes);
if (ret)
goto out_gem_unload;
if (INTEL_INFO(dev)->num_pipes) {
ret = drm_vblank_init(dev, INTEL_INFO(dev)->num_pipes);
if (ret)
goto out_gem_unload;
}

/* Start out suspended */
dev_priv->mm.suspended = 1;
Expand All @@ -1651,9 +1657,11 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)

i915_setup_sysfs(dev);

/* Must be done after probing outputs */
intel_opregion_init(dev);
acpi_video_register();
if (INTEL_INFO(dev)->num_pipes) {
/* Must be done after probing outputs */
intel_opregion_init(dev);
acpi_video_register();
}

if (IS_GEN5(dev))
intel_gpu_ips_init(dev_priv);
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -8991,6 +8991,9 @@ void intel_modeset_init(struct drm_device *dev)

intel_init_pm(dev);

if (INTEL_INFO(dev)->num_pipes == 0)
return;

intel_init_display(dev);

if (IS_GEN2(dev)) {
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/intel_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ void intel_fb_restore_mode(struct drm_device *dev)
struct drm_mode_config *config = &dev->mode_config;
struct drm_plane *plane;

if (INTEL_INFO(dev)->num_pipes == 0)
return;

drm_modeset_lock_all(dev);

ret = drm_fb_helper_restore_fbdev_mode(&dev_priv->fbdev->helper);
Expand Down

0 comments on commit e3c7475

Please sign in to comment.