Re: [PATCH] drm/dp_mst: Enhance DP MST topology logging

2021-03-18 Thread Lyude Paul
t; +   seq_printf(m, "\n *** Payload Info ***\n"); > +   seq_printf(m, "|   idx   |  state  |  start slot  | # slots |\n"); > for (i = 0; i < mgr->max_payloads; i++) { > -   seq_printf(m, "payload %d: %d, %d, %d\n", > -  

Re: [PATCH] drm/dp_mst: Enhance DP MST topology logging

2021-03-23 Thread Lyude Paul
0; i < mgr->max_payloads; i++) { > -   seq_printf(m, "payload %d: %d, %d, %d\n", > -      i, > -  mgr->payloads[i].payload_state, > -  mgr->payloads[i].start_slot, > - 

Re: [PATCH v2] drm/mst: Enhance MST topology logging

2021-03-25 Thread Lyude Paul
Reviewed-by: Lyude Paul Let me know if you need me to push this to drm-misc-next for you On Thu, 2021-03-25 at 14:06 -0400, Eryk Brol wrote: > [why] > MST topology print was missing fec logging and pdt printed > as an int wasn't clear. vcpi and payload info was printed as an >

Re: [PATCH] drm: Update MST First Link Slot Information Based on Encoding Format

2021-03-26 Thread Lyude Paul
Function parameter or member 'first_link_start_slot' not described in 'drm_dp_mst_topology_mgr' > +   u8 first_link_total_avail_slots; > +   u8 first_link_start_slot; > + > /** > * @funcs: Atomic helper callbacks > */ > @

[PATCH v2 00/20] drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers

2021-03-26 Thread Lyude Paul
* Address most checkpatch issues ('most' as in all except for one line going two chars over 100 in "drm/dp_mst: Pass drm_dp_mst_topology_mgr to drm_dp_get_vc_payload_bw()" as this was the style in use previously, and 2 chars over the limit looks nicer then trying to line-

[PATCH v2 01/20] drm/dp: Fixup kernel docs for struct drm_dp_aux

2021-03-26 Thread Lyude Paul
ctly Signed-off-by: Lyude Paul Acked-by: Randy Dunlap --- include/drm/drm_dp_helper.h | 44 ++--- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 632ad7faa006..5efa0d329b67 10064

[PATCH v2 03/20] drm/bridge/cdns-mhdp8546: Register DP aux channel with userspace

2021-03-26 Thread Lyude Paul
Just adds some missing calls to drm_dp_aux_register()/drm_dp_aux_unregister() for when we attach/detach the bridge. Signed-off-by: Lyude Paul --- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH v2 04/20] drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister

2021-03-26 Thread Lyude Paul
Since AUX adapters on nouveau have their respective DRM connectors as parents, we need to make sure that we register then after their connectors. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_connector.c | 26 ++--- 1 file changed, 18 insertions(+), 8 deletions

[PATCH v2 02/20] drm/tegra: Don't register DP AUX channels before connectors

2021-03-26 Thread Lyude Paul
tform device instead of being a grandchild of the DRM device. Since we're about to add a backpointer to a DP AUX channel's respective DRM device, let's fix this so that we don't potentially allow userspace to use the AUX channel before we've associated it with it's DRM co

[PATCH v2 07/20] drm/print: Fixup DRM_DEBUG_KMS_RATELIMITED()

2021-03-26 Thread Lyude Paul
ove the code for this into another macro that we can reuse for defining new ratelimited DRM debug macros more easily. v2: * Make sure to use tabs where possible in __DRM_DEFINE_DBG_RATELIMITED() Signed-off-by: Lyude Paul Cc: Robert Foss --- include/drm/drm_print.h | 20 1 fil

[PATCH v2 08/20] drm/dp: Pass drm_dp_aux to drm_dp_link_train_clock_recovery_delay()

2021-03-26 Thread Lyude Paul
So that we can start using drm_dbg_*() in drm_dp_link_train_clock_recovery_delay(). Signed-off-by: Lyude Paul Reviewed-by: Laurent Pinchart Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c | 3

[PATCH v2 06/20] drm/dp: Clarify DP AUX registration time

2021-03-26 Thread Lyude Paul
bridges. So, let's fix this documentation to clarify when the right time to use drm_dp_aux_init() or drm_dp_aux_register() is. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_helper.c | 44 +++-- 1 file changed, 31 insertions(+), 13 deletions(-) diff --

[PATCH v2 05/20] drm/dp: Add backpointer to drm_device in drm_dp_aux

2021-03-26 Thread Lyude Paul
We make sure to point this out in the documentation for struct drm_dp_aux. Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 1 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 + drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 1 +

[PATCH v2 09/20] drm/dp: Pass drm_dp_aux to drm_dp*_link_train_channel_eq_delay()

2021-03-26 Thread Lyude Paul
So that we can start using drm_dbg_*() for drm_dp_link_train_channel_eq_delay() and drm_dp_lttpr_link_train_channel_eq_delay(). Signed-off-by: Lyude Paul Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c

[PATCH v2 12/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_set_tmds_output()

2021-03-26 Thread Lyude Paul
Another function that we'll need to pass a drm_device (and not drm_dp_aux) down to so that we can move over to using drm_dbg_*(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 3 +-- includ

[PATCH v2 13/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_max_tmds_clock()

2021-03-26 Thread Lyude Paul
Another function we need to pass drm_device down to in order to start using drm_dbg_*(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- include/drm/drm_dp_dual_mode_helper.h | 2 +- 3 files changed, 4

[PATCH v2 10/20] drm/dp: Always print aux channel name in logs

2021-03-26 Thread Lyude Paul
Since we're about to convert everything in drm_dp_helper.c over to using drm_dbg_*(), let's also make our logging more consistent in drm_dp_helper.c while we're at it to ensure that we always print the name of the AUX channel in question. Signed-off-by: Lyude Paul ---

[PATCH v2 14/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_get_tmds_output()

2021-03-26 Thread Lyude Paul
Another function to pass drm_device * down to so we can start using the drm_dbg_*() in the DRM DP helpers. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 5 +++-- include/drm/drm_dp_dual_mode_helper.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff

[PATCH v2 11/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_detect()

2021-03-26 Thread Lyude Paul
ed to pass down the drm_device to these functions instead of using drm_dp_aux. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 4 +++- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- drivers/gpu/drm/i915/display/intel_lspcon.c | 5 +++-- include/drm/drm_dp_dua

[PATCH v2 15/20] drm/dp_dual_mode: Pass drm_device to drm_lspcon_(get|set)_mode()

2021-03-26 Thread Lyude Paul
So that we can start using drm_dbg_*() throughout the DRM DP helpers. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 8 +--- drivers/gpu/drm/i915/display/intel_lspcon.c | 12 +++- include/drm/drm_dp_dual_mode_helper.h | 4 ++-- 3 files changed

[PATCH v2 17/20] drm/dp: Convert drm_dp_helper.c to using drm_err/drm_dbg_*()

2021-03-26 Thread Lyude Paul
ing in drm_dp_dump_access Signed-off-by: Lyude Paul Cc: Robert Foss --- drivers/gpu/drm/drm_dp_helper.c | 121 1 file changed, 59 insertions(+), 62 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index 54e19d7b9c51..

[PATCH v2 16/20] drm/dp_mst: Pass drm_dp_mst_topology_mgr to drm_dp_get_vc_payload_bw()

2021-03-26 Thread Lyude Paul
Since this is one of the few functions in drm_dp_mst_topology.c that doesn't have any way of getting access to a drm_device, let's pass the drm_dp_mst_topology_mgr down to this function so that it can use drm_dbg_kms(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_

[PATCH v2 18/20] drm/dp_dual_mode: Convert drm_dp_dual_mode_helper.c to using drm_err/drm_dbg_kms()

2021-03-26 Thread Lyude Paul
, expr); ) And correcting the indentation of the resulting code by hand. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 45 +++ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_dual_mode_helper.c b/drivers

[PATCH v2 20/20] drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*()

2021-03-26 Thread Lyude Paul
drm_dp_mst_atomic_check_mstb_bw_limit() Signed-off-by: Lyude Paul Cc: Robert Foss --- drivers/gpu/drm/drm_dp_mst_topology.c | 368 +- 1 file changed, 187 insertions(+), 181 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index

[PATCH v2 19/20] drm/dp_mst: Drop DRM_ERROR() on kzalloc() fail in drm_dp_mst_handle_up_req()

2021-03-26 Thread Lyude Paul
Checkpatch was complaining about this - there's no need for us to print errors when kzalloc() fails, as kzalloc() will already WARN for us. So, let's fix that before converting things to make checkpatch happy. Signed-off-by: Lyude Paul Cc: Robert Foss --- drivers/gpu/drm/drm_dp_mst_

Re: [PATCH v2] drm/mst: Enhance MST topology logging

2021-03-26 Thread Lyude Paul
seq_printf(m, "%6d - Unused\n", i); > } > +   seq_printf(m, "\n*** Payload Info ***\n"); > +   seq_printf(m, "|   idx   |  state  |  start slot  | # slots |\n"); > for (i = 0; i < mgr->max_payloads; i++) { > -   seq_print

Re: [Intel-gfx] [PATCH v2 00/20] drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers

2021-04-08 Thread Lyude Paul
drm-intel-next and drm-intel-gt-next, > and are all in sync, it's only the drm-next -> drm-misc-next backmerge > that's still needed. > > BR, > Jani. > -- Sincerely, Lyude Paul (she/her) Software Engineer at Red Hat Note: I deal with a lot of emails an

Re: [PATCH 03/30] drm/tegra: Don't register DP AUX channels before connectors

2021-04-14 Thread Lyude Paul
On Wed, 2021-04-14 at 18:49 +0200, Thierry Reding wrote: > On Fri, Feb 19, 2021 at 04:52:59PM -0500, Lyude Paul wrote: > > As pointed out by the documentation for drm_dp_aux_register(), > > drm_dp_aux_init() should be used in situations where the AUX channel for a > &g

[PATCH v3 00/20] drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers

2021-04-19 Thread Lyude Paul
DP helpers over to using drm_dbg_*() and drm_err(). Lyude Paul (20): drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector() drm/dp: Add __no_check to drm_dp_aux_register() drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini drm/bridge/cdns-mhdp8546: Reg

[PATCH v3 01/20] drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector()

2021-04-19 Thread Lyude Paul
or DP connector creation doesn't attempt to do any real error handling. So, let's fix this and also cleanup amdgpu_dm_initialize_dp_connector() while we're at it. This way we can handle the error codes from drm_dp_aux_init(). Signed-off-by: Lyude Paul --- .../gpu/drm/amd/display/amdgpu

[PATCH v3 02/20] drm/dp: Add __no_check to drm_dp_aux_register()

2021-04-19 Thread Lyude Paul
Since we're about to make it so that drm_dp_aux_init() can fail (and thus - should have it's return value checked) - we should require that callers of drm_dp_aux_register() also check it's return value since drm_dp_aux_init() can be called from there. Signed-off-by: Lyude Paul -

[PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini

2021-04-19 Thread Lyude Paul
. And finally, we add a drm_dp_aux_fini() and hook it up in all DRM drivers across the kernel to take care of cleaning up the i2c adapter once it's no longer needed. This should also fix the regressions noted in the Tegra driver. Signed-off-by: Lyude Paul Fixes: 39c17ae60ea9 ("drm/t

[PATCH v3 04/20] drm/bridge/cdns-mhdp8546: Register DP aux channel with userspace

2021-04-19 Thread Lyude Paul
Just adds some missing calls to drm_dp_aux_register()/drm_dp_aux_unregister() for when we attach/detach the bridge. Signed-off-by: Lyude Paul --- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH v3 05/20] drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister

2021-04-19 Thread Lyude Paul
Since AUX adapters on nouveau have their respective DRM connectors as parents, we need to make sure that we register then after their connectors. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_connector.c | 25 - 1 file changed, 20 insertions(+), 5 deletions

[PATCH v3 06/20] drm/dp: Add backpointer to drm_device in drm_dp_aux

2021-04-19 Thread Lyude Paul
We make sure to point this out in the documentation for struct drm_dp_aux. v3: * Add WARN_ON_ONCE() to drm_dp_aux_register() if drm_dev isn't filled out Signed-off-by: Lyude Paul Acked-by: Thierry Reding --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 7 --- .../g

[PATCH v3 07/20] drm/dp: Clarify DP AUX registration time

2021-04-19 Thread Lyude Paul
bridges. So, let's fix this documentation to clarify when the right time to use drm_dp_aux_init() or drm_dp_aux_register() is. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_helper.c | 57 + 1 file changed, 37 insertions(+), 20 deletions(-) diff --

[PATCH v3 08/20] drm/dp: Pass drm_dp_aux to drm_dp_link_train_clock_recovery_delay()

2021-04-19 Thread Lyude Paul
So that we can start using drm_dbg_*() in drm_dp_link_train_clock_recovery_delay(). Signed-off-by: Lyude Paul Reviewed-by: Laurent Pinchart Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c | 3

[PATCH v3 09/20] drm/dp: Pass drm_dp_aux to drm_dp*_link_train_channel_eq_delay()

2021-04-19 Thread Lyude Paul
So that we can start using drm_dbg_*() for drm_dp_link_train_channel_eq_delay() and drm_dp_lttpr_link_train_channel_eq_delay(). Signed-off-by: Lyude Paul Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c

[PATCH v3 10/20] drm/dp: Always print aux channel name in logs

2021-04-19 Thread Lyude Paul
Since we're about to convert everything in drm_dp_helper.c over to using drm_dbg_*(), let's also make our logging more consistent in drm_dp_helper.c while we're at it to ensure that we always print the name of the AUX channel in question. Signed-off-by: Lyude Paul ---

[PATCH v3 13/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_max_tmds_clock()

2021-04-19 Thread Lyude Paul
Another function we need to pass drm_device down to in order to start using drm_dbg_*(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- include/drm/drm_dp_dual_mode_helper.h | 2 +- 3 files changed, 4

[PATCH v3 12/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_set_tmds_output()

2021-04-19 Thread Lyude Paul
Another function that we'll need to pass a drm_device (and not drm_dp_aux) down to so that we can move over to using drm_dbg_*(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 3 +-- includ

[PATCH v3 14/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_get_tmds_output()

2021-04-19 Thread Lyude Paul
Another function to pass drm_device * down to so we can start using the drm_dbg_*() in the DRM DP helpers. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 5 +++-- include/drm/drm_dp_dual_mode_helper.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff

[PATCH v3 11/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_detect()

2021-04-19 Thread Lyude Paul
ed to pass down the drm_device to these functions instead of using drm_dp_aux. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 4 +++- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- drivers/gpu/drm/i915/display/intel_lspcon.c | 5 +++-- include/drm/drm_dp_dua

[PATCH v3 17/20] drm/print: Handle potentially NULL drm_devices in drm_dbg_*

2021-04-19 Thread Lyude Paul
the kernel doesn't break anything), we should do the same for ours. Signed-off-by: Lyude Paul --- include/drm/drm_print.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index a3c58c941bdc..9b66b

[PATCH v3 18/20] drm/dp: Convert drm_dp_helper.c to using drm_err/drm_dbg_*()

2021-04-19 Thread Lyude Paul
ing in drm_dp_dump_access Signed-off-by: Lyude Paul Cc: Robert Foss Reviewed-by: Robert Foss --- drivers/gpu/drm/drm_dp_helper.c | 121 1 file changed, 59 insertions(+), 62 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_he

[PATCH v3 16/20] drm/dp_mst: Pass drm_dp_mst_topology_mgr to drm_dp_get_vc_payload_bw()

2021-04-19 Thread Lyude Paul
Since this is one of the few functions in drm_dp_mst_topology.c that doesn't have any way of getting access to a drm_device, let's pass the drm_dp_mst_topology_mgr down to this function so that it can use drm_dbg_kms(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_

[PATCH v3 19/20] drm/dp_dual_mode: Convert drm_dp_dual_mode_helper.c to using drm_err/drm_dbg_kms()

2021-04-19 Thread Lyude Paul
, expr); ) And correcting the indentation of the resulting code by hand. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 45 +++ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_dual_mode_helper.c b/drivers

[PATCH v3 15/20] drm/dp_dual_mode: Pass drm_device to drm_lspcon_(get|set)_mode()

2021-04-19 Thread Lyude Paul
So that we can start using drm_dbg_*() throughout the DRM DP helpers. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 8 +--- drivers/gpu/drm/i915/display/intel_lspcon.c | 12 +++- include/drm/drm_dp_dual_mode_helper.h | 4 ++-- 3 files changed

[PATCH v3 20/20] drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*()

2021-04-19 Thread Lyude Paul
drm_dp_mst_atomic_check_mstb_bw_limit() Signed-off-by: Lyude Paul Cc: Robert Foss Reviewed-by: Robert Foss --- drivers/gpu/drm/drm_dp_mst_topology.c | 368 +- 1 file changed, 187 insertions(+), 181 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm

Re: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini

2021-04-22 Thread Lyude Paul
trying to expose the i2c adapter early? > -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini

2021-04-22 Thread Lyude Paul
iners to see if this is acceptable w/ them On Thu, 2021-04-22 at 13:18 -0400, Lyude Paul wrote: > On Tue, 2021-04-20 at 02:16 +0300, Ville Syrjälä wrote: > > > > The init vs. register split is intentional. Registering the thing > > and allowing userspace access to it before

Re: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini

2021-04-22 Thread Lyude Paul
On Thu, 2021-04-22 at 18:33 -0400, Lyude Paul wrote: > OK - talked with Ville a bit on this and did some of my own research, I > actually think that moving i2c to drm_dp_aux_init() is the right decision > for > the time being. The reasoning behind this being that as shown by my previo

[PATCH 4/4] drm/dp_mst: Remove drm_dp_mst_topology_cbs.destroy_connector

2020-03-31 Thread Lyude Paul
Now that we've removed the last user of this callback, get rid of it and drm_dp_destroy_connector(). Signed-off-by: Lyude Paul Cc: Pankaj Bharadiya --- drivers/gpu/drm/drm_dp_mst_topology.c | 16 +++- include/drm/drm_dp_mst_helper.h | 2 -- 2 files changed, 3 inser

[PATCH 0/4] drm/dp_mst: Remove ->destroy_connector() callback

2020-03-31 Thread Lyude Paul
This finishes up the work that Pankaj Bharadiya started in: https://patchwork.freedesktop.org/series/74412/ And allows us to entirely remove ->destroy_connector() Lyude Paul (4): drm/amd/amdgpu_dm/mst: Remove unneeded edid assignment when destroying connectors drm/amd/amdgpu_dm/

[PATCH 2/4] drm/amd/amdgpu_dm/mst: Remove ->destroy_connector() callback

2020-03-31 Thread Lyude Paul
ng important and I'm not sure why it was ever being called here * Stop clearing aconnector->dc_sink - this also doesn't do anything * Stop clearing link settings in dc_link - this also doesn't do anything * Also, use shorter variable Signed-off-by: Lyude Paul Cc: Pankaj Bharadiy

[PATCH 3/4] drm/amd/amdgpu_dm/mst: Stop printing extra messages in dm_dp_add_mst_connector()

2020-03-31 Thread Lyude Paul
You can already trace the creation and destruction of connectors using DRM, and we definitely don't need to be printing info messages on connector hotplugs as well. So, get rid of these. Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 5 - 1

[PATCH 1/4] drm/amd/amdgpu_dm/mst: Remove unneeded edid assignment when destroying connectors

2020-03-31 Thread Lyude Paul
Doesn't do anything, noticed this while cleaning up some unrelated stuff. Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gp

[PATCH 2/2] drm/amd/dc: Kill dc_conn_log_hex_linux()

2020-03-31 Thread Lyude Paul
DRM already supports tracing DPCD transactions, there's no reason for the existence of this function. Also, it prints one byte per-line which is way too loud. So, just remove it. Signed-off-by: Lyude Paul --- .../gpu/drm/amd/display/dc/basics/Makefile| 3 +- .../drm/amd/display/dc/b

[PATCH 0/2] drm/amdgpu: Remove duplicated DPCD logging

2020-03-31 Thread Lyude Paul
There's a bunch of messy DPCD tracing code in amdgpu that isn't needed since we already support this in DRM. Plus, it's really spammy. So, just get rid of it. Lyude Paul (2): drm/amd/amdgpu_dm/mst: Remove useless sideband tracing drm/amd/dc: Kill dc_conn_log_hex_linux(

[PATCH 1/2] drm/amd/amdgpu_dm/mst: Remove useless sideband tracing

2020-03-31 Thread Lyude Paul
We already trace DPCD reads/writes on both MST and SST, there's no reason to have this code here (plus, toggling these things with a define at the top of the file isn't how we do things in the kernel). Signed-off-by: Lyude Paul --- .../display/amdgpu_dm/amdgpu_dm_mst_type

Re: [PATCH] drm/dp_mst: Zero assigned PBN when releasing VCPI slots

2020-04-07 Thread Lyude Paul
if (pos->vcpi) { > drm_dp_mst_put_port_malloc(port); > pos->vcpi = 0; > + pos->pbn = 0; > } > > return 0; -- Cheers, Lyude Paul (she/her) Associate Software Engineer at Red Hat ___

Re: [PATCH] drm/dp_mst: Zero assigned PBN when releasing VCPI slots

2020-04-17 Thread Lyude Paul
Reviewed-by: Lyude Paul In the future btw, you should use the DRM maintainer tools to add a Fixed-by tag, since this: Fixes: cd82d82cbc04 ("drm/dp_mst: Add branch bandwidth validation to MST atomic check") Also so it gets cc'd to stable, I'll fixup the patch and push it. T

Re: [PATCH 4/5] drm_dp_cec: add plumbing in preparation for MST support

2020-09-01 Thread Lyude Paul
er if that is the case. > */ > void drm_dp_cec_register_connector(struct drm_dp_aux *aux, > -struct drm_connector *connector) > + struct drm_connector *connector, bool is_mst) > { > WARN_ON(aux->cec.adap); &

[RESEND] Requests For Proposals for hosting XDC2021 are now open

2020-09-03 Thread Lyude Paul
amp;A with organizers. And if you just have some questions about what organizing XDC entails, please feel free to chat with previous organizers, or someone from the board. -- Sincerely, Lyude Paul (she/her) Software Engineer at Red Hat

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 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 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 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 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 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 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 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 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 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 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 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

[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

[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 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 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 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 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 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 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 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 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 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 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 24/27] drm/amdgpu/dm: Resume short HPD IRQs before resuming MST topology

2019-09-03 Thread Lyude Paul
tland Cc: Daniel Vetter 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 73630e2

<    1   2   3   4   5   6   7   >