search for: drm_dp_payload

Displaying 20 results from an estimated 57 matches for "drm_dp_payload".

2018 Nov 17
0
[PATCH 2/6] drm/nouveau: Use drm_dp_get_payload_info() for getting payload/vcpi
...-git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index 6cbbae3f438b..e6f72ca0b1fa 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -665,41 +665,24 @@ struct nv50_msto { bool disabled; }; -static struct drm_dp_payload * -nv50_msto_payload(struct nv50_msto *msto) -{ - struct nouveau_drm *drm = nouveau_drm(msto->encoder.dev); - struct nv50_mstc *mstc = msto->mstc; - struct nv50_mstm *mstm = mstc->mstm; - int vcpi = mstc->port->vcpi.vcpi, i; - - NV_ATOMIC(drm, "%s: vcpi %d\n", msto->enco...
2018 Dec 14
1
[WIP PATCH 02/15] drm/dp_mst: Refactor drm_dp_update_payload_part1()
...p_mst_topology.c > @@ -1879,39 +1879,48 @@ int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr) > > mutex_lock(&mgr->payload_lock); > for (i = 0; i < mgr->max_payloads; i++) { > + struct drm_dp_vcpi *vcpi = mgr->proposed_vcpis[i]; > + struct drm_dp_payload *payload = &mgr->payloads[i]; > + > /* solve the current payloads - compare to the hw ones > - update the hw view */ > req_payload.start_slot = cur_slots; > - if (mgr->proposed_vcpis[i]) { > - port = container_of(mgr->proposed_vcpis[i], struct drm_dp_ms...
2018 Nov 27
1
[PATCH 1/6] drm/dp_mst: Add drm_dp_get_payload_info()
...egative error code if the port is no longer valid or a > + * programmed payload could not be found for @port. > + */ > +int drm_dp_get_payload_info(struct drm_dp_mst_topology_mgr *mgr, > + struct drm_dp_mst_port *port, > + struct drm_dp_vcpi *vcpi_out, > + struct drm_dp_payload *payload_out) > +{ > + struct drm_dp_payload *payload = NULL; > + int i; > + int ret = 0; > + > + port = drm_dp_get_validated_port_ref(mgr, port); > + if (!port) > + return -EINVAL; This is the part that I mean in our other/irc discussions. The dp_get_validated_port here c...
2018 Nov 17
9
[PATCH 0/6] Remove all bad dp_mst_port uses and hide struct def
So we don't ever have to worry about drivers touching drm_dp_mst_port structs without verifying them and crashing again. Lyude Paul (6): drm/dp_mst: Add drm_dp_get_payload_info() drm/nouveau: Use drm_dp_get_payload_info() for getting payload/vcpi drm/nouveau: Stop reading port->mgr in nv50_mstc_get_modes() drm/nouveau: Stop reading port->mgr in nv50_mstc_detect() drm/dp_mst:
2018 Dec 14
0
[WIP PATCH 02/15] drm/dp_mst: Refactor drm_dp_update_payload_part1()
....c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -1879,39 +1879,48 @@ int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr) mutex_lock(&mgr->payload_lock); for (i = 0; i < mgr->max_payloads; i++) { + struct drm_dp_vcpi *vcpi = mgr->proposed_vcpis[i]; + struct drm_dp_payload *payload = &mgr->payloads[i]; + /* solve the current payloads - compare to the hw ones - update the hw view */ req_payload.start_slot = cur_slots; - if (mgr->proposed_vcpis[i]) { - port = container_of(mgr->proposed_vcpis[i], struct drm_dp_mst_port, vcpi); + if (vcpi) {...
2018 Nov 17
0
[PATCH 1/6] drm/dp_mst: Add drm_dp_get_payload_info()
...* Returns: + * 0 on success, negative error code if the port is no longer valid or a + * programmed payload could not be found for @port. + */ +int drm_dp_get_payload_info(struct drm_dp_mst_topology_mgr *mgr, + struct drm_dp_mst_port *port, + struct drm_dp_vcpi *vcpi_out, + struct drm_dp_payload *payload_out) +{ + struct drm_dp_payload *payload = NULL; + int i; + int ret = 0; + + port = drm_dp_get_validated_port_ref(mgr, port); + if (!port) + return -EINVAL; + + mutex_lock(&mgr->payload_lock); + /* Figure out which of the payloads belongs to this port */ + for (i = 0; i < mgr-&g...
2018 Dec 14
1
[WIP PATCH 05/15] drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs
...24 deletions(-) > > diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c > index ae9d019af9f2..93f08bfd2ab3 100644 > --- a/drivers/gpu/drm/drm_dp_mst_topology.c > +++ b/drivers/gpu/drm/drm_dp_mst_topology.c > @@ -1989,10 +1989,6 @@ static int drm_dp_payload_send_msg(struct drm_dp_mst_topology_mgr *mgr, > u8 sinks[DRM_DP_MAX_SDP_STREAMS]; > int i; > > - port = drm_dp_mst_topology_get_port_validated(mgr, port); > - if (!port) > - return -EINVAL; > - > port_num = port->port_num; > mstb = drm_dp_mst_topology_get_ms...
2018 Dec 14
0
[WIP PATCH 11/15] drm/nouveau: Grab payload lock in nv50_msto_payload()
...o *msto) struct nv50_mstm *mstm = mstc->mstm; int vcpi = mstc->port->vcpi.vcpi, i; + WARN_ON(!mutex_is_locked(&mstm->mgr.payload_lock)); + NV_ATOMIC(drm, "%s: vcpi %d\n", msto->encoder.name, vcpi); for (i = 0; i < mstm->mgr.max_payloads; i++) { struct drm_dp_payload *payload = &mstm->mgr.payloads[i]; @@ -733,6 +735,8 @@ nv50_msto_prepare(struct nv50_msto *msto) (0x0100 << msto->head->base.index), }; + mutex_lock(&mstm->mgr.payload_lock); + NV_ATOMIC(drm, "%s: msto prepare\n", msto->encoder.name); if (ms...
2018 Dec 14
0
[WIP PATCH 05/15] drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs
...le changed, 30 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index ae9d019af9f2..93f08bfd2ab3 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -1989,10 +1989,6 @@ static int drm_dp_payload_send_msg(struct drm_dp_mst_topology_mgr *mgr, u8 sinks[DRM_DP_MAX_SDP_STREAMS]; int i; - port = drm_dp_mst_topology_get_port_validated(mgr, port); - if (!port) - return -EINVAL; - port_num = port->port_num; mstb = drm_dp_mst_topology_get_mstb_validated(mgr, port->parent); if (!ms...
2018 Dec 20
0
[PATCH v2 05/16] drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs
...le changed, 30 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index ef8637f37564..11dd3ede7b7d 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -2100,10 +2100,6 @@ static int drm_dp_payload_send_msg(struct drm_dp_mst_topology_mgr *mgr, u8 sinks[DRM_DP_MAX_SDP_STREAMS]; int i; - port = drm_dp_mst_topology_get_port_validated(mgr, port); - if (!port) - return -EINVAL; - port_num = port->port_num; mstb = drm_dp_mst_topology_get_mstb_validated(mgr, port->parent); if (!ms...
2018 Oct 23
0
[PATCH 2/6] drm/dp_mst: Remove all evil duplicate state pointers
...include/drm/drm_dp_mst_helper.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h index 7f78d26a0766..59f005b419cf 100644 --- a/include/drm/drm_dp_mst_helper.h +++ b/include/drm/drm_dp_mst_helper.h @@ -409,7 +409,6 @@ struct drm_dp_payload { struct drm_dp_mst_topology_state { struct drm_private_state base; int avail_slots; - struct drm_atomic_state *state; struct drm_dp_mst_topology_mgr *mgr; }; @@ -497,11 +496,6 @@ struct drm_dp_mst_topology_mgr { */ int pbn_div; - /** - * @state: State information for topology man...
2018 Dec 14
0
[WIP PATCH 10/15] drm/nouveau: Stop unsetting mstc->port, use malloc refs
...tc = NULL; msto->head = NULL; @@ -735,7 +734,7 @@ nv50_msto_prepare(struct nv50_msto *msto) }; NV_ATOMIC(drm, "%s: msto prepare\n", msto->encoder.name); - if (mstc->port && mstc->port->vcpi.vcpi > 0) { + if (mstc->port->vcpi.vcpi > 0) { struct drm_dp_payload *payload = nv50_msto_payload(msto); if (payload) { args.vcpi.start_slot = payload->start_slot; @@ -832,8 +831,7 @@ nv50_msto_disable(struct drm_encoder *encoder) struct nv50_mstc *mstc = msto->mstc; struct nv50_mstm *mstm = mstc->mstm; - if (mstc->port) - drm_dp_mst_reset_...
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
2018 Oct 23
12
[PATCH 0/6] drm/dp_mst: Improve VCPI helpers, use in nouveau
This patchset does some cleaning up of the atomic VCPI helpers for MST, and converts nouveau over to using them. I would have included amdgpu in this patch as well, but at the moment moving them over to the atomic helpers is nontrivial. Cc: Daniel Vetter <daniel at ffwll.ch> Lyude Paul (6): drm/dp_mst: Deprecate drm_dp_find_vcpi_slots() drm/dp_mst: Remove all evil duplicate state
2018 Jul 12
3
[PATCH 0/2] drm/nouveau: Add support for dp_mst_info in debugfs
This hooks up the DRM helpers for dumping information on the current status of each MST topology from nouveau's perspective to debugfs files, similar to what i915 does (albeit, i915 labels their debugfs node for this as i915_dp_mst_info). Lyude Paul (2): drm/nouveau: Expose nv50 MST structures in disp.h drm/nouveau: Hook up dp_mst_info in debugfs drivers/gpu/drm/nouveau/dispnv50/disp.c
2018 Nov 07
5
[PATCH RESEND v3 0/5] drm/dp_mst: Improve VCPI helpers, use in nouveau
[sorry about the resend-copy pasted the wrong header and I want to make sure this doesn't get missed!] This patchset does some cleaning up of the atomic VCPI helpers for MST, and converts nouveau over to using them. I would have included amdgpu in this patch as well, but at the moment moving them over to the atomic helpers is nontrivial. Cc: Daniel Vetter <daniel at ffwll.ch> Lyude
2018 Nov 07
6
[PATCH v3 0/5] drm/dp_mst: Add some atomic state iterator macros
This patchset does some cleaning up of the atomic VCPI helpers for MST, and converts nouveau over to using them. I would have included amdgpu in this patch as well, but at the moment moving them over to the atomic helpers is nontrivial. Cc: Daniel Vetter <daniel at ffwll.ch> Lyude Paul (5): drm/dp_mst: Add some atomic state iterator macros drm/dp_mst: Start tracking per-port VCPI
2018 Nov 08
5
[PATCH v4 0/5] drm/dp_mst: Improve VCPI helpers, use in nouveau
This patchset does some cleaning up of the atomic VCPI helpers for MST, and converts nouveau over to using them. I would have included amdgpu in this patch as well, but at the moment moving them over to the atomic helpers is nontrivial. Cc: Daniel Vetter <daniel at ffwll.ch> Lyude Paul (5): drm/dp_mst: Add some atomic state iterator macros drm/dp_mst: Start tracking per-port VCPI
2018 Nov 08
5
[PATCH v5 0/5] drm/dp_mst: Improve VCPI helpers, use in nouveau
This patchset does some cleaning up of the atomic VCPI helpers for MST, and converts nouveau over to using them. I would have included amdgpu in this patch as well, but at the moment moving them over to the atomic helpers is nontrivial. Cc: Daniel Vetter <daniel at ffwll.ch> Lyude Paul (5): drm/dp_mst: Add some atomic state iterator macros drm/dp_mst: Start tracking per-port VCPI
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