diff options
| author | Jani Nikula <[email protected]> | 2024-08-01 10:06:09 +0000 |
|---|---|---|
| committer | Jani Nikula <[email protected]> | 2024-08-01 10:06:09 +0000 |
| commit | 3663e2c4bc45fcdc71931fcbfcbfbf9b71f55c83 (patch) | |
| tree | 3927fa90c7faa89131fcf2e789ca9de97a65dc5f /drivers/gpu/drm/display/drm_dp_mst_topology.c | |
| parent | drm/i915: remove unused HAS_BROKEN_CS_TLB() (diff) | |
| parent | Linux 6.11-rc1 (diff) | |
| download | kernel-3663e2c4bc45fcdc71931fcbfcbfbf9b71f55c83.tar.gz kernel-3663e2c4bc45fcdc71931fcbfcbfbf9b71f55c83.zip | |
Merge drm/drm-next into drm-intel-next
Sync with v6.11-rc1 in general, and specifically get the new
BACKLIGHT_POWER_ constants for power states.
Signed-off-by: Jani Nikula <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/display/drm_dp_mst_topology.c')
| -rw-r--r-- | drivers/gpu/drm/display/drm_dp_mst_topology.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c index a892ef8e8a2d..bcc5bbed9bd0 100644 --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c @@ -2931,7 +2931,7 @@ static int drm_dp_send_link_address(struct drm_dp_mst_topology_mgr *mgr, /* FIXME: Actually do some real error handling here */ ret = drm_dp_mst_wait_tx_reply(mstb, txmsg); - if (ret <= 0) { + if (ret < 0) { drm_err(mgr->dev, "Sending link address failed with %d\n", ret); goto out; } @@ -2983,7 +2983,7 @@ static int drm_dp_send_link_address(struct drm_dp_mst_topology_mgr *mgr, mutex_unlock(&mgr->lock); out: - if (ret <= 0) + if (ret < 0) mstb->link_address_sent = false; kfree(txmsg); return ret < 0 ? ret : changed; @@ -4098,6 +4098,7 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) if (up_req->msg.req_type == DP_CONNECTION_STATUS_NOTIFY) { const struct drm_dp_connection_status_notify *conn_stat = &up_req->msg.u.conn_stat; + bool handle_csn; drm_dbg_kms(mgr->dev, "Got CSN: pn: %d ldps:%d ddps: %d mcs: %d ip: %d pdt: %d\n", conn_stat->port_number, @@ -4106,6 +4107,16 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr) conn_stat->message_capability_status, conn_stat->input_port, conn_stat->peer_device_type); + + mutex_lock(&mgr->probe_lock); + handle_csn = mgr->mst_primary->link_address_sent; + mutex_unlock(&mgr->probe_lock); + + if (!handle_csn) { + drm_dbg_kms(mgr->dev, "Got CSN before finish topology probing. Skip it."); + kfree(up_req); + goto out; + } } else if (up_req->msg.req_type == DP_RESOURCE_STATUS_NOTIFY) { const struct drm_dp_resource_status_notify *res_stat = &up_req->msg.u.resource_stat; |
