• Imre Deak's avatar
    drm/i915/tc: Check the PLL type used by an enabled TC port · 10d29bdc
    Imre Deak authored
    The current way to determine during HW state sanitization if a PHY is
    connected in the expected way doesn't work in all cases. The check for
    this considers only the PHY ready/owned state and the initial TC mode
    which was determined earlier by the TC port HW readout - using the
    sink's HPD and the same PHY ready/owned states.
    
    For instance for an enabled DP-alt/TBT port without the PHY ready/owned
    flags set the initial mode will be TBT, and this will be regarded as a
    valid PHY state. However it's possible that the port is actually enabled
    in DP-alt mode, but for some reason the PHY ownership was not acquired.
    
    Make sure the driver can detect invalid PHY states as in the above
    example by checking the PHY ready/owned state wrt. the PLL type used.
    This should be the TBT PLL if the PHY is not owned and the MG (non-TBT)
    PLL if the PHY is owned.
    
    v2: Rebased on change passing crtc_state in the previous patch.
    Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230321220101.983366-3-imre.deak@intel.com
    10d29bdc
intel_tc.c 33.1 KB