• Juston Li's avatar
    drm/i915/hdcp: reuse rx_info for mst stream type1 capability check · 3e31d057
    Juston Li authored
    On some MST docking stations, rx_info can only be read after
    RepeaterAuth_Send_ReceiverID_List and the RxStatus READY bit is set
    otherwise the read will return -EIO.
    
    This behavior causes the mst stream type1 capability test to fail to
    read rx_info and determine if the topology supports type1 and fallback
    to type0.
    
    To fix this, check for type1 capability when we receive rx_info within
    the AKE flow when we read RepeaterAuth_Send_ReceiverID_List instead
    of an explicit read just for type1 capability checking.
    
    This does require moving where we set stream_types to after
    hdcp2_authenticate_sink() when we get rx_info but this occurs before we
    do hdcp2_propagate_stream_management_info.
    
    Also, legacy HDCP 2.0/2.1 are not type 1 capable either so check for
    that as well.
    
    Changes since v5:
     - rename intel_set_stream_types() to intel_hdcp_prepare_streams()
       (Anshuman)
    
    Changes since v4:
     - move topology_type1_capable to intel_digital_port and rename it as
       hdcp_mst_type1_capable (Anshuman)
     - make a helper function intel_set_stream_types() to set stream types
       in hdcp2_authenticate_and_encrypt() (Anshuman)
     - break on failure to set stream types and retry instead of returning
     - remove no longer used declaration for streams_type1_capable()
    
    Changes since v2:
     - Remove no longer used variables in _intel_hdcp2_enable()
    Signed-off-by: default avatarJuston Li <juston.li@intel.com>
    Reviewed-by: default avatarRamalingam C <ramalingam.c@intel.com>
    Reviewed-by: default avatarAnshuman Gupta <anshuman.gupta@intel.com>
    Tested-by: default avatarSuraj K <suraj.kandpal@intel.com>
    Signed-off-by: default avatarAnshuman Gupta <anshuman.gupta@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210819184835.1181323-4-juston.li@intel.com
    3e31d057
intel_dp_hdcp.c 22.2 KB