drm/dp/mst: save vcpi with payloads
authorHarry Wentland <harry.wentland@amd.com>
Mon, 7 Dec 2015 18:55:52 +0000 (13:55 -0500)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 15 Dec 2015 09:22:28 +0000 (10:22 +0100)
This makes it possibly for drivers to find the associated
mst_port by looking at the payload allocation table.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1449514552-10236-3-git-send-email-harry.wentland@amd.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_dp_mst_topology.c

index 64a0a37296435f0c9b81ddcc232ec2413d3fb494..3b6627dde9ffdff3c52c4b62eb46b183ae790976 100644 (file)
@@ -1673,6 +1673,7 @@ int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr)
                if (mgr->proposed_vcpis[i]) {
                        port = container_of(mgr->proposed_vcpis[i], struct drm_dp_mst_port, vcpi);
                        req_payload.num_slots = mgr->proposed_vcpis[i]->num_slots;
+                       req_payload.vcpi = mgr->proposed_vcpis[i]->vcpi;
                } else {
                        port = NULL;
                        req_payload.num_slots = 0;
@@ -1688,6 +1689,7 @@ int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr)
                        if (req_payload.num_slots) {
                                drm_dp_create_payload_step1(mgr, mgr->proposed_vcpis[i]->vcpi, &req_payload);
                                mgr->payloads[i].num_slots = req_payload.num_slots;
+                               mgr->payloads[i].vcpi = req_payload.vcpi;
                        } else if (mgr->payloads[i].num_slots) {
                                mgr->payloads[i].num_slots = 0;
                                drm_dp_destroy_payload_step1(mgr, port, port->vcpi.vcpi, &mgr->payloads[i]);