drm/i915: get a permanent RPM reference on platforms w/o RPM support
authorImre Deak <imre.deak@intel.com>
Thu, 17 Dec 2015 11:44:56 +0000 (13:44 +0200)
committerImre Deak <imre.deak@intel.com>
Thu, 17 Dec 2015 13:59:38 +0000 (15:59 +0200)
commit25b181b46e4340f69793a886f2cd46608487783b
tree44b15599da033b6e0a31f55b3bb29d6f92efb98f
parentb268c699aca5c17d997d358d25256fc6abefd29c
drm/i915: get a permanent RPM reference on platforms w/o RPM support

Currently we disable RPM functionality on platforms that doesn't support
this by not putting/getting the RPM reference we receive from the RPM
core during driver loading/unloading respectively. This is somewhat
obscure, so make it more explicit by keeping a reference dedicated for
this particular purpose whenever the driver is loaded. This makes it
possible to remove the HAS_RUNTIME_PM() special casing from every other
places in the next patch.

v2:
- fix intel_runtime_pm_get vs. intel_runtime_pm_put in
  intel_power_domains_fini()
v3:
- take only a low level RPM reference so the ref tracking asserts
  continue to work (Ville)
- update the commit message
- move the patch earlier for bisectability

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1450352696-16135-1-git-send-email-imre.deak@intel.com
drivers/gpu/drm/i915/intel_runtime_pm.c