• Imre Deak's avatar
    drm/i915/dp_mst: Fix disabling MST on a port · 8d712a7e
    Imre Deak authored
    Currently MST on a port can get enabled/disabled from the hotplug work
    and get disabled from the short pulse work in a racy way. Fix this by
    relying on the MST state checking in the hotplug work and just schedule
    a hotplug work from the short pulse handler if some problem happened
    during the MST interrupt handling.
    
    This removes the explicit MST disabling in case of an AUX failure, but
    if AUX fails, then probably the detection will also fail during the
    scheduled hotplug work and it's not guaranteed that we'll see
    intermittent errors anyway.
    
    While at it also simplify the error checking of the MST interrupt
    handler.
    
    v2:
    - Convert intel_dp_check_mst_status() to return bool. (Ville)
    - Change the intel_dp->is_mst check to an assert, since after this patch
      the condition can't change after we checked it previously.
    - Document the return value from intel_dp_check_mst_status().
    v3:
    - Remove the intel_dp->is_mst check from intel_dp_check_mst_status().
      There is no point in checking the same condition twice, even though
      there is a chance that the hotplug work running concurrently changes
      it.
    
    Cc: José Roberto de Souza <jose.souza@intel.com>
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
    Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20200605094801.17709-1-imre.deak@intel.com
    8d712a7e
intel_dp.c 237 KB