[PATCH v2 17/27] drm/dp_mst: Rename drm_dp_add_port and drm_dp_update_port

2019-09-03 Thread Lyude Paul
to start using drm_dp_add_port() differently for suspend/resume reprobing, let's rename both functions to clarify what they actually do. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 17 +

[PATCH v2 21/27] drm/dp_mst: Don't forget to update port->input in drm_dp_mst_handle_conn_stat()

2019-09-03 Thread Lyude Paul
ke sure we read the input_port field in connection status notifications in drm_dp_mst_handle_conn_stat() to prevent this from happening once we've implemented suspend/resume reprobing. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-b

[PATCH v2 15/27] drm/dp_mst: Cleanup drm_dp_send_link_address() a bit

2019-09-03 Thread Lyude Paul
variable declarations a bit. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 42 +++ 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/drivers

[PATCH v2 19/27] drm/dp_mst: Handle UP requests asynchronously

2019-09-03 Thread Lyude Paul
send sideband messages from most contexts without having to deal with getting blocked if we hold connection_mutex. This also fixes MST branch device hotplugging on i915, finally! Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul --- driv

[PATCH v2 22/27] drm/nouveau: Don't grab runtime PM refs for HPD IRQs

2019-09-03 Thread Lyude Paul
ng with runtime suspend/resume. Now that those requests are handled asynchronously, this change should be completely safe. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_c

[PATCH v2 18/27] drm/dp_mst: Remove lies in {up,down}_rep_recv documentation

2019-09-03 Thread Lyude Paul
These are most certainly accessed from far more than the mgr work. In fact, up_req_recv is -only- ever accessed from outside the mgr work. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul --- include/drm/drm_dp_mst_helper.h | 8

[PATCH v2 14/27] drm/dp_mst: Destroy topology_mgr mutexes

2019-09-03 Thread Lyude Paul
Turns out we've been forgetting for a while now to actually destroy any of the mutexes that we create in drm_dp_mst_topology_mgr. So, let's do that. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul --- drive

[PATCH v2 16/27] drm/dp_mst: Refactor pdt setup/teardown, add more locking

2019-09-03 Thread Lyude Paul
rdown_pdt() into a single function: drm_dp_port_set_pdt(). This function also handles actually ensuring that we grab the correct locks when we need to modify port->mstb. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/g

[PATCH v2 20/27] drm/dp_mst: Protect drm_dp_mst_port members with connection_mutex

2019-09-03 Thread Lyude Paul
ss responses or connection status notifications under drm_device->mode_config.connection_mutex. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 144 +++--- include/drm/d

[PATCH v2 09/27] drm/dp_mst: Refactor drm_dp_send_enum_path_resources

2019-09-03 Thread Lyude Paul
Use more pointers so we don't have to write out txmsg->reply.u.path_resources each time. Also, fix line wrapping + rearrange local variables. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul --- drivers

[PATCH v2 13/27] drm/dp_mst: Refactor drm_dp_mst_handle_down_rep()

2019-09-03 Thread Lyude Paul
* Remove the big ugly have_eomt conditional * Store &mgr->down_rep_recv.initial_hdr in a var to make line wrapping easier * Remove duplicate memset() calls * Actually wrap lines Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by

[PATCH v2 06/27] drm/dp_mst: Combine redundant cases in drm_dp_encode_sideband_req()

2019-09-03 Thread Lyude Paul
Noticed this while working on adding a drm_dp_decode_sideband_req(). DP_POWER_DOWN_PHY/DP_POWER_UP_PHY both use the same struct, so we can just combine their cases. Signed-off-by: Lyude Paul Cc: Daniel Vetter Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland --- drivers/gpu

[PATCH v2 07/27] drm/dp_mst: Add sideband down request tracing + selftests

2019-09-03 Thread Lyude Paul
from selftests a bit, and add comments explaining why we can't just use memcmp - danvet Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 309 +++

[PATCH v2 12/27] drm/dp_mst: Refactor drm_dp_mst_handle_up_req()

2019-09-03 Thread Lyude Paul
stb != NULL at that point in the function Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 75 ++- 1 file changed, 38 insertions(+), 37 deletions(-) dif

[PATCH v2 04/27] drm/dp_mst: Move test_calc_pbn_mode() into an actual selftest

2019-09-03 Thread Lyude Paul
ed-by: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 27 --- drivers/gpu/drm/selftests/Makefile| 2 +- .../gpu/drm/selftests/drm_modeset_selftests.h | 1 + .../drm/selftests/test-drm_dp_mst_helper.c| 34 +++ ..

