search for: drm_dp_mst_handle_up_req

Displaying 20 results from an estimated 24 matches for "drm_dp_mst_handle_up_req".

2019 Sep 03
0
[PATCH v2 10/27] drm/dp_mst: Remove huge conditional in drm_dp_mst_handle_up_req()
...rm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 241c66f75bed..43452872efad 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -3245,7 +3245,9 @@ static int drm_dp_mst_handle_down_rep(struct drm_dp_mst_topology_mgr *mgr) static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) { - int ret = 0; + struct drm_dp_sideband_msg_req_body msg; + struct drm_dp_mst_branch *mstb = NULL; + bool seqno; if (!drm_dp_get_one_sb_msg(mgr, true)) { memset(&mgr->up_req_recv, 0, @@ -3253,62 +3255,60 @@ static int drm_dp_mst_handle_up_req(st...
2019 Sep 03
0
[PATCH v2 12/27] drm/dp_mst: Refactor drm_dp_mst_handle_up_req()
...rm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index b44d3696c09a..64487098158a 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -3246,68 +3246,69 @@ static int drm_dp_mst_handle_down_rep(struct drm_dp_mst_topology_mgr *mgr) static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) { struct drm_dp_sideband_msg_req_body msg; + struct drm_dp_sideband_msg_hdr *hdr = &mgr->up_req_recv.initial_hdr; struct drm_dp_mst_branch *mstb = NULL; + const u8 *guid; bool seqno; - if (!drm_dp_get_one_sb_msg(mgr, true)) { - memset(&mgr-&...
2019 Sep 03
0
[PATCH v2 19/27] drm/dp_mst: Handle UP requests asynchronously
...uses messaging timeouts and causes the whole topology state to go out of sync with reality, usually resulting in the user needing to replug the entire topology in hopes that it actually fixes things. The reason for this is because the way we currently handle UP requests in MST is completely bogus. drm_dp_mst_handle_up_req() is called from drm_dp_mst_hpd_irq(), which is usually called from the driver's hotplug handler. Because we handle sending the hotplug event from this function, we actually cause the driver's hotplug handler (and in turn, all sideband transactions) to block on drm_device->mode_config.co...
2019 Oct 22
0
[PATCH v5 04/14] drm/dp_mst: Handle UP requests asynchronously
...uses messaging timeouts and causes the whole topology state to go out of sync with reality, usually resulting in the user needing to replug the entire topology in hopes that it actually fixes things. The reason for this is because the way we currently handle UP requests in MST is completely bogus. drm_dp_mst_handle_up_req() is called from drm_dp_mst_hpd_irq(), which is usually called from the driver's hotplug handler. Because we handle sending the hotplug event from this function, we actually cause the driver's hotplug handler (and in turn, all sideband transactions) to block on drm_device->mode_config.co...
2019 Sep 03
0
[PATCH v2 17/27] drm/dp_mst: Rename drm_dp_add_port and drm_dp_update_port
...y->guid); for (i = 0; i < reply->nports; i++) - drm_dp_add_port(mstb, mgr->dev, &reply->ports[i]); + drm_dp_mst_handle_link_address_port(mstb, mgr->dev, + &reply->ports[i]); drm_kms_helper_hotplug_event(mgr->dev); @@ -3324,7 +3327,7 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) } if (msg.req_type == DP_CONNECTION_STATUS_NOTIFY) { - drm_dp_update_port(mstb, &msg.u.conn_stat); + drm_dp_mst_handle_conn_stat(mstb, &msg.u.conn_stat); DRM_DEBUG_KMS("Got CSN: pn: %d ldps:%d ddps: %d mcs: %d ip: %d pdt: %d\n",...
2019 Sep 03
0
[PATCH v2 13/27] drm/dp_mst: Refactor drm_dp_mst_handle_down_rep()
...lock); - wake_up_all(&mgr->tx_waitq); - } - return ret; + wake_up_all(&mgr->tx_waitq); + + return 0; + +no_msg: + drm_dp_mst_topology_put_mstb(mstb); +clear_down_rep_recv: + memset(&mgr->down_rep_recv, 0, sizeof(struct drm_dp_sideband_msg_rx)); + + return 0; } static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) -- 2.21.0
2019 Jul 18
2
[PATCH 00/26] DP MST Refactors + debugging tools + suspend/resume reprobing
...ter() drm/dp_mst: Add sideband down request tracing + selftests drm/dp_mst: Move PDT teardown for ports into destroy_connector_work drm/dp_mst: Get rid of list clear in drm_dp_finish_destroy_port() drm/dp_mst: Refactor drm_dp_send_enum_path_resources drm/dp_mst: Remove huge conditional in drm_dp_mst_handle_up_req() drm/dp_mst: Constify guid in drm_dp_get_mst_branch_by_guid() drm/dp_mst: Refactor drm_dp_mst_handle_up_req() drm/dp_mst: Refactor drm_dp_mst_handle_down_rep() drm/dp_mst: Destroy topology_mgr mutexes drm/dp_mst: Cleanup drm_dp_send_link_address() a bit drm/dp_mst: Refactor pdt setup/t...
2019 Oct 22
0
[PATCH v5 05/14] drm/dp_mst: Add probe_lock
...ock(&mgr->up_req_lock); up_req = list_first_entry_or_null(&mgr->up_req_list, @@ -3328,6 +3333,7 @@ static void drm_dp_mst_up_req_work(struct work_struct *work) drm_dp_mst_process_up_req(mgr, up_req); kfree(up_req); } + mutex_unlock(&mgr->probe_lock); } static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) @@ -4349,6 +4355,7 @@ int drm_dp_mst_topology_mgr_init(struct drm_dp_mst_topology_mgr *mgr, mutex_init(&mgr->payload_lock); mutex_init(&mgr->delayed_destroy_lock); mutex_init(&mgr->up_req_lock); + mutex_init(&mgr->probe_lock);...
2019 Oct 22
0
[PATCH v5 06/14] drm/dp_mst: Protect drm_dp_mst_port members with locking
...ue by using &mgr->base.lock, the modesetting lock which currently only protects &mgr->base.state. This works perfectly because it allows us to avoid blocking connection_mutex unnecessarily, and we can grab this in connector detection paths since it's a ww mutex. We start by having drm_dp_mst_handle_up_req() hold this when updating ports. For drm_dp_mst_handle_link_address_port() things are a bit more complicated. As I've learned the hard way, we can grab &mgr->lock.base for everything except for port->connector. See, our normal driver probing paths end up generating this rather obvious...
2018 Dec 20
0
[PATCH v2 01/16] drm/dp_mst: Rename drm_dp_mst_get_validated_(port|mstb)_ref and friends
..._topology_mgr *mgr) } memset(&mgr->down_rep_recv, 0, sizeof(struct drm_dp_sideband_msg_rx)); - drm_dp_put_mst_branch_device(mstb); + drm_dp_mst_topology_put_mstb(mstb); mutex_lock(&mgr->qlock); txmsg->state = DRM_DP_SIDEBAND_TX_RX; @@ -2441,7 +2451,7 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) } if (mstb) - drm_dp_put_mst_branch_device(mstb); + drm_dp_mst_topology_put_mstb(mstb); memset(&mgr->up_req_recv, 0, sizeof(struct drm_dp_sideband_msg_rx)); } @@ -2501,7 +2511,7 @@ enum drm_connector_status drm_dp_mst_detect_port(struct...
2019 Oct 22
17
[PATCH v5 00/14] DP MST Refactors + debugging tools + suspend/resume reprobing
This is the final portion of the large series for adding MST suspend/resume reprobing that I've been working on for quite a while now. In addition, I: * Refactored and cleaned up any code I ended up digging through in the process of understanding how some parts of these helpers worked. * Added some debugging tools along the way that I ended up needing to figure out some issues in my own
2020 Feb 12
8
[PATCH 0/4] drm/nouveau: DP interlace fixes
Currently, nouveau doesn't actually bother to try probing whether or not it can actually handle interlaced modes over DisplayPort. As a result, on volta and later we'll end up trying to set an interlaced mode even when it's not supported and cause the front end for the display engine to hang. So, let's teach nouveau to reject interlaced modes on hardware that can't actually
2019 Sep 03
50
[PATCH v2 00/27] DP MST Refactors + debugging tools + suspend/resume reprobing
...) drm/dp_mst: Combine redundant cases in drm_dp_encode_sideband_req() drm/dp_mst: Add sideband down request tracing + selftests drm/dp_mst: Remove PDT teardown in drm_dp_destroy_port() and refactor drm/dp_mst: Refactor drm_dp_send_enum_path_resources drm/dp_mst: Remove huge conditional in drm_dp_mst_handle_up_req() drm/dp_mst: Constify guid in drm_dp_get_mst_branch_by_guid() drm/dp_mst: Refactor drm_dp_mst_handle_up_req() drm/dp_mst: Refactor drm_dp_mst_handle_down_rep() drm/dp_mst: Destroy topology_mgr mutexes drm/dp_mst: Cleanup drm_dp_send_link_address() a bit drm/dp_mst: Refactor pdt setup/t...
2018 Dec 14
0
[WIP PATCH 03/15] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports
..._topology_mgr *mgr) } memset(&mgr->down_rep_recv, 0, sizeof(struct drm_dp_sideband_msg_rx)); - drm_dp_put_mst_branch_device(mstb); + drm_dp_mst_topology_put_mstb(mstb); mutex_lock(&mgr->qlock); txmsg->state = DRM_DP_SIDEBAND_TX_RX; @@ -2441,7 +2709,7 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) } if (mstb) - drm_dp_put_mst_branch_device(mstb); + drm_dp_mst_topology_put_mstb(mstb); memset(&mgr->up_req_recv, 0, sizeof(struct drm_dp_sideband_msg_rx)); } @@ -2501,7 +2769,7 @@ enum drm_connector_status drm_dp_mst_detect_port(struct...
2018 Dec 14
2
[WIP PATCH 03/15] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports
...memset(&mgr->down_rep_recv, 0, sizeof(struct drm_dp_sideband_msg_rx)); > - drm_dp_put_mst_branch_device(mstb); > + drm_dp_mst_topology_put_mstb(mstb); > > mutex_lock(&mgr->qlock); > txmsg->state = DRM_DP_SIDEBAND_TX_RX; > @@ -2441,7 +2709,7 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) > } > > if (mstb) > - drm_dp_put_mst_branch_device(mstb); > + drm_dp_mst_topology_put_mstb(mstb); > > memset(&mgr->up_req_recv, 0, sizeof(struct drm_dp_sideband_msg_rx)); > } > @@ -2501,7 +2769,7 @@ enum drm_c...
2018 Dec 19
1
[WIP PATCH 03/15] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports
...ideband_msg_rx)); > > > - drm_dp_put_mst_branch_device(mstb); > > > + drm_dp_mst_topology_put_mstb(mstb); > > > > > > mutex_lock(&mgr->qlock); > > > txmsg->state = DRM_DP_SIDEBAND_TX_RX; > > > @@ -2441,7 +2709,7 @@ static int drm_dp_mst_handle_up_req(struct > > > drm_dp_mst_topology_mgr *mgr) > > > } > > > > > > if (mstb) > > > - drm_dp_put_mst_branch_device(mstb); > > > + drm_dp_mst_topology_put_mstb(mstb); > > > > > > memset(&mgr->up_req_recv, 0, s...
2018 Dec 18
0
[WIP PATCH 03/15] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports
...zeof(struct > > drm_dp_sideband_msg_rx)); > > - drm_dp_put_mst_branch_device(mstb); > > + drm_dp_mst_topology_put_mstb(mstb); > > > > mutex_lock(&mgr->qlock); > > txmsg->state = DRM_DP_SIDEBAND_TX_RX; > > @@ -2441,7 +2709,7 @@ static int drm_dp_mst_handle_up_req(struct > > drm_dp_mst_topology_mgr *mgr) > > } > > > > if (mstb) > > - drm_dp_put_mst_branch_device(mstb); > > + drm_dp_mst_topology_put_mstb(mstb); > > > > memset(&mgr->up_req_recv, 0, sizeof(struct > > drm_dp_sideband_m...
2018 Dec 20
22
[PATCH v2 00/16] MST refcounting/atomic helpers cleanup
This is the series I've been working on for a while now to get all of the atomic DRM drivers in the tree to use the atomic MST helpers, and to make the atomic MST helpers actually idempotent. Turns out it's a lot more difficult to do that without also fixing how port and branch device refcounting works so that it actually makes sense, since the current upstream implementation requires a
2018 Dec 14
22
[WIP PATCH 00/15] MST refcounting/atomic helpers cleanup
This is a WIP version of the series I've been working on for a while now to get all of the atomic DRM drivers in the tree to use the atomic MST helpers, and to make the atomic MST helpers actually idempotent. Turns out it's a lot more difficult to do that without also fixing how port and branch device refcounting works so that it actually makes sense, since the current upstream
2019 Jan 03
16
[PATCH v3 00/16] MST refcounting/atomic helpers cleanup
This is the series I've been working on for a while now to get all of the atomic DRM drivers in the tree to use the atomic MST helpers, and to make the atomic MST helpers actually idempotent. Turns out it's a lot more difficult to do that without also fixing how port and branch device refcounting works so that it actually makes sense, since the current upstream implementation requires a