• Imre Deak's avatar
    drm/i915: Remove the unneeded AUX power ref from intel_dp_detect() · 6cfe7ec0
    Imre Deak authored
    We don't need the AUX power for the whole duration of the detect, only
    when we're doing AUX transfers. The AUX transfer function takes its own
    reference on the AUX power domain already. The two places during detect
    which access display core registers (not specific to a
    pipe/port/transcoder) only need the power domain that is required for
    that access. That power domain is equivalent to the device global power
    domain on most platforms (enabled whenever we hold a runtime PM
    reference) except on CHV/VLV where it's equivalent to the display power
    well.
    
    Add a new power domain that reflects the above, and use this at the two
    spots accessing registers. With that we can avoid taking the AUX
    reference for the whole duration of the detect function.
    
    Put the domains asynchronously to avoid the unneeded on-off-on toggling.
    
    Also adapt the idea from with_intel_runtime_pm et al. for making it easy
    to write short sequences where a display power ref is needed.
    
    v2: (Ville)
    - Add with_intel_display_power() helper to simplify things.
    - s/bool res/bool is_connected/
    
    Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
    Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-8-imre.deak@intel.com
    6cfe7ec0
intel_display.h 12.6 KB