[PATCH v2 10/27] drm/dp_mst: Remove huge conditional in drm_dp_mst_handle_up_req()

2019-09-03 Thread Lyude Paul
Which reduces indentation and makes this function more legible. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 90 +-- 1 file changed, 45 insertions(+), 45

[PATCH v2 08/27] drm/dp_mst: Remove PDT teardown in drm_dp_destroy_port() and refactor

2019-09-03 Thread Lyude Paul
c: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 40 +++ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_

[PATCH v2 11/27] drm/dp_mst: Constify guid in drm_dp_get_mst_branch_by_guid()

2019-09-03 Thread Lyude Paul
And it's helper, we'll be using this in just a moment. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d

[PATCH v2 05/27] drm/print: Add drm_err_printer()

2019-09-03 Thread Lyude Paul
A simple convienence function that returns a drm_printer which prints using pr_err() Changes since v1: * Make __drm_printfn_err() more consistent with DRM_ERROR() - danvet Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul

[PATCH v2 00/27] DP MST Refactors + debugging tools + suspend/resume reprobing

2019-09-03 Thread Lyude Paul
with some basic selftests for testing our encoding/decoding functions Patchseries wide changes since v1 - Add "Combine redundant cases in drm_dp_encode_sideband_req()" to fulfill some of the danvet's review requests Lyude Paul (27): drm/dp_mst: Move link address

[PATCH v2 01/27] drm/dp_mst: Move link address dumping into a function

2019-09-03 Thread Lyude Paul
Makes things easier to read. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 35 ++- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a

[PATCH v2 02/27] drm/dp_mst: Get rid of list clear in destroy_connector_work

2019-09-03 Thread Lyude Paul
This seems to be some leftover detritus from before the port/mstb kref cleanup and doesn't do anything anymore, so get rid of it. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topol

[PATCH v2 03/27] drm/dp_mst: Destroy MSTBs asynchronously

2019-09-03 Thread Lyude Paul
* Use two loops in drm_dp_delayed_destroy_work() - danvet * Better explain why we need to do this - danvet * Use cancel_work_sync() instead of flush_work() - flush_work() doesn't account for work requeing Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Signed-off-by: Lyud

Re: [PATCH v3 00/16] Display Stream Compression (DSC) for AMD Navi

2019-08-21 Thread Lyude Paul
> .../amd/display/dc/inc/hw/timing_generator.h | 2 - > drivers/gpu/drm/drm_dp_aux_dev.c | 12 +- > drivers/gpu/drm/drm_dp_helper.c | 10 +- > drivers/gpu/drm/drm_dp_mst_topology.c | 240 +++ > include/drm/drm_dp_mst_helper.h | 8 +- > 18 files changed, 806 insertions(+), 131 deletions(-) > -- Cheers, Lyude Paul ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH v3 10/16] drm/dp-mst: Add MST support to DP DPCD R/W functions

2019-08-21 Thread Lyude Paul
> Cc: Leo Li > Cc: Lyude Paul > Signed-off-by: David Francis > --- > drivers/gpu/drm/drm_dp_aux_dev.c | 12 ++-- > drivers/gpu/drm/drm_dp_helper.c | 10 -- > 2 files changed, 10 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/drm_dp_a

Re: [PATCH v3 16/16] drm/amd/display: Trigger modesets on MST DSC connectors

2019-08-21 Thread Lyude Paul
m did not change timing. > > Therefore, whenever a crtc has drm_atomic_crtc_needs_modeset, > for each crtc that shares a MST topology with that stream and > supports DSC, add that crtc (and all affected connectors and > planes) to the atomic state and set mode_changed on its state >

Re: [PATCH v3 06/16] drm/dp-mst: Add PBN calculation for DSC modes

2019-08-21 Thread Lyude Paul
Reviewed-by: Lyude Paul Thanks! On Wed, 2019-08-21 at 16:01 -0400, David Francis wrote: > With DSC, bpp can be a multiple of 1/16, so > drm_dp_calc_pbn_mode is insufficient. > > Add drm_dp_calc_pbn_mode_dsc, a function which is > the same as drm_dp_calc_pbn_mode, but the bpp is

Re: [PATCH v2 06/14] drm/dp-mst: Use dc and drm helpers to compute timeslots

