Displaying 20 results from an estimated 30 matches for "drm_dp_add_port".
2019 Sep 03
0
[PATCH v2 17/27] drm/dp_mst: Rename drm_dp_add_port and drm_dp_update_port
The names for these functions are rather confusing. drm_dp_add_port()
sounds like a function that would simply create a port and add it to a
topology, and do nothing more. Similarly, drm_dp_update_port() would be
assumed to be the function that should be used to update port
information after initial creation.
While those assumptions are currently correct in how th...
2019 Sep 25
2
[PATCH v2 16/27] drm/dp_mst: Refactor pdt setup/teardown, add more locking
...t; +
> + /* And make sure we send a link address for this */
> + ret = 1;
> break;
> }
> - return send_link;
> +
> +out:
> + if (ret < 0)
> + port->pdt = DP_PEER_DEVICE_NONE;
> + return ret;
> }
>
> /**
> @@ -1881,10 +1904,9 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
> struct drm_device *dev,
> struct drm_dp_link_addr_reply_port *port_msg)
> {
> + struct drm_dp_mst_topology_mgr *mgr = mstb->mgr;
> struct drm_dp_mst_port *port;
> - bool ret;
> bool created = false;
> - int old_pdt =...
2019 Sep 03
0
[PATCH v2 16/27] drm/dp_mst: Refactor pdt setup/teardown, add more locking
...+ drm_dp_mst_get_port_malloc(port);
+ mutex_unlock(&mgr->lock);
+
+ /* And make sure we send a link address for this */
+ ret = 1;
break;
}
- return send_link;
+
+out:
+ if (ret < 0)
+ port->pdt = DP_PEER_DEVICE_NONE;
+ return ret;
}
/**
@@ -1881,10 +1904,9 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
struct drm_device *dev,
struct drm_dp_link_addr_reply_port *port_msg)
{
+ struct drm_dp_mst_topology_mgr *mgr = mstb->mgr;
struct drm_dp_mst_port *port;
- bool ret;
bool created = false;
- int old_pdt = 0;
int old_ddps = 0;
port = drm_dp...
2019 Sep 25
0
[PATCH v2 16/27] drm/dp_mst: Refactor pdt setup/teardown, add more locking
...> > + ret = 1;
> > break;
> > }
> > - return send_link;
> > +
> > +out:
> > + if (ret < 0)
> > + port->pdt = DP_PEER_DEVICE_NONE;
> > + return ret;
> > }
> >
> > /**
> > @@ -1881,10 +1904,9 @@ static void drm_dp_add_port(struct
> > drm_dp_mst_branch *mstb,
> > struct drm_device *dev,
> > struct drm_dp_link_addr_reply_port *port_msg)
> > {
> > + struct drm_dp_mst_topology_mgr *mgr = mstb->mgr;
> > struct drm_dp_mst_port *port;
> > - bool ret;
> >...
2018 May 02
0
[PATCH] drm/nouveau: Fix deadlock in nv50_mstm_register_connector()
...it_module+0xb7/0xd0
do_syscall_64+0x60/0x1b0
entry_SYSCALL_64_after_hwframe+0x49/0xbe
-> #0 (&helper->lock){+.+.}:
__mutex_lock+0x70/0x9d0
drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
nv50_mstm_register_connector+0x2c/0x50 [nouveau]
drm_dp_add_port+0x2f5/0x420 [drm_kms_helper]
drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper]
drm_dp_add_port+0x33f/0x420 [drm_kms_helper]
drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper]
drm_dp_check_and_send_link_address+0x87/0xd0 [drm_kms_helper]
drm_dp_mst_link_prob...
2019 Sep 03
0
[PATCH v2 15/27] drm/dp_mst: Cleanup drm_dp_send_link_address() a bit
...+ DRM_DEBUG_KMS("link address reply: %d\n", reply->nports);
+ drm_dp_dump_link_address(reply);
- drm_dp_check_mstb_guid(mstb, txmsg->reply.u.link_addr.guid);
+ drm_dp_check_mstb_guid(mstb, reply->guid);
- for (i = 0; i < txmsg->reply.u.link_addr.nports; i++) {
- drm_dp_add_port(mstb, mgr->dev, &txmsg->reply.u.link_addr.ports[i]);
- }
- drm_kms_helper_hotplug_event(mgr->dev);
- }
- } else {
- mstb->link_address_sent = false;
- DRM_DEBUG_KMS("link address failed %d\n", ret);
- }
+ for (i = 0; i < reply->nports; i++)
+ drm_dp_add_port(...
2018 Dec 20
0
[PATCH v2 01/16] drm/dp_mst: Rename drm_dp_mst_get_validated_(port|mstb)_ref and friends
...r *mgr, struct drm_dp_mst_port *port)
+static struct drm_dp_mst_port *
+drm_dp_mst_topology_get_port_validated(struct drm_dp_mst_topology_mgr *mgr,
+ struct drm_dp_mst_port *port)
{
struct drm_dp_mst_port *rport = NULL;
mutex_lock(&mgr->lock);
@@ -1210,7 +1218,7 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
list_del(&port->next);
mutex_unlock(&mstb->mgr->lock);
/* drop port list reference */
- drm_dp_put_port(port);
+ drm_dp_mst_topology_put_port(port);
goto out;
}
if ((port->pdt == DP_PEER_DEVICE_DP_LEGACY_CONV ||
@@ -1224,...
2019 Sep 03
50
[PATCH v2 00/27] DP MST Refactors + debugging tools + suspend/resume reprobing
...t_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/teardown, add more locking
drm/dp_mst: Rename drm_dp_add_port and drm_dp_update_port
drm/dp_mst: Remove lies in {up,down}_rep_recv documentation
drm/dp_mst: Handle UP requests asynchronously
drm/dp_mst: Protect drm_dp_mst_port members with connection_mutex
drm/dp_mst: Don't forget to update port->input in
drm_dp_mst_handle_conn_stat()
drm...
2019 Jan 05
0
[PATCH v4 02/16] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports
...t;mstb->mgr = port->mgr;
port->mstb->port_parent = port;
+ /*
+ * Make sure this port's memory allocation stays
+ * around until it's child MSTB releases it
+ */
+ drm_dp_mst_get_port_malloc(port);
send_link = true;
}
@@ -1155,17 +1475,26 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
bool created = false;
int old_pdt = 0;
int old_ddps = 0;
+
port = drm_dp_get_port(mstb, port_msg->port_number);
if (!port) {
port = kzalloc(sizeof(*port), GFP_KERNEL);
if (!port)
return;
- kref_init(&port->kref);
+ kref_init(&port-...
2018 Dec 14
0
[WIP PATCH 03/15] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports
...t;mstb->mgr = port->mgr;
port->mstb->port_parent = port;
+ /*
+ * Make sure this port's memory allocation stays
+ * around until it's child MSTB releases it
+ */
+ drm_dp_mst_get_port_malloc(port);
send_link = true;
}
@@ -1147,17 +1381,26 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
bool created = false;
int old_pdt = 0;
int old_ddps = 0;
+
port = drm_dp_get_port(mstb, port_msg->port_number);
if (!port) {
port = kzalloc(sizeof(*port), GFP_KERNEL);
if (!port)
return;
- kref_init(&port->kref);
+ kref_init(&port-...
2018 Dec 14
2
[WIP PATCH 03/15] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports
...stb->port_parent = port;
> + /*
> + * Make sure this port's memory allocation stays
> + * around until it's child MSTB releases it
> + */
> + drm_dp_mst_get_port_malloc(port);
>
> send_link = true;
> }
> @@ -1147,17 +1381,26 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
> bool created = false;
> int old_pdt = 0;
> int old_ddps = 0;
> +
> port = drm_dp_get_port(mstb, port_msg->port_number);
> if (!port) {
> port = kzalloc(sizeof(*port), GFP_KERNEL);
> if (!port)
> return;
> - kref...
2018 Jul 13
3
[PATCH 0/2] drm/nouveau: Fix connector memory corruption issues
This fixes some nasty issues I found in nouveau that were being caused
looping through connectors using racy legacy methods, along with some
caused by making incorrect assumptions about the drm_connector structs
in nouveau's connector list. Most of these memory corruption issues
could be reproduced by using an MST hub with nouveau.
Cc: Karol Herbst <karolherbst at gmail.com>
Cc: stable
2018 Jul 13
0
[PATCH 2/2] drm/nouveau: Avoid looping through fake MST connectors
...c0
[ 201.039431] ret_from_fork+0x3a/0x50
[ 201.039441]
[ 201.039444] Allocated by task 79:
[ 201.039449] save_stack+0x43/0xd0
[ 201.039452] kasan_kmalloc+0xc4/0xe0
[ 201.039456] kmem_cache_alloc_trace+0x10a/0x260
[ 201.039494] nv50_mstm_add_connector+0x9a/0x340 [nouveau]
[ 201.039504] drm_dp_add_port+0xff5/0x1fc0 [drm_kms_helper]
[ 201.039511] drm_dp_send_link_address+0x4a7/0x740 [drm_kms_helper]
[ 201.039518] drm_dp_check_and_send_link_address+0x1a7/0x210 [drm_kms_helper]
[ 201.039525] drm_dp_mst_link_probe_work+0x71/0xb0 [drm_kms_helper]
[ 201.039529] process_one_work+0x7a0/0x14d0
[...
2019 Jan 10
21
[PATCH v6 00/20] MST refcounting/atomic helpers cleanup
...oesn't work as
intended.
There's still more cleanup that can be done, but I think this is a good
place to start off for now :).
Also available on gitlab:
https://gitlab.freedesktop.org/lyudess/linux/commits/wip/mst-dual-kref-start-v6
Lyude Paul (20):
drm/dp_mst: Fix some formatting in drm_dp_add_port()
drm/dp_mst: Fix some formatting in drm_dp_payload_send_msg()
drm/dp_mst: Fix some formatting in drm_dp_mst_allocate_vcpi()
drm/dp_mst: Fix some formatting in drm_dp_mst_deallocate_vcpi()
drm/dp_mst: Rename drm_dp_mst_get_validated_(port|mstb)_ref and
friends
drm/dp_mst: Introduce ne...
2018 Dec 19
1
[WIP PATCH 03/15] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports
...t's memory allocation stays
> > > + * around until it's child MSTB releases it
> > > + */
> > > + drm_dp_mst_get_port_malloc(port);
> > >
> > > send_link = true;
> > > }
> > > @@ -1147,17 +1381,26 @@ static void drm_dp_add_port(struct
> > > drm_dp_mst_branch *mstb,
> > > bool created = false;
> > > int old_pdt = 0;
> > > int old_ddps = 0;
> > > +
> > > port = drm_dp_get_port(mstb, port_msg->port_number);
> > > if (!port) {
> > > port =...
2018 Dec 18
0
[WIP PATCH 03/15] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports
...> > + * Make sure this port's memory allocation stays
> > + * around until it's child MSTB releases it
> > + */
> > + drm_dp_mst_get_port_malloc(port);
> >
> > send_link = true;
> > }
> > @@ -1147,17 +1381,26 @@ static void drm_dp_add_port(struct
> > drm_dp_mst_branch *mstb,
> > bool created = false;
> > int old_pdt = 0;
> > int old_ddps = 0;
> > +
> > port = drm_dp_get_port(mstb, port_msg->port_number);
> > if (!port) {
> > port = kzalloc(sizeof(*port), GFP_KERNEL);
>...
2019 Jan 11
20
[PATCH v7 00/20] MST refcounting/atomic helpers cleanup
...ons just plain doesn't work as
intended.
There's still more cleanup that can be done, but I think this is a good
place to start off for now :).
Not available on gitlab, as this is the final version of the series
before I push! hooray~
Lyude Paul (20):
drm/dp_mst: Fix some formatting in drm_dp_add_port()
drm/dp_mst: Fix some formatting in drm_dp_payload_send_msg()
drm/dp_mst: Fix some formatting in drm_dp_mst_allocate_vcpi()
drm/dp_mst: Fix some formatting in drm_dp_mst_deallocate_vcpi()
drm/dp_mst: Rename drm_dp_mst_get_validated_(port|mstb)_ref and
friends
drm/dp_mst: Introduce ne...
2019 Jan 05
19
[PATCH v4 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 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
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