drm/i915: get a runtime PM ref for the deferred GT powersave enabling
authorImre Deak <imre.deak@intel.com>
Mon, 14 Apr 2014 17:24:29 +0000 (20:24 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 5 May 2014 07:08:57 +0000 (09:08 +0200)
commitc6df39b5ea6342323a42edfbeeca0a28c643d7ae
tree5b2c555b7209daaa8a4ecf387452c144b94f1824
parentdc1d0136a48d7ad858b5158413def90b9d818503
drm/i915: get a runtime PM ref for the deferred GT powersave enabling

At least on VLV but probably on other platforms too we depend on RC6
being enabled for RPM, so disable RPM until the delayed RC6 enabling
completes.

v2:
- explain the reason for the _noresume version of RPM get (Daniel)
- use the simpler 'if (schedule_work()) rpm_get();' instead of
  'if (!cancel_work_sync()) rpm_get(); schedule_work();'

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
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pm.c