2019-08-21 Thread Lyude Paul
On Wed, 2019-08-21 at 12:27 +, Kazlauskas, Nicholas wrote: > On 8/20/19 4:43 PM, Lyude Paul wrote: > > Some nitpicks below > > > > On Tue, 2019-08-20 at 15:11 -0400, David Francis wrote: > > > We were using drm helpers to convert a timing into its > > >

Re: [PATCH v2 14/14] drm/amd/display: Trigger modesets on MST DSC connectors

2019-08-20 Thread Lyude Paul
ate, i) { > + if (drm_atomic_crtc_needs_modeset(new_crtc_state)) { > + ret = add_affected_mst_dsc_crtcs(state, crtc); > + if (ret) > + goto fail; > + } > +

Re: [PATCH v2 10/14] drm/dp-mst: Fill branch->num_ports

2019-08-20 Thread Lyude Paul
_lock(&mstb->mgr->lock); list_del(&port->next); /* Right here > */ mutex_unlock(&mstb->mgr->lock); /* drop port list reference */ drm_dp_mst_topology_put_port(port);

Re: [PATCH v2 09/14] drm/dp-mst: Export symbols for dpcd read/write

2019-08-20 Thread Lyude Paul
1536,7 @@ ssize_t drm_dp_mst_dpcd_write(struct drm_dp_aux *aux, > return drm_dp_send_dpcd_write(port->mgr, port, > offset, size, buffer); > } > +EXPORT_SYMBOL(drm_dp_mst_dpcd_write); > > static void drm_dp_check_mstb_guid(struct dr

Re: [PATCH v2 06/14] drm/dp-mst: Use dc and drm helpers to compute timeslots

2019-08-20 Thread Lyude Paul
y_mgr *mgr) > { > diff --git a/include/drm/drm_dp_mst_helper.h > b/include/drm/drm_dp_mst_helper.h > index 2ba6253ea6d3..ddb518f2157a 100644 > --- a/include/drm/drm_dp_mst_helper.h > +++ b/include/drm/drm_dp_mst_helper.h > @@ -611,7 +611,7 @@ struct edid *drm_dp_mst_get_edid(struct drm_conne

Re: [PATCH v2 08/14] drm/dp-mst: Parse FEC capability on MST ports

2019-08-20 Thread Lyude Paul
Reviewed-by: Lyude Paul On Tue, 2019-08-20 at 15:11 -0400, David Francis wrote: > As of DP1.4, ENUM_PATH_RESOURCES returns a bit indicating > if FEC can be supported up to that point in the MST network. > > The bit is the first byte of the ENUM_PATH_RESOURCES ack reply, > bottom-

Re: [PATCH v2 11/14] drm/amd/display: Validate DSC caps on MST endpoints

2019-08-20 Thread Lyude Paul
onnector->dc_sink) > + if (aconnector->dc_sink) { > amdgpu_dm_update_freesync_caps( > connector, aconnector->edid); > > +#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT > + if (!validate_dsc_caps_on_

Re: [PATCH v7 1/9] drm_dp_cec: add connector info support.

2019-08-15 Thread Lyude Paul
Reviewed-by: Lyude Paul On Wed, 2019-08-14 at 12:44 +0200, Dariusz Marcinkiewicz wrote: > Pass the connector info to the CEC adapter. This makes it possible > to associate the CEC adapter with the corresponding drm connector. > > Signed-off-by: Dariusz Marcinkiewicz > Sign

Re: [PATCH 7/9] drm/nouveau/kms/nv50: Implement MST Aux device registration

2019-07-25 Thread Lyude Paul
Works perfectly here, and no warnings (at least not any that are relevant to this patch series :) when reloading nouveau. Reviewed-by: Lyude Paul On Tue, 2019-07-23 at 19:28 -0400, sunpeng...@amd.com wrote: > From: Leo Li > > Implement late_register and early_unregister hook

Re: [PATCH 2/9 v3] drm/dp_mst: Enable registration of AUX devices for MST ports

2019-07-25 Thread Lyude Paul
issue during driver unload, where mst connector > devices are unregistered before the remote aux devices are. In a setup > where aux devices are created as children of connector devices, the aux > device would be removed too early, and uncleanly. Doing so in > early_unregister solv

[PATCH] drm/amdgpu/dm: Remove unneeded hotplug event in s3_handle_mst()

2019-07-17 Thread Lyude Paul
The DRM DP MST topology manager will send it's own hotplug events when connectors are destroyed, so there's no reason to send an additional hotplug event here. Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 - 1 file changed, 4 insert

[PATCH 23/26] drm/amdgpu/dm: Resume short HPD IRQs before resuming MST topology

2019-07-17 Thread Lyude Paul
tland Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 0ef49db0f08d..e33e080cf16d 1

[PATCH 24/26] drm/dp_mst: Add basic topology reprobing when resuming

2019-07-17 Thread Lyude Paul
would on a hotplug, removing any leftover ports that no longer appear in the topology state. Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Lyude Paul --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/drm_dp_mst_topology.c | 13

[PATCH 22/26] drm/amdgpu: Iterate through DRM connectors correctly

2019-07-17 Thread Lyude Paul
Harry Wentland Signed-off-by: Lyude Paul --- .../gpu/drm/amd/amdgpu/amdgpu_connectors.c| 13 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 20 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c | 40 +-- dr

[PATCH 00/26] DP MST Refactors + debugging tools + suspend/resume reprobing

2019-07-17 Thread Lyude Paul
with some basic selftests for testing our encoding/decoding functions Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Lyude Paul (26): drm/dp_mst: Move link address dumping into a function drm/dp_mst: Destroy mstbs from destroy_connector_work drm/dp_mst: Move test_calc_pbn

Re: [PATCH v2] drm/sysfs: Add mstpath attribute to connector devices

2019-07-16 Thread Lyude Paul
On Tue, 2019-07-16 at 18:28 +, Li, Sun peng (Leo) wrote: > > > On 2019-07-10 6:50 p.m., Lyude Paul wrote: > > gah. So, I was originally going to ask "why didn't we add the connector > > name > > into this?", but then I realized we're doing the

Re: [PATCH 04/10] drm/nouveau: Use connector kdev as aux device parent

2019-07-12 Thread Lyude Paul
Reviewed-by: Lyude Paul On Thu, 2019-07-04 at 15:05 -0400, sunpeng...@amd.com wrote: > From: Leo Li > > Set the connector's kernel device as the parent for the aux kernel > device. This allows udev rules to access connector attributes when > creating symlinks to aux d

Re: [PATCH 08/10] drm/nouveau/kms/nv50: Implement MST Aux device registration

2019-07-12 Thread Lyude Paul
erty, > .atomic_get_property = nouveau_conn_atomic_get_property, > + .late_register = nv50_mstc_late_register, > + .early_unregister = nv50_mstc_early_unregister, > }; > > static int -- Cheers, Lyude Paul ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH 07/10] drm/i915: Implement MST Aux device registration

2019-07-12 Thread Lyude Paul
ate_register = intel_connector_register, > - .early_unregister = intel_connector_unregister, > + .late_register = intel_dp_mst_connector_late_register, > + .early_unregister = intel_dp_mst_connector_early_unregister, > .destroy = intel_connector_destroy, > .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, > .atomic_duplicate_state = intel_digital_connector_duplicate_state, -- Cheers, Lyude Paul ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH 02/10] drm/dp_mst: Enable registration of AUX devices for MST ports (v2)

