Skip to content

Commit

Permalink
drm/i915: put runtime PM only at the end of intel_mark_idle
Browse files Browse the repository at this point in the history
Because intel_mark_idle still touches some registers: it needs the
machine to be awake. If you set both the autosuspend and PC8 delays to
zero, you can get a "Device suspended" WARN when gen6_rps_idle touches
registers.

This is not easy to reproduce, but happens once in a while when
running pm_pc8.

Testcase: igt/pm_pc8
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Paulo Zanoni authored and Daniel Vetter committed Mar 5, 2014
1 parent ccc7bed commit bb4cdd5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -8215,10 +8215,8 @@ void intel_mark_idle(struct drm_device *dev)

dev_priv->mm.busy = false;

hsw_package_c8_gpu_idle(dev_priv);

if (!i915.powersave)
return;
goto out;

list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
if (!crtc->fb)
Expand All @@ -8229,6 +8227,9 @@ void intel_mark_idle(struct drm_device *dev)

if (INTEL_INFO(dev)->gen >= 6)
gen6_rps_idle(dev->dev_private);

out:
hsw_package_c8_gpu_idle(dev_priv);
}

void intel_mark_fb_busy(struct drm_i915_gem_object *obj,
Expand Down

0 comments on commit bb4cdd5

Please sign in to comment.