Displaying 20 results from an estimated 33 matches for "available_pbn".
2020 Mar 05
4
[PATCH 2/3] drm/dp_mst: Don't show connectors as connected before probing available PBN
...t; > > *connector,
> > > ret = connector_status_connected;
> > > break;
> > > }
> > > +
> > > + /* We don't want to tell userspace the port is actually plugged into
> > > + * anything until we've finished probing it's available_pbn, otherwise
> >
> > "its"
> >
> > Why is the connector even registered before we've finished the probe?
> >
> Oops, I'm not sure how I did this by accident but the explanation I gave in
> the commit message was uh, completely wrong. I must hav...
2020 Mar 05
0
[PATCH 2/3] drm/dp_mst: Don't show connectors as connected before probing available PBN
...et = connector_status_connected;
> > > > break;
> > > > }
> > > > +
> > > > + /* We don't want to tell userspace the port is actually
> > > > plugged into
> > > > + * anything until we've finished probing it's available_pbn,
> > > > otherwise
> > >
> > > "its"
> > >
> > > Why is the connector even registered before we've finished the probe?
> > >
> > Oops, I'm not sure how I did this by accident but the explanation I gave
> > in...
2020 Mar 04
5
[PATCH 0/3] drm/dp_mst: Fix bandwidth checking regressions from DSC patches
AMD's patch series for adding DSC support to the MST helpers
unfortunately introduced a few regressions into the kernel that I didn't
get around to fixing until just now. I would have reverted the changes
earlier, but seeing as that would have reverted all of amd's DSC support
+ everything that was done on top of that I realllllly wanted to avoid
doing that.
Anyway, this should fix
2020 Mar 05
2
[PATCH 2/3] drm/dp_mst: Don't show connectors as connected before probing available PBN
...> @@ -4033,6 +4033,19 @@ drm_dp_mst_detect_port(struct drm_connector *connector,
> ret = connector_status_connected;
> break;
> }
> +
> + /* We don't want to tell userspace the port is actually plugged into
> + * anything until we've finished probing it's available_pbn, otherwise
"its"
Why is the connector even registered before we've finished the probe?
> + * userspace will see racy atomic check failures
> + *
> + * Since we always send a hotplug at the end of probing topology
> + * state, we can just let userspace reprobe this c...
2020 Mar 06
0
[PATCH 2/3] drm/dp_mst: Don't show connectors as connected before probing available PBN
...et = connector_status_connected;
> > > > break;
> > > > }
> > > > +
> > > > + /* We don't want to tell userspace the port is actually
> > > > plugged into
> > > > + * anything until we've finished probing it's available_pbn,
> > > > otherwise
> > >
> > > "its"
> > >
> > > Why is the connector even registered before we've finished the probe?
> > >
> > Oops, I'm not sure how I did this by accident but the explanation I gave
> > in...
2020 Mar 05
0
[PATCH 2/3] drm/dp_mst: Don't show connectors as connected before probing available PBN
...detect_port(struct drm_connector
> > *connector,
> > ret = connector_status_connected;
> > break;
> > }
> > +
> > + /* We don't want to tell userspace the port is actually plugged into
> > + * anything until we've finished probing it's available_pbn, otherwise
>
> "its"
>
> Why is the connector even registered before we've finished the probe?
>
Oops, I'm not sure how I did this by accident but the explanation I gave in
the commit message was uh, completely wrong. I must have forgotten that I made
sure we did...
2019 Sep 25
2
[PATCH v2 16/27] drm/dp_mst: Refactor pdt setup/teardown, add more locking
...if (old_ddps != port->ddps) {
> if (port->ddps) {
> if (!port->input) {
> - drm_dp_send_enum_path_resources(mstb->mgr,
> - mstb, port);
> + drm_dp_send_enum_path_resources(mgr, mstb,
> + port);
> }
> } else {
> port->available_pbn = 0;
> }
> }
>
> - if (old_pdt != port->pdt && !port->input) {
> - drm_dp_port_teardown_pdt(port, old_pdt);
> -
> - ret = drm_dp_port_setup_pdt(port);
> - if (ret == true)
> - drm_dp_send_link_address(mstb->mgr, port->mstb);
> + if (!por...
2019 Sep 25
1
[PATCH v2 20/27] drm/dp_mst: Protect drm_dp_mst_port members with connection_mutex
...ULL;
> +
> + drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
>
> - if (!port->ddps)
> + if (port->input || !port->ddps) {
> + drm_modeset_unlock(&dev->mode_config.connection_mutex);
> continue;
> + }
>
> if (!port->available_pbn)
> drm_dp_send_enum_path_resources(mgr, mstb, port);
>
> - if (port->mstb) {
> + if (port->mstb)
> mstb_child = drm_dp_mst_topology_get_mstb_validated(
> mgr, port->mstb);
> - if (mstb_child) {
> - drm_dp_check_and_send_link_address(mgr, mst...
2019 Sep 03
0
[PATCH v2 09/27] drm/dp_mst: Refactor drm_dp_send_enum_path_resources
...ROR("got incorrect port in response\n");
- DRM_DEBUG_KMS("enum path resources %d: %d %d\n", txmsg->reply.u.path_resources.port_number, txmsg->reply.u.path_resources.full_payload_bw_number,
- txmsg->reply.u.path_resources.avail_payload_bw_number);
- port->available_pbn = txmsg->reply.u.path_resources.avail_payload_bw_number;
+
+ DRM_DEBUG_KMS("enum path resources %d: %d %d\n",
+ path_res->port_number,
+ path_res->full_payload_bw_number,
+ path_res->avail_payload_bw_number);
+ port->available_pbn =
+ path_...
2020 Mar 04
0
[PATCH 2/3] drm/dp_mst: Don't show connectors as connected before probing available PBN
...ivers/gpu/drm/drm_dp_mst_topology.c
@@ -4033,6 +4033,19 @@ drm_dp_mst_detect_port(struct drm_connector *connector,
ret = connector_status_connected;
break;
}
+
+ /* We don't want to tell userspace the port is actually plugged into
+ * anything until we've finished probing it's available_pbn, otherwise
+ * userspace will see racy atomic check failures
+ *
+ * Since we always send a hotplug at the end of probing topology
+ * state, we can just let userspace reprobe this connector later.
+ */
+ if (ret == connector_status_connected && !port->available_pbn) {
+ DRM_DEBUG_...
2019 Oct 22
0
[PATCH v5 05/14] drm/dp_mst: Add probe_lock
...nk_address_sent)
drm_dp_send_link_address(mgr, mstb);
list_for_each_entry(port, &mstb->ports, next) {
- if (port->input)
- continue;
+ struct drm_dp_mst_branch *mstb_child = NULL;
- if (!port->ddps)
+ if (port->input || !port->ddps)
continue;
if (!port->available_pbn)
drm_dp_send_enum_path_resources(mgr, mstb, port);
- if (port->mstb) {
+ if (port->mstb)
mstb_child = drm_dp_mst_topology_get_mstb_validated(
mgr, port->mstb);
- if (mstb_child) {
- drm_dp_check_and_send_link_address(mgr, mstb_child);
- drm_dp_mst_topology_put_m...
2019 Oct 22
0
[PATCH v5 03/14] drm/dp_mst: Refactor pdt setup/teardown, add more locking
...k);
+ mutex_unlock(&mgr->lock);
}
if (old_ddps != port->ddps) {
if (port->ddps) {
if (!port->input) {
- drm_dp_send_enum_path_resources(mstb->mgr,
- mstb, port);
+ drm_dp_send_enum_path_resources(mgr, mstb,
+ port);
}
} else {
port->available_pbn = 0;
}
}
- if (old_pdt != port->pdt && !port->input) {
- drm_dp_port_teardown_pdt(port, old_pdt);
-
- ret = drm_dp_port_setup_pdt(port);
- if (ret == true)
- drm_dp_send_link_address(mstb->mgr, port->mstb);
+ if (!port->input) {
+ int ret = drm_dp_port_set_pdt(po...
2019 Sep 03
0
[PATCH v2 16/27] drm/dp_mst: Refactor pdt setup/teardown, add more locking
...k);
+ mutex_unlock(&mgr->lock);
}
if (old_ddps != port->ddps) {
if (port->ddps) {
if (!port->input) {
- drm_dp_send_enum_path_resources(mstb->mgr,
- mstb, port);
+ drm_dp_send_enum_path_resources(mgr, mstb,
+ port);
}
} else {
port->available_pbn = 0;
}
}
- if (old_pdt != port->pdt && !port->input) {
- drm_dp_port_teardown_pdt(port, old_pdt);
-
- ret = drm_dp_port_setup_pdt(port);
- if (ret == true)
- drm_dp_send_link_address(mstb->mgr, port->mstb);
+ if (!port->input) {
+ int ret = drm_dp_port_set_pdt(po...
2019 Sep 03
0
[PATCH v2 20/27] drm/dp_mst: Protect drm_dp_mst_port members with connection_mutex
...tinue;
+ struct drm_dp_mst_branch *mstb_child = NULL;
+
+ drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
- if (!port->ddps)
+ if (port->input || !port->ddps) {
+ drm_modeset_unlock(&dev->mode_config.connection_mutex);
continue;
+ }
if (!port->available_pbn)
drm_dp_send_enum_path_resources(mgr, mstb, port);
- if (port->mstb) {
+ if (port->mstb)
mstb_child = drm_dp_mst_topology_get_mstb_validated(
mgr, port->mstb);
- if (mstb_child) {
- drm_dp_check_and_send_link_address(mgr, mstb_child);
- drm_dp_mst_topology_put_m...
2019 Sep 25
0
[PATCH v2 16/27] drm/dp_mst: Refactor pdt setup/teardown, add more locking
...if (port->ddps) {
> > if (!port->input) {
> > - drm_dp_send_enum_path_resources(mstb->mgr,
> > - mstb, port);
> > + drm_dp_send_enum_path_resources(mgr, mstb,
> > + port);
> > }
> > } else {
> > port->available_pbn = 0;
> > }
> > }
> >
> > - if (old_pdt != port->pdt && !port->input) {
> > - drm_dp_port_teardown_pdt(port, old_pdt);
> > -
> > - ret = drm_dp_port_setup_pdt(port);
> > - if (ret == true)
> > - drm_dp_send_link_address(...
2019 Sep 03
0
[PATCH v2 12/27] drm/dp_mst: Refactor drm_dp_mst_handle_up_req()
...;Got MST reply from unknown device %d\n", mgr->up_req_recv.initial_hdr.lct);
- memset(&mgr->up_req_recv, 0, sizeof(struct drm_dp_sideband_msg_rx));
- return 0;
- }
-
- DRM_DEBUG_KMS("Got RSN: pn: %d avail_pbn %d\n", msg.u.resource_stat.port_number, msg.u.resource_stat.available_pbn);
+ DRM_DEBUG_KMS("Got RSN: pn: %d avail_pbn %d\n",
+ msg.u.resource_stat.port_number,
+ msg.u.resource_stat.available_pbn);
}
- if (mstb)
- drm_dp_mst_topology_put_mstb(mstb);
-
+ drm_dp_mst_topology_put_mstb(mstb);
+out:
memset(&mgr->up_req_recv, 0, sizeof...
2019 Sep 03
0
[PATCH v2 10/27] drm/dp_mst: Remove huge conditional in drm_dp_mst_handle_up_req()
...FY) {
+ drm_dp_send_up_ack_reply(mgr, mgr->mst_primary, msg.req_type, seqno, false);
+ if (!mstb)
+ mstb = drm_dp_get_mst_branch_device_by_guid(mgr, msg.u.resource_stat.guid);
- DRM_DEBUG_KMS("Got RSN: pn: %d avail_pbn %d\n", msg.u.resource_stat.port_number, msg.u.resource_stat.available_pbn);
+ if (!mstb) {
+ DRM_DEBUG_KMS("Got MST reply from unknown device %d\n", mgr->up_req_recv.initial_hdr.lct);
+ memset(&mgr->up_req_recv, 0, sizeof(struct drm_dp_sideband_msg_rx));
+ return 0;
}
- if (mstb)
- drm_dp_mst_topology_put_mstb(mstb);
-
- memset(&mg...
2019 Oct 22
0
[PATCH v5 06/14] drm/dp_mst: Protect drm_dp_mst_port members with locking
...are of"): locking.
When we go through and probe the link addresses and path resources in a
topology, we hold no locks when updating ports with said information. The
members I'm referring to in particular are:
- ldps
- ddps
- mcs
- pdt
- dpcd_rev
- num_sdp_streams
- num_sdp_stream_sinks
- available_pbn
- input
- connector
Now that we're handling UP requests asynchronously and will be using some of
the struct members mentioned above in atomic modesetting in the future for
features such as PBN validation, this is going to become a lot more important.
As well, the next few commits that prepare...
2019 Sep 03
0
[PATCH v2 19/27] drm/dp_mst: Handle UP requests asynchronously
...notify *res_stat =
+ &up_req->msg.u.resource_stat;
- drm_kms_helper_hotplug_event(mgr->dev);
- } else if (msg.req_type == DP_RESOURCE_STATUS_NOTIFY) {
DRM_DEBUG_KMS("Got RSN: pn: %d avail_pbn %d\n",
- msg.u.resource_stat.port_number,
- msg.u.resource_stat.available_pbn);
+ res_stat->port_number,
+ res_stat->available_pbn);
}
- drm_dp_mst_topology_put_mstb(mstb);
+ up_req->hdr = *hdr;
+ mutex_lock(&mgr->up_req_lock);
+ list_add_tail(&up_req->next, &mgr->up_req_list);
+ mutex_unlock(&mgr->up_req_lock);
+ queu...
2019 Oct 22
0
[PATCH v5 04/14] drm/dp_mst: Handle UP requests asynchronously
...notify *res_stat =
+ &up_req->msg.u.resource_stat;
- drm_kms_helper_hotplug_event(mgr->dev);
- } else if (msg.req_type == DP_RESOURCE_STATUS_NOTIFY) {
DRM_DEBUG_KMS("Got RSN: pn: %d avail_pbn %d\n",
- msg.u.resource_stat.port_number,
- msg.u.resource_stat.available_pbn);
+ res_stat->port_number,
+ res_stat->available_pbn);
}
- drm_dp_mst_topology_put_mstb(mstb);
+ up_req->hdr = *hdr;
+ mutex_lock(&mgr->up_req_lock);
+ list_add_tail(&up_req->next, &mgr->up_req_list);
+ mutex_unlock(&mgr->up_req_lock);
+ queu...