2019-07-10 Thread Lyude Paul
On Thu, 2019-07-04 at 15:05 -0400, sunpeng...@amd.com wrote: > From: Ville Syrjälä > > All available downstream ports - physical and logical - are exposed for > each MST device. They are listed in /dev/, following the same naming > scheme as SST devices by appending an incremental ID. > > Althou

Re: [PATCH v2] drm/sysfs: Add mstpath attribute to connector devices

2019-07-10 Thread Lyude Paul
gah. So, I was originally going to ask "why didn't we add the connector name into this?", but then I realized we're doing the right thing already and just doing card%d-%s % (card_number, path_prop). Which means we probably really don't want to add a property called mstpath, since it's hardly differ

Re: [PATCH 02/10] drm/dp_mst: Enable registration of AUX devices for MST ports (v2)

2019-07-10 Thread Lyude Paul
msg->reply.u.remote_dpcd_read_ack.num_bytes, > + size); > + memcpy(bytes, txmsg->reply.u.remote_dpcd_read_ack.bytes, ret); > + > +fail_free: > + kfree(txmsg); > +fail_put: > + drm_dp_mst_topology_put_mstb(mstb); > + > + return ret; &g

Re: [PATCH 2/7] drm/dp_mst: Register AUX devices for MST ports

2019-07-01 Thread Lyude Paul
On Thu, 2019-06-27 at 22:21 +, Li, Sun peng (Leo) wrote: > Sorry for the late response! just jumping back on this now. > > On 2019-05-16 5:40 p.m., Lyude Paul wrote: > > [CAUTION: External Email] > > > > So a couple of things: > > > > On Thu, 2019-0

