]> git.karo-electronics.de Git - linux-beck.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)
commit097dd83763bfe8e8643957c0b90819742fb01cd9
treeeba64f4082661f935ee9c5bbf1cdf303b0d9bcb5
parent5a17514ed924201f1465e4a2f5209bdb192d8dff
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