]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: fix S4 suspend while switcheroo state is off
authorImre Deak <imre.deak@intel.com>
Thu, 23 Oct 2014 16:23:19 +0000 (19:23 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 24 Oct 2014 14:34:17 +0000 (16:34 +0200)
commit364aa12a4aa971541d5874ceaa98647dc7faf4d3
treeeba64f4082661f935ee9c5bbf1cdf303b0d9bcb5
parent074076b5e61f8fd509433116ba08d24d6e82b859
drm/i915: fix S4 suspend while switcheroo state is off

If the device is suspended already through the switcheroo interface we
shouldn't suspend it again or resume it after suspend. We have the
corresponding check for S3 suspend already, add it for all the other
S3 and S4 handlers. Also move the check from i915_resume_early() to
i915_resume_legacy(), so that it's done in the high level handler for
all PM events.

v2:
- fix the resume path too, we don't need to special case there
  DRM_SWITCH_POWER_OFF with the device being enabled (in which case we'd
  have to disable the device), since that never happens (Ville)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c