[PATCH] drm/amdgpu: Don't skip display settings in hwmgr_resume()

2019-06-20 Thread Lyude Paul
ing setup seems to fix it. Hopefully if there is a better fix for this, this patch will spark discussion around it. Fixes: 921935dc6404 ("drm/amd/powerplay: enforce display related settings only on needed") Cc: Evan Quan Cc: Alex Deucher Cc: Huang Rui Cc: Rex Zhu Cc: Likun Gao Cc:

Re: [PATCH 2/7] drm/dp_mst: Register AUX devices for MST ports

2019-06-06 Thread Lyude Paul
On Thu, 2019-06-06 at 19:41 +, Li, Sun peng (Leo) wrote: > > On 2019-06-03 3:28 p.m., Lyude Paul wrote: > > > I'm reproducing this just by reloading i915 on a machine with some MST > > > displays connected. I uploaded a copy of the script that I us

Re: [PATCH 2/7] drm/dp_mst: Register AUX devices for MST ports

2019-06-03 Thread Lyude Paul
On Mon, 2019-06-03 at 15:25 -0400, Lyude Paul wrote: > On Thu, 2019-05-30 at 18:20 +, Li, Sun peng (Leo) wrote: > > Hey, sorry for my late response! > > > > On 2019-05-16 5:40 p.m., Lyude Paul wrote: > > > > > >if (old_pdt != port->pdt &am

Re: [PATCH 2/7] drm/dp_mst: Register AUX devices for MST ports

2019-06-03 Thread Lyude Paul
On Thu, 2019-05-30 at 18:20 +, Li, Sun peng (Leo) wrote: > Hey, sorry for my late response! > > On 2019-05-16 5:40 p.m., Lyude Paul wrote: > > > >if (old_pdt != port->pdt && !port->input) { > > > @@ -1220,6 +1268,8 @@ static void dr

Re: [PATCH 2/7] drm/dp_mst: Register AUX devices for MST ports

2019-05-16 Thread Lyude Paul
l port, whereas the MST displays will NAK. > > In light of these discrepancies, it's simpler to expose all downstream > ports - both physical and logical - and let the user decide what to use. > > Cc: Lyude Paul > Signed-off-by: Ville Syrjälä > Signed-off-by

Re: [PATCH 7/7] drm/nouveau: Use connector kdev as aux device parent

2019-05-16 Thread Lyude Paul
Reviewed-by: Lyude Paul On Thu, 2019-05-16 at 11:18 -0400, sunpeng...@amd.com wrote: > From: Leo Li > > Set the connector's kernel device as the parent for the aux kernel > device. This allows udev rules to access connector attributes when > creating symlinks to aux d

Re: [PATCH 3/7] drm/dp-mst: Use connector kdev as aux device parent

2019-05-16 Thread Lyude Paul
the connector gives udev the > ability to access the connector device's attributes. This will come in > handy when writing udev rules to create more descriptive symlinks to the > MST aux devices. > > Cc: Ville Syrjälä > Cc: Lyude Paul > Signed-off-by: Leo Li > --- &

Re: [PATCH 3/7] drm/dp-mst: Use connector kdev as aux device parent

2019-05-16 Thread Lyude Paul
criptive symlinks to the > MST aux devices. > > Cc: Ville Syrjälä > Cc: Lyude Paul > Signed-off-by: Leo Li > --- > drivers/gpu/drm/drm_dp_mst_topology.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c > b/drivers/g

Re: [PATCH 0/7] Add DP MST AUX devices

2019-05-16 Thread Lyude Paul
Whoops-one more thing I forgot to mention. This is just personal preference for me, but if you're ccing me on any of the patches in the series feel free to just do it for all of them. Makes my inbox a little less confusing to look at On Thu, 2019-05-16 at 15:54 -0400, Lyude Paul wrote:

Re: [PATCH 0/7] Add DP MST AUX devices

2019-05-16 Thread Lyude Paul
drivers/gpu/drm/drm_dp_mst_topology.c | 106 > ++--- > drivers/gpu/drm/drm_sysfs.c| 23 + > drivers/gpu/drm/nouveau/nouveau_connector.c| 2 +- > include/drm/drm_dp_helper.h| 4 + > include/drm/drm_dp_ms

Re: [PATCH 2/3] drm/dp_mst: Expose build_mst_prop_path()

2019-04-24 Thread Lyude Paul
On Wed, 2019-04-24 at 23:52 +0300, Ville Syrjälä wrote: > On Wed, Apr 24, 2019 at 08:40:30PM +, Li, Sun peng (Leo) wrote: > > > > > > On 2019-04-24 1:26 p.m., Lyude Paul wrote: > > > Closer, but are we sure we want to use the MST prop path for this? Why > &g

Re: [PATCH 2/3] drm/dp_mst: Expose build_mst_prop_path()

2019-04-24 Thread Lyude Paul
topology_mgr *mgr, > int pbn); > > +void drm_dp_build_mst_prop_path(const struct drm_dp_mst_branch *mstb, > +int pnum, > + char *proppath, > +size_t proppath_si

Re: [PATCH 1/3] drm/dp: Use non-cyclic idr

2019-04-24 Thread Lyude Paul
lgtm Reviewed-by: Lyude Paul On Mon, 2019-04-22 at 19:56 -0400, sunpeng...@amd.com wrote: > From: Leo Li > > In preparation for adding aux devices for DP MST, make the IDR > non-cyclic. That way, hotplug cycling MST devices won't needlessly > increment the minor version in

Re: [PATCH 1/2] drm/dp_aux: Use non-cyclic idr, add suffix option for aux device

2019-04-22 Thread Lyude Paul
On Wed, 2019-04-17 at 23:10 +, Li, Sun peng (Leo) wrote: > > > On 2019-04-16 6:16 p.m., Lyude Paul wrote: > > Sorry for the slow response, I've been really busy ;_; > > No worries :) > > > On Fri, 2019-04-12 at 12:05 -0400, sunpeng...@amd.com wrote:

Re: [PATCH 2/2] drm/dp_mst: Register aux-dev nodes for MST ports

2019-04-16 Thread Lyude Paul
lude/drm/drm_dp_helper.h > @@ -1265,6 +1265,10 @@ struct drm_dp_aux { >* @cec: struct containing fields used for CEC-Tunneling-over-AUX. >*/ > struct drm_dp_aux_cec cec; > + /** > + * @is_remote: Is this "AUX CH" actually using sideband messaging. > + */ > + bool is_remote

Re: [PATCH 1/2] drm/dp_aux: Use non-cyclic idr, add suffix option for aux device

2019-04-16 Thread Lyude Paul
/drm_dp_helper.c > b/drivers/gpu/drm/drm_dp_helper.c > index e2266ac..13f1005 100644 > --- a/drivers/gpu/drm/drm_dp_helper.c > +++ b/drivers/gpu/drm/drm_dp_helper.c > @@ -1143,7 +1143,7 @@ int drm_dp_aux_register(struct drm_dp_aux *aux) > strlcpy(aux->ddc.name, aux-&g

[PATCH v7 16/20] drm/nouveau: Grab payload lock in nv50_msto_payload()

2019-01-10 Thread Lyude Paul
Going through the currently programmed payloads isn't safe without holding mgr->payload_lock, so actually do that and warn if anyone tries calling nv50_msto_payload() in the future without grabbing the right locks. Signed-off-by: Lyude Paul Reviewed-By: Ben Skeggs Cc: Daniel Vetter C

[PATCH v7 19/20] drm/dp_mst: Check payload count in drm_dp_mst_atomic_check()

2019-01-10 Thread Lyude Paul
It occurred to me that we never actually check this! So let's start doing that. Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 8 +++- 1 file changed, 7 insertions(

[PATCH v7 13/20] drm/nouveau: Remove unnecessary VCPI checks in nv50_msto_cleanup()

2019-01-10 Thread Lyude Paul
his code in the future, use msto->disabled instead to check whether or not we need to deallocate VCPI instead. Signed-off-by: Lyude Paul Reviewed-By: Ben Skeggs Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/nouveau/dispnv50/disp.

[PATCH v7 18/20] drm/dp_mst: Start tracking per-port VCPI allocations

2019-01-10 Thread Lyude Paul
anvet - Annotate atomic VCPI and atomic check functions with __must_check - danvet Changes since v1: - Don't use the now-removed ->atomic_check() for private objects hook, just give drivers a function to call themselves Signed-off-by: Lyude Paul Reviewed-by: D

[PATCH v7 15/20] drm/nouveau: Stop unsetting mstc->port, use malloc refs

2019-01-10 Thread Lyude Paul
Same as we did for i915, but for nouveau this time. Additionally, we grab a malloc reference to the port that lasts for the entire lifetime of nv50_mstc, which gives us the guarantee that mstc->port will always point to valid memory for as long as the mstc stays around. Signed-off-by: Lyude P

[PATCH v7 20/20] drm/nouveau: Use atomic VCPI helpers for MST

2019-01-10 Thread Lyude Paul
hanges since v5: * Update nv50_msto_atomic_check() and nv50_mstc_atomic_check() to the new requirements for drm_dp_atomic_find_vcpi_slots() and drm_dp_atomic_release_vcpi_slots() Signed-off-by: Lyude Paul Reviewed-By: Ben Skeggs Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentl

[PATCH v7 17/20] drm/dp_mst: Add some atomic state iterator macros

2019-01-10 Thread Lyude Paul
Changes since v6: - Move EXPORT_SYMBOL() for drm_dp_mst_topology_state_funcs to this commit - Document __drm_dp_mst_state_iter_get() and note that it shouldn't be called directly Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentlan

[PATCH v7 12/20] drm/nouveau: Remove bogus cleanup in nv50_mstm_add_connector()

2019-01-10 Thread Lyude Paul
Trying to destroy the connector using mstc->connector.funcs->destroy() if connector initialization fails is wrong: there is no possible codepath in nv50_mstc_new where nv50_mstm_add_connector() would return <0 and mstc would be non-NULL. Signed-off-by: Lyude Paul Reviewed-By: Ben S

[PATCH v7 08/20] drm/dp_mst: Stop releasing VCPI when removing ports from topology

2019-01-10 Thread Lyude Paul
This has never actually worked, and isn't needed anyway: the driver's always going to try to deallocate VCPI when it tears down the display that the VCPI belongs to. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc:

[PATCH v7 06/20] drm/dp_mst: Introduce new refcounting scheme for mstbs and ports

2019-01-10 Thread Lyude Paul
in topology_get_(mstb|port) - danvet * Move kdocs for mstb/port structs inline - danvet * Split drm_dp_get_last_connected_port_and_mstb() changes into their own commit - danvet Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc:

[PATCH v7 14/20] drm/nouveau: Keep malloc references to MST ports

2019-01-10 Thread Lyude Paul
mstc->port could technically be pointing at freed memory. Signed-off-by: Lyude Paul Reviewed-By: Ben Skeggs Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 6 ++ 1 file changed, 6 insertions(+) diff --gi

[PATCH v7 02/20] drm/dp_mst: Fix some formatting in drm_dp_payload_send_msg()

2019-01-10 Thread Lyude Paul
Split some stuff across multiple lines, remove some unnecessary braces Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 14 -- 1 file changed, 8 insertions

[PATCH v7 10/20] drm/i915: Keep malloc references to MST ports

2019-01-10 Thread Lyude Paul
port - danvet Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/i915/intel_connector.c | 4 drivers/gpu/drm/i915/intel_dp_mst.c| 1 + 2 files changed, 5 insertions(+) diff --git a/drivers

[PATCH v7 09/20] drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs

2019-01-10 Thread Lyude Paul
t the ports are still valid and in the topology, any port which has an allocated payload will remain allocated in memory until it's payloads have been removed - finally allowing us to actually release said payloads correctly. Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Reviewed-by

[PATCH v7 04/20] drm/dp_mst: Fix some formatting in drm_dp_mst_deallocate_vcpi()

2019-01-10 Thread Lyude Paul
Split some stuff across multiple lines Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH v7 07/20] drm/dp_mst: Restart last_connected_port_and_mstb() if topology ref fails

2019-01-10 Thread Lyude Paul
ecovery handling for VCPI allocations in the rest of the DP MST helpers. Changes since v1: * Convert kerneldoc for drm_dp_get_last_connected_port_and_mstb to normal comment - danvet Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc

[PATCH v7 11/20] drm/amdgpu/display: Keep malloc ref to MST port

2019-01-10 Thread Lyude Paul
at assignment that I can see anyway. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dr

[PATCH v7 03/20] drm/dp_mst: Fix some formatting in drm_dp_mst_allocate_vcpi()

2019-01-10 Thread Lyude Paul
Fix some indenting, split some stuff across multiple lines. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions

[PATCH v7 01/20] drm/dp_mst: Fix some formatting in drm_dp_add_port()

2019-01-10 Thread Lyude Paul
Reindent some stuff, and split some stuff across multiple lines so we aren't going over the text width limit. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c

[PATCH v7 00/20] MST refcounting/atomic helpers cleanup

2019-01-10 Thread Lyude Paul
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: Fi

[PATCH v7 05/20] drm/dp_mst: Rename drm_dp_mst_get_validated_(port|mstb)_ref and friends

2019-01-10 Thread Lyude Paul
, and will make even more sense once we redesign how the current refcounting scheme here works. Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Reviewed-by: Harry Wentland Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 114

Re: [PATCH] drm/amd/display: Remove error message in stream create routine

2019-01-10 Thread Lyude Paul
DRM_ERROR("Failed to create stream for sink!\n"); > + if (stream == NULL) > goto finish; > - } > > stream->dm_stream_context = aconnector; > -- Cheers, Lyude Paul ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH] drm/amd/display: Don't fail atomic check in MST S3 topology change

2019-01-10 Thread Lyude Paul
new_crtc_state->mode_changed = false; > + DRM_DEBUG_DRIVER("Mode change not expected on %s\n", > aconnector->base.name); > + goto next_crtc; > } > > dm_new_crtc_state->abm_level = dm_new_conn_state->abm_level; -- Cheers, Lyude Paul ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH v6 11/20] drm/amdgpu/display: Keep malloc ref to MST port

