1. 17 2月, 2016 1 次提交
    • I
      drm/i915: Add helper to get a display power ref if it was already enabled · 09731280
      Imre Deak 提交于
      We have many places in the code where we check if a given display power
      domain is enabled and if so access registers backed by this power
      domain. We assumed that some modeset lock will prevent the power
      reference from vanishing in the middle of the HW access, but this
      assumption doesn't always hold. In such cases we get either the wakeref
      not held, or an unclaimed register access error message. To fix this in
      a future-proof way that's independent of other locks wrap any such
      access with a get_ref_if_enabled()/put_ref() pair.
      
      Kudos to Ville and Joonas for the ideas of this new interface.
      
      v2:
      - init the power_domains ptr when declaring it everywhere (Joonas)
      v3:
      - don't report the device to be powered if runtime PM is disabled
      
      CC: Mika Kuoppala <mika.kuoppala@intel.com>
      CC: Chris Wilson <chris@chris-wilson.co.uk>
      CC: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      CC: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1455711462-7442-1-git-send-email-imre.deak@intel.com
      09731280
  2. 12 1月, 2016 1 次提交
  3. 09 1月, 2016 1 次提交
  4. 07 1月, 2016 1 次提交
  5. 18 12月, 2015 1 次提交
  6. 17 12月, 2015 8 次提交
  7. 02 12月, 2015 2 次提交
  8. 25 11月, 2015 1 次提交
  9. 23 11月, 2015 3 次提交
  10. 18 11月, 2015 17 次提交
  11. 12 11月, 2015 3 次提交
  12. 11 11月, 2015 1 次提交
    • V
      drm/i915: Kill intel_runtime_pm_disable() · 18a04a73
      Ville Syrjälä 提交于
      intel_runtime_pm_disable() takes an extra rpm reference which combined
      with the one we leak from intel_display_set_init_power() leaves the
      usage count at <original>+1 after the driver has been unloaded.
      The original ref is dropped explicitly in intel_runtime_pm_enable().
      So the next time we load the driver we can no longer do runtime PM ever.
      
      This used to work, but
      commit 292b990e ("drm/i915: Update power domains on readout.")
      broke things by not dropping the init power domain during fbdev
      teardown. Based on the comment in intel_power_domains_fini(), the
      way it used to to work wasn't intentional. As in we weren't supposed
      to drop the init power during driver unload. And since we no longer
      do, we now leak an extra rpm reference.
      
      So fix things by throwing intel_runtime_pm_disable() to the bin, so
      that the only leaked reference comes from the init power domain.
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Daniel Stone <daniels@collabora.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Fixes: 292b990e ("drm/i915: Update power domains on readout.")
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1446815313-9490-2-git-send-email-ville.syrjala@linux.intel.comReviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      18a04a73