1. 28 Apr, 2020 39 commits
  2. 27 Apr, 2020 1 commit
    • Lyude Paul's avatar
      drm/dp_mst: Kill the second sideband tx slot, save the world · d308a881
      Lyude Paul authored
      While we support using both tx slots for sideband transmissions, it
      appears that DisplayPort devices in the field didn't end up doing a very
      good job of supporting it. From section 5.2.1 of the DP 2.0
      specification:
      
        There are MST Sink/Branch devices in the field that do not handle
        interleaved message transactions.
      
        To facilitate message transaction handling by downstream devices, an
        MST Source device shall generate message transactions in an atomic
        manner (i.e., the MST Source device shall not concurrently interleave
        multiple message transactions). Therefore, an MST Source device shall
        clear the Message_Sequence_No value in the Sideband_MSG_Header to 0.
      
      This might come as a bit of a surprise since the vast majority of hubs
      will support using both tx slots even if they don't support interleaved
      message transactions, and we've also been using both tx slots since MST
      was introduced into the kernel.
      
      However, there is one device we've had trouble getting working
      consistently with MST for so long that we actually assumed it was just
      broken: the infamous Dell P2415Qb. Previously this monitor would appear
      to work sometimes, but in most situations would end up timing out
      LINK_ADDRESS messages almost at random until you power cycled the whole
      display. After reading section 5.2.1 in the DP 2.0 spec, some closer
      investigation into this infamous display revealed it was only ever
      timing out on sideband messages in the second TX slot.
      
      Sure enough, avoiding the second TX slot has suddenly made this monitor
      function perfectly for the first time in five years. And since they
      explicitly mention this in the specification, I doubt this is the only
      monitor out there with this issue. This might even explain explain the
      seemingly harmless garbage sideband responses we would occasionally see
      with MST hubs!
      
      So - rewrite our sideband TX handlers to only support one TX slot. In
      order to simplify our sideband handling now that we don't support
      transmitting to multiple MSTBs at once, we also move all state tracking
      for down replies from mstbs to the topology manager.
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Fixes: ad7f8a1f ("drm/helper: add Displayport multi-stream helper (v0.6)")
      Cc: Sean Paul <sean@poorly.run>
      Cc: "Lin, Wayne" <Wayne.Lin@amd.com>
      Cc: <stable@vger.kernel.org> # v3.17+
      Reviewed-by: default avatarSean Paul <sean@poorly.run>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200424181308.770749-1-lyude@redhat.com
      d308a881