2019-01-10 Thread Lyude Paul
at assignment that I can see anyway. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Juston Li --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dr

[PATCH v6 10/20] drm/i915: Keep malloc references to MST ports

2019-01-10 Thread Lyude Paul
port - danvet Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/i915/intel_connector.c | 4 drivers/gpu/drm/i915/intel_dp_mst.c| 1 + 2 files changed, 5 insertions(+) diff --git a/drivers

[PATCH v6 08/20] drm/dp_mst: Stop releasing VCPI when removing ports from topology

2019-01-10 Thread Lyude Paul
This has never actually worked, and isn't needed anyway: the driver's always going to try to deallocate VCPI when it tears down the display that the VCPI belongs to. Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc:

[PATCH v6 13/20] drm/nouveau: Remove unnecessary VCPI checks in nv50_msto_cleanup()

2019-01-10 Thread Lyude Paul
his code in the future, use msto->disabled instead to check whether or not we need to deallocate VCPI instead. Signed-off-by: Lyude Paul Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 15 +-- 1 fi

[PATCH v6 14/20] drm/nouveau: Keep malloc references to MST ports

2019-01-10 Thread Lyude Paul
mstc->port could technically be pointing at freed memory. Signed-off-by: Lyude Paul Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/nouveau

[PATCH v6 15/20] drm/nouveau: Stop unsetting mstc->port, use malloc refs

