Skip to content
  • Ville Syrjälä's avatar
    drm/i915: Kill check_power_well() calls · 7f1241ed
    Ville Syrjälä authored
    pps_{lock,unlock}() call intel_display_power_{get,put}() outside
    pps_mutes to avoid deadlocks with the power_domain mutex. In theory
    during aux transfers we should usually have the relevant power domain
    references already held by some higher level code, so this should not
    result in much overhead (exception being userspace i2c-dev access).
    However thanks to the check_power_well() calls in
    intel_display_power_{get/put}() we end up doing a few Punit reads for
    each aux transfer. Obviously doing this for each byte transferred via
    i2c-over-aux is not a good idea.
    
    I can't think of a good way to keep check_power_well() while eliminating
    the overhead, so let's just remove check_power_well() entirely.
    
    Fixes a driver init time regression introduced by:
     commit 773538e8
     Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
     Date:   Thu Sep 4 14:54:56 2014 +0300
    
        drm/i915: Reset power sequencer pipe tracking when disp2d is off
    
    Credit goes to Jani for figuring this out.
    
    v2: Add the regression note in the commit message.
    
    Cc: stable@vger.kernel.org (v3.18+)
    Cc: Egbert Eich <eich@suse.de>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86201
    
    
    Tested-by: default avatarWendy Wang <wendy.wang@intel.com>
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
    7f1241ed