1. 11 Nov, 2015 2 commits
    • Ville Syrjälä's avatar
      drm/i915: Do fbdev fini first during unload · 2013bfc0
      Ville Syrjälä authored
      We set up fbdev last during load, so doing the fbdev cleanup should be
      first.
      
      We weren't supposed to drop the init power during driver unload, but since
      the fbdev teardown happened after intel_power_domains_fini() that could
      have happened due in one of two ways. First it could have happened
      during the modeset caused by normal fbdev cleanup. But in addition it
      could have happened already via the intel_fbdev_initial_config() since
      that is executed asynhronously, and the async_synchronize_full() was
      done during fbdev cleanup, after intel_power_domains_fini(). All of
      that got eliminated by
      commit 292b990e ("drm/i915: Update power domains on readout.")
      since we now drop the init power synchronously during driver load.
      
      So there is no real bug wrt. the init power anymore, but still it seems
      better to do the fbdev cleanup first, before we've potentially cleaned
      up something else important.
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1446815313-9490-3-git-send-email-ville.syrjala@linux.intel.comReviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      2013bfc0
    • Ville Syrjälä's avatar
      drm/i915: Kill intel_runtime_pm_disable() · 18a04a73
      Ville Syrjälä authored
      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: default avatarVille 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: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      18a04a73
  2. 10 Nov, 2015 27 commits
  3. 09 Nov, 2015 11 commits