2019-01-10 Thread Lyude Paul
Same as we did for i915, but for nouveau this time. Additionally, we grab a malloc reference to the port that lasts for the entire lifetime of nv50_mstc, which gives us the guarantee that mstc->port will always point to valid memory for as long as the mstc stays around. Signed-off-by: Lyude P

[PATCH v6 19/20] drm/dp_mst: Check payload count in drm_dp_mst_atomic_check()

2019-01-10 Thread Lyude Paul
It occurred to me that we never actually check this! So let's start doing that. Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li --- drivers/gpu/drm/drm_dp_mst_topology.c | 8 +++- 1 file changed, 7 insertions(

[PATCH v6 17/20] drm/dp_mst: Add some atomic state iterator macros

2019-01-10 Thread Lyude Paul
Changes since v6: - Move EXPORT_SYMBOL() for drm_dp_mst_topology_state_funcs to this commit - Document __drm_dp_mst_state_iter_get() and note that it shouldn't be called directly Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentlan

[PATCH v6 18/20] drm/dp_mst: Start tracking per-port VCPI allocations

2019-01-10 Thread Lyude Paul
anvet - Annotate atomic VCPI and atomic check functions with __must_check - danvet Changes since v1: - Don't use the now-removed ->atomic_check() for private objects hook, just give drivers a function to call themselves Signed-off-by: Lyude Paul Reviewed-by: D

[PATCH v6 20/20] drm/nouveau: Use atomic VCPI helpers for MST

2019-01-10 Thread Lyude Paul
hanges since v5: * Update nv50_msto_atomic_check() and nv50_mstc_atomic_check() to the new requirements for drm_dp_atomic_find_vcpi_slots() and drm_dp_atomic_release_vcpi_slots() Signed-off-by: Lyude Paul Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li ---

[PATCH v6 09/20] drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs

2019-01-10 Thread Lyude Paul
t the ports are still valid and in the topology, any port which has an allocated payload will remain allocated in memory until it's payloads have been removed - finally allowing us to actually release said payloads correctly. Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Reviewed-by

<    1   2   3   4   5   6   7   >