From dfda0df3426483cf5fc7441f23f318edbabecb03 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 6 Aug 2014 16:26:21 +1000 Subject: drm/mst: rework payload table allocation to conform better. The old code has problems with the Dell MST monitors due to some assumptions I made that weren't true. I initially thought the Virtual Channel Payload IDs had to be in the DPCD table in ascending order, however it appears that assumption is bogus. The old code also assumed it was possible to insert a member into the table and it would move other members up, like it does when you remove table entries, however reality has shown this isn't true. So the new code allocates VCPIs separate from entries in the payload tracking table, and when we remove an entry from the DPCD table, I shuffle the tracking payload entries around in the struct. This appears to make VT switch more robust (still not perfect) with an MST enabled Dell monitor. Signed-off-by: Dave Airlie --- include/drm/drm_dp_mst_helper.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/drm/drm_dp_mst_helper.h') diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h index 9b446ada253..338fc105383 100644 --- a/include/drm/drm_dp_mst_helper.h +++ b/include/drm/drm_dp_mst_helper.h @@ -388,6 +388,7 @@ struct drm_dp_payload { int payload_state; int start_slot; int num_slots; + int vcpi; }; /** @@ -454,6 +455,7 @@ struct drm_dp_mst_topology_mgr { struct drm_dp_vcpi **proposed_vcpis; struct drm_dp_payload *payloads; unsigned long payload_mask; + unsigned long vcpi_mask; wait_queue_head_t tx_waitq; struct work_struct work; -- cgit v1.2.3-70-g09d2