Skip to content

Commit

Permalink
drm/i915: remove dead code from legacy suspend handler
Browse files Browse the repository at this point in the history
The legacy DRM suspend logic (effective in UMS) doesn't handle any S4 thaw
events so we don't need to care about it either. Only S3 suspend and S4
freeze events are handled. Leave an assert behind to be sure.

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>
  • Loading branch information
Imre Deak authored and Daniel Vetter committed Oct 24, 2014
1 parent 409ee76 commit 0b14cbd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,9 @@ int i915_suspend(struct drm_device *dev, pm_message_t state)
return -ENODEV;
}

if (state.event == PM_EVENT_PRETHAW)
return 0;

if (WARN_ON_ONCE(state.event != PM_EVENT_SUSPEND &&
state.event != PM_EVENT_FREEZE))
return -EINVAL;

if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
return 0;
Expand Down

0 comments on commit 0b14cbd

Please sign in to comment.