Skip to content

Commit

Permalink
drm/i915: correct suspend/resume ordering
Browse files Browse the repository at this point in the history
We need to save register state *after* idling GEM, clearing the ring,
and uninstalling the IRQ handler, or we might end up saving bogus
fence regs, for one.  Our restore ordering should already be correct,
since we do GEM, ring and IRQ init after restoring the last register
state, which prevents us from clobbering things.

I put this together to potentially address a bug, but I haven't heard
back if it fixes it yet.  However I think it stands on its own, so I'm
sending it in.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
  • Loading branch information
Jesse Barnes authored and Eric Anholt committed Jun 23, 2009
1 parent be9f1c4 commit 9e06dd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)

pci_save_state(dev->pdev);

i915_save_state(dev);

/* If KMS is active, we do the leavevt stuff here */
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
if (i915_gem_idle(dev))
Expand All @@ -77,6 +75,8 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
drm_irq_uninstall(dev);
}

i915_save_state(dev);

intel_opregion_free(dev, 1);

if (state.event == PM_EVENT_SUSPEND) {
Expand Down

0 comments on commit 9e06dd3

Please sign in to comment.