Re: [PATCH v6 1/2] drm/display/dp: Export fn to calculate link symbol cycles

2025-04-24 Thread Imre Deak
> > v4: Expose only drm_dp_link_symbol_cycles() (Imre) > > > > Reviewed-by: Imre Deak > > Signed-off-by: Arun R Murthy > > --- > >  drivers/gpu/drm/display/drm_dp_helper.c | 53 > > + > >  include/drm/display/drm_dp_helper.h

Re: [PATCH v5 2/2] drm/i915/display: move min_hblank from dp_mst.c to dp.c

2025-04-23 Thread Imre Deak
active_sym_cycles = drm_dp_link_symbol_cycles(max_lane_count, > + adjusted_mode->hdisplay, > +dsc_slices, > +link_b

Re: [PATCH v5 1/2] drm/display/dp: Export fn to calculate link symbol cycles

2025-04-23 Thread Imre Deak
ane count > * @hactive: pixel count of the active period in one scanline of the stream > - * @dsc_slice_count: DSC slice count if @flags/DRM_DP_LINK_BW_OVERHEAD_DSC > is set > + * @dsc_slice_count: number of slices Same nit as the above @dsc_slice_count one. > * @bpp_x16: bits

Re: [PATCH v3 3/3] drm/i915/display: move min_hblank from dp_mst.c to dp.c

2025-04-22 Thread Imre Deak
On Tue, Apr 22, 2025 at 08:28:31AM +0300, Kandpal, Suraj wrote: > [...] > > > +void intel_dp_compute_min_hblank(int link_bpp_x16, > > +struct intel_crtc_state *crtc_state, > > +struct drm_connector_state *conn_state, > > +

Re: [PATCH v3 3/3] drm/i915/display: move min_hblank from dp_mst.c to dp.c

2025-04-22 Thread Imre Deak
On Tue, Apr 22, 2025 at 10:25:48AM +0300, Govindapillai, Vinod wrote: > [...] > > > > +3263,9 @@ intel_dp_compute_config(struct intel_encoder *encoder, > > > >      &pipe_config->dp_m_n); > > > >   } > > > > > > > > + intel_dp_compute_min_hblank(link_b

Re: [PATCH v3 1/3] drm/display/dp: Export fn to calculate link symbol cycles

2025-04-22 Thread Imre Deak
On Tue, Apr 22, 2025 at 08:03:52AM +0300, Kandpal, Suraj wrote: > > > > -Original Message- > > From: Intel-gfx On Behalf Of Arun > > R > > Murthy > > Sent: Thursday, April 17, 2025 4:22 PM > > To: dri-devel@lists.freedesktop.org; intel-...@lists.freedesktop.org; intel- > > x...@lists.fr

Re: [PATCH v3 1/3] drm/display/dp: Export fn to calculate link symbol cycles

2025-04-22 Thread Imre Deak
On Thu, Apr 17, 2025 at 04:22:28PM +0530, Arun R Murthy wrote: > Unify the function to calculate the link symbol cycles for both dsc and > non-dsc case and export the function so that it can be used in the > respective platform display drivers for other calculations. > > v2: unify the fn for both

Re: [PATCH v2 3/3] drm/i915/display: move min_hblank from dp_mst.c to dp.c

2025-04-15 Thread Imre Deak
On Tue, Apr 15, 2025 at 01:25:09PM +0530, Arun R Murthy wrote: > Minimum HBlank is programmed to address jitter for high resolutions with > high refresh rates that have small Hblank, specifically where Hblank is > smaller than one MTP. > > TODO: Add the min_hblank calculation for hdmi as well. >

Re: [PATCH v2 1/3] drm/display/dp: Export fn to calculate link symbol cycles

2025-04-15 Thread Imre Deak
On Tue, Apr 15, 2025 at 01:25:07PM +0530, Arun R Murthy wrote: > Unify the function to calculate the link symbol cycles for both dsc and > non-dsc case and export the function so that it can be used in the > respective platform display drivers for other calculations. > > v2: unify the fn for both

Re: [PATCH 3/3] drm/i915/audio: move min_hblank from dp_mst to audio

2025-04-08 Thread Imre Deak
On Tue, Apr 08, 2025 at 09:40:36AM +0530, Arun R Murthy wrote: > Minimum HBlank is programmed to address jitter for high resolutions with > high refresh rates that have small Hblank, specifically where Hblank is > smaller than one MTP. I wondered if following the standard practice of one change pe

Re: [PATCH 1/3] drm/drm_dp_helper: export link symbol cycles calculation

2025-04-08 Thread Imre Deak
On Tue, Apr 08, 2025 at 09:40:34AM +0530, Arun R Murthy wrote: > Link symbol cycles are required for the calculation of the minimum > HBlank calculation. > > Signed-off-by: Arun R Murthy > --- > drivers/gpu/drm/display/drm_dp_helper.c | 10 ++ > include/drm/display/drm_dp_helper.h |

Re: [PATCH 0/3] Rework/Correction on minimum hblank calculation

2025-04-08 Thread Imre Deak
Hi, thanks for following up on this. You could've added some detail about what the patchset is doing. --Imre On Tue, Apr 08, 2025 at 09:40:33AM +0530, Arun R Murthy wrote: > Signed-off-by: Arun R Murthy > --- > Arun R Murthy (3): > drm/drm_dp_helper: export link symbol cycles calculation

Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()

2025-04-07 Thread Imre Deak
Hi, On Tue, Apr 01, 2025 at 12:03:47PM -0400, Anusha Srivatsa wrote: > Move to using the new API devm_drm_panel_alloc() to allocate the > panel. > > Signed-off-by: Anusha Srivatsa > --- > drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 -- > 1 file changed, 4 insertions(+), 6 deletions

[PATCH 2/2] drm/dp_mst: Use drm_dp_dpcd_write_data() to write GUID for non-root MST branch devices

2025-04-05 Thread Imre Deak
drm_dp_dpcd_write_data() can be used to write the GUID for a non-root MST branch device, similarly to writing the GUID to a root MST branch device, do so. Cc: Dmitry Baryshkov Cc: Lyude Paul Signed-off-by: Imre Deak --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 17 +++-- 1

Re: drm/i915: Add DSC/FEC support info to debugfs

2025-04-03 Thread Imre Deak
On Fri, Apr 04, 2025 at 12:34:48AM +0530, shantam.yashas...@intel.com wrote: > From: Shantam Yashashvi > > Signed-off-by: Shantam Yashashvi > --- > drivers/gpu/drm/i915/display/intel_display_debugfs.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/gpu/drm/i915/di

[PATCH 1/2] drm/dp_mst: Fix GUID DPCD write to non-root MST branch devices

2025-04-01 Thread Imre Deak
(). Fix this by converting the return value for a complete read to the expected success code (0) and for a partial read to a failure code (-EPROTO). Fixes: 2554da0de3e8 ("drm/display: dp-mst-topology: use new DCPD access helpers") Cc: Dmitry Baryshkov Cc: Lyude Paul Signed-off-by:

Re: [PATCH] drm/dp_mst: Fix locking when skipping CSN before topology probing

2025-03-11 Thread Imre Deak
On Mon, Mar 10, 2025 at 01:01:25PM +, Lin, Wayne wrote: > [Public] > > > -Original Message- > > From: Imre Deak > > Sent: Monday, March 10, 2025 7:00 PM > > To: Lin, Wayne > > Cc: intel-...@lists.freedesktop.org; intel...@lists.freedesktop.org;

Re: ✓ i915.CI.BAT: success for drm/dp_mst: Fix locking when skipping CSN before topology probing

2025-03-11 Thread Imre Deak
On Fri, Mar 07, 2025 at 08:18:18PM +, Patchwork wrote: > == Series Details == > > Series: drm/dp_mst: Fix locking when skipping CSN before topology probing > URL : https://patchwork.freedesktop.org/series/146019/ > State : success Thanks for the reviews, patch is pushed to drm-misc-fixes.

Re: [PATCH] drm/dp_mst: Fix locking when skipping CSN before topology probing

2025-03-10 Thread Imre Deak
On Mon, Mar 10, 2025 at 08:59:51AM +, Lin, Wayne wrote: > > > -Original Message- > > From: Imre Deak > > Sent: Saturday, March 8, 2025 2:32 AM > > To: intel-...@lists.freedesktop.org; intel...@lists.freedesktop.org; dri- > > de...@lists.freedesktop.or

[PATCH] drm/dp_mst: Fix locking when skipping CSN before topology probing

2025-03-07 Thread Imre Deak
down-request replies won't be blocked by probe_lock. Fixes: ddf983488c3e ("drm/dp_mst: Skip CSN if topology probing is not done yet") Cc: Wayne Lin Cc: Lyude Paul Cc: sta...@vger.kernel.org # v6.6+ Signed-off-by: Imre Deak --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 40 +++

Re: [PATCH] drm: Fix DSC BPP increment decoding

2025-02-13 Thread Imre Deak
On Wed, Feb 12, 2025 at 06:46:40PM +0200, Jani Nikula wrote: > On Wed, 12 Feb 2025, Imre Deak wrote: > > Starting with DPCD version 2.0 bits 6:3 of the DP_DSC_BITS_PER_PIXEL_INC > > DPCD register contains the NativeYCbCr422_MAX_bpp_DELTA field, which can > > be non-zero as op

[PATCH] drm: Fix DSC BPP increment decoding

2025-02-12 Thread Imre Deak
mask, do so. Cc: Ankit Nautiyal Fixes: 0c2287c96521 ("drm/display/dp: Add helper function to get DSC bpp precision") Signed-off-by: Imre Deak --- drivers/gpu/drm/display/drm_dp_helper.c | 2 +- include/drm/display/drm_dp.h| 1 + 2 files changed, 2 insertions(+), 1 deletio

Re: [PATCH v2 16/16] drm/i915/dp: compute config for 128b/132b SST w/o DSC

2025-02-04 Thread Imre Deak
On Thu, Dec 19, 2024 at 11:34:05PM +0200, Jani Nikula wrote: > Enable basic 128b/132b SST functionality without compression. Reuse > intel_dp_mtp_tu_compute_config() to figure out the TU after we've > determined we need to use an UHBR rate. > > It's slightly complicated as the M/N computation is d

Re: [BUG,BISECTED] WARNING dcn20_find_secondary_pipe

2025-01-27 Thread Imre Deak
On Sun, Jan 26, 2025 at 04:46:49PM +, Chris Bainbridge wrote: > Hardware is HP Pavilion Aero 13 laptop with Dell WD19 dock and three > external monitors. I get a warning with recent kernel builds when > enabling the external monitors with xrandr after initial boot: > > 16:57:49 kernel: WARNING

Re: [PATCH v2 12/16] drm/i915/ddi: enable ACT handling for 128b/132b SST

2025-01-02 Thread Imre Deak
On Thu, Dec 19, 2024 at 11:34:01PM +0200, Jani Nikula wrote: > Add ACT handling for 128b/132b SST. > > This is preparation for enabling 128b/132b SST. This path is not > reachable yet. > > Signed-off-by: Jani Nikula > --- > drivers/gpu/drm/i915/display/intel_ddi.c | 13 + > 1 file c

Re: [PATCH v2 16/16] drm/i915/dp: compute config for 128b/132b SST w/o DSC

2025-01-02 Thread Imre Deak
gt; dsc_needed = true; > } > @@ -3148,8 +3155,13 @@ intel_dp_compute_config(struct intel_encoder *encoder, > pipe_config->limited_color_range = > intel_dp_limited_color_range(pipe_config, conn_state); > > - pipe_config-

Re: [PATCH v2 15/16] drm/i915/ddi: disable trancoder port select for 128b/132b SST

2025-01-02 Thread Imre Deak
On Thu, Dec 19, 2024 at 11:34:04PM +0200, Jani Nikula wrote: > 128b/1232b SST will have mst_master_transcoder set and matching > cpu_transcoder. Ensure disable also for 128b/132b SST. > > Co-developed-by: Imre Deak > Signed-off-by: Imre Deak > Signed-off-by: Jani Nikula Revi

Re: [PATCH v2 14/16] drm/i915/ddi: handle 128b/132b SST in intel_ddi_read_func_ctl()

2025-01-02 Thread Imre Deak
28b/132b SST path (Imre) > > Signed-off-by: Jani Nikula Reviewed-by: Imre Deak > --- > drivers/gpu/drm/i915/display/intel_ddi.c | 19 +-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c &

Re: [PATCH v2 13/16] drm/i915/ddi: start distinguishing 128b/132b SST and MST at state readout

2025-01-02 Thread Imre Deak
ware state, i.e. intel_dp->is_mst. It should be fine > for the state checker, but for hardware takeover at probe, we'll have to > trust the GOP has only enabled SST. > > TODO: Not sure how this *or* our current code handles 128b/132b enabled > by GOP. > > Cc: Imre Deak

Re: [PATCH v2 10/16] drm/i915/ddi: write payload for 128b/132b SST

2025-01-02 Thread Imre Deak
On Thu, Jan 02, 2025 at 12:52:38PM +0200, Jani Nikula wrote: > On Tue, 31 Dec 2024, Imre Deak wrote: > > On Thu, Dec 19, 2024 at 11:33:59PM +0200, Jani Nikula wrote: > >> Write the payload allocation table for 128b/132b SST. Use VCPID 1 and > >> start from s

Re: [PATCH v2 07/16] drm/i915/mst: adapt intel_dp_mtp_tu_compute_config() for 128b/132b SST

2025-01-02 Thread Imre Deak
On Thu, Jan 02, 2025 at 12:30:34PM +0200, Jani Nikula wrote: > On Tue, 31 Dec 2024, Imre Deak wrote: > > On Thu, Dec 19, 2024 at 11:33:56PM +0200, Jani Nikula wrote: > >> Handle 128b/132b SST in intel_dp_mtp_tu_compute_config(). The remote > >> bandwidth overhead and ti

Re: [PATCH v2 11/16] drm/i915/ddi: initialize 128b/132b SST DP2 VFREQ registers

2025-01-02 Thread Imre Deak
On Thu, Jan 02, 2025 at 11:39:07AM +0200, Jani Nikula wrote: > On Tue, 31 Dec 2024, Imre Deak wrote: > > On Thu, Dec 19, 2024 at 11:34:00PM +0200, Jani Nikula wrote: > >> Write the DP2 specific VFREQ registers. > >> > >> This is preparation for enab

Re: [PATCH v2 11/16] drm/i915/ddi: initialize 128b/132b SST DP2 VFREQ registers

2024-12-31 Thread Imre Deak
On Thu, Dec 19, 2024 at 11:34:00PM +0200, Jani Nikula wrote: > Write the DP2 specific VFREQ registers. > > This is preparation for enabling 128b/132b SST. This path is not > reachable yet. > > Signed-off-by: Jani Nikula > --- > drivers/gpu/drm/i915/display/intel_ddi.c | 12 > 1 fil

Re: [PATCH v2 11/16] drm/i915/ddi: initialize 128b/132b SST DP2 VFREQ registers

2024-12-31 Thread Imre Deak
TRANS_DP2_VFREQ_PIXEL_CLOCK(crtc_clock_hz & > 0xff)); > + } > + Nit: This could be in a helper, used by the MST encoder as well. Either way: Reviewed-by: Imre Deak > intel_ddi_enable_transcoder_func(encoder, crtc_state); > > /* Enable/Disable DP2.0 SDP split config before transcoder */ > -- > 2.39.5 >

Re: [PATCH v2 10/16] drm/i915/ddi: write payload for 128b/132b SST

2024-12-31 Thread Imre Deak
->aux, 1, 0, > crtc_state->dp_m_n.tu); I would handle the error by sending a modeset retry uevent. Either way: Reviewed-by: Imre Deak > + } > + > if (!is_mst) > intel_dsc_dp_pps_write(encoder, crtc_state); > } > @@ -2808,6 +2814,11 @@ s

Re: [PATCH v2 09/16] drm/i915/ddi: 128b/132b SST also needs DP_TP_CTL_MODE_MST

2024-12-31 Thread Imre Deak
t > reachable yet. > > Signed-off-by: Jani Nikula Reviewed-by: Imre Deak > --- > drivers/gpu/drm/i915/display/intel_ddi.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c > b/drivers/gpu/drm/i

Re: [PATCH v2 08/16] drm/i915/ddi: enable 128b/132b TRANS_DDI_FUNC_CTL mode for UHBR SST

2024-12-31 Thread Imre Deak
to also set transport select (Imre) > > Signed-off-by: Jani Nikula Reviewed-by: Imre Deak > --- > drivers/gpu/drm/i915/display/intel_ddi.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c > b/dri

Re: [PATCH v2 07/16] drm/i915/mst: adapt intel_dp_mtp_tu_compute_config() for 128b/132b SST

2024-12-31 Thread Imre Deak
* pbn_div.full; > - > - drm_WARN_ON(display->drm, remote_tu < crtc_state->dp_m_n.tu); > - crtc_state->dp_m_n.tu = remote_tu; > + if (intel_dp->is_mst) { > + int remote_bw_overhead; > +

Re: [PATCH v2 06/16] drm/i915/mst: split out a helper for figuring out the TU

2024-12-31 Thread Imre Deak
load_bw(crtc_state->port_clock, > + crtc_state->lane_count); Nit: looking this up from drm_dp_mst_topology_state (once SST and MST is separated done only in the MST case) instead of recalculating the same would be better. Either way: Reviewed-by:

Re: [PATCH v2 05/16] drm/i915/mst: remove crtc_state->pbn

2024-12-31 Thread Imre Deak
On Thu, Dec 19, 2024 at 11:33:54PM +0200, Jani Nikula wrote: > The crtc_state->pbn member is only used as a temporary variable within > mst_stream_find_vcpi_slots_for_bpp(). Remove it as unnecessary. > > Suggested-by: Imre Deak > Signed-off-by: Jani Nikula Revi

Re: [PATCH v2 04/16] drm/i915/mst: change return value of mst_stream_find_vcpi_slots_for_bpp()

2024-12-31 Thread Imre Deak
ead of slots from mst_stream_find_vcpi_slots_for_bpp() for success, > and simplify the callers. > > There's a pointless ret local variable that we can drop in the process. > > Signed-off-by: Jani Nikula Reviewed-by: Imre Deak > --- > drivers/gpu/drm/i915/display/int

Re: [PATCH v2 03/16] drm/i915/mst: drop connector parameter from intel_dp_mst_compute_m_n()

2024-12-31 Thread Imre Deak
On Thu, Dec 19, 2024 at 11:33:52PM +0200, Jani Nikula wrote: > intel_dp_mst_compute_m_n() doesn't need the connector. Remove the > parameter. > > Signed-off-by: Jani Nikula Reviewed-by: Imre Deak > --- > drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 +-- > 1 file

Re: [PATCH v2 02/16] drm/i915/mst: drop connector parameter from intel_dp_mst_bw_overhead()

2024-12-31 Thread Imre Deak
On Thu, Dec 19, 2024 at 11:33:51PM +0200, Jani Nikula wrote: > intel_dp_mst_bw_overhead() doesn't need the connector. Remove the > parameter. > > Signed-off-by: Jani Nikula Reviewed-by: Imre Deak > --- > drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 ++--- > 1

Re: [PATCH v2 01/16] drm/mst: remove mgr parameter and debug logging from drm_dp_get_vc_payload_bw()

2024-12-31 Thread Imre Deak
be used in non-MST contexts without the > topology manager. > > Cc: Imre Deak > Cc: Lyude Paul > Signed-off-by: Jani Nikula > --- > [...] > diff --git a/drivers/gpu/drm/tests/drm_dp_mst_helper_test.c > b/drivers/gpu/drm/tests/drm_dp_mst_helper_test.c >

Re: [PATCH v3 0/7] drm/connector: Expose only a properly inited connector

2024-12-17 Thread Imre Deak
On Thu, Dec 12, 2024 at 01:03:17AM +0200, Imre Deak wrote: The patchset at [2] is pushed now to drm-misc-next, thanks for the reviews, acks and ideas. While merging, I fixed the typos in patch 3, 5-7 and removed references to 'patches', 'patchsets' in the commit logs of patc

Re: [PATCH v3 06/11] drm/amd/dp_mst: Expose a connector to kernel users after it's properly initialized

2024-12-16 Thread Imre Deak
Hi Harry, Leo, Alex, Wayne, could you please ack this change as well? Thanks, Imre A typo below in the commit log, can fix it while merging the patch here and in the i915/nouveau patches. On Thu, Dec 12, 2024 at 01:03:23AM +0200, Imre Deak wrote: > After a connector is added to

Re: [PATCH v3 04/11] drm/dp_mst: Register connectors via drm_connector_dynamic_register()

2024-12-16 Thread Imre Deak
Hi Harry, Leo, Alex, Wayne, could you please ack this change? Thanks, Imre On Thu, Dec 12, 2024 at 01:03:21AM +0200, Imre Deak wrote: > MST connectors should be initialized/registered by calling > drm_connector_dynamic_init()/drm_connector_dynamic_register(). The > previous patch add

Re: [PATCH v3 0/7] drm/connector: Expose only a properly inited connector

2024-12-16 Thread Imre Deak
Hi Thomas, Maxime, Maarten, are you ok to merge patches 1-9 to drm-misc-next? Patches 10,11 could be merged then to drm-intel-next after back-merging drm-misc-next to drm-intel-next. Thanks, Imre On Thu, Dec 12, 2024 at 01:03:17AM +0200, Imre Deak wrote: > This is v3 of [1], with the follow

Re: [PATCH v3 04/11] drm/dp_mst: Register connectors via drm_connector_dynamic_register()

2024-12-16 Thread Imre Deak
On Mon, Dec 16, 2024 at 01:03:42PM +0200, Jani Nikula wrote: > On Fri, 13 Dec 2024, Imre Deak wrote: > > On Thu, Dec 12, 2024 at 12:12:15PM +0200, Jani Nikula wrote: > >> On Thu, 12 Dec 2024, Imre Deak wrote: > >> > MST connectors should be ini

Re: [PATCH v3 04/11] drm/dp_mst: Register connectors via drm_connector_dynamic_register()

2024-12-13 Thread Imre Deak
On Thu, Dec 12, 2024 at 12:12:15PM +0200, Jani Nikula wrote: > On Thu, 12 Dec 2024, Imre Deak wrote: > > MST connectors should be initialized/registered by calling > > drm_connector_dynamic_init()/drm_connector_dynamic_register(). The > > previous patch adding these functio

Re: [PATCH v3 02/11] drm/connector: Add FIXME for GETRESOURCES ioctl wrt. uninited connectors

2024-12-13 Thread Imre Deak
On Thu, Dec 12, 2024 at 12:06:12PM +0200, Jani Nikula wrote: > On Thu, 12 Dec 2024, Imre Deak wrote: > > The connectors enumerated by the GETRESOURCES ioctl may not be fully > > initialized yet wrt. to the state set up during connector registration > > (for instance the conn

Re: [PATCH v3 11/11] drm/i915/dp_mst: Use intel_connector vs. drm_connector pointer in intel_dp_mst.c

2024-12-12 Thread Imre Deak
On Thu, Dec 12, 2024 at 12:25:38PM +0200, Jani Nikula wrote: > On Thu, 12 Dec 2024, Imre Deak wrote: > > Follow the canonical way in intel_dp_mst.c, referencing a connector only > > via a struct intel_connector pointer and naming this pointer 'connector' > > instead

Re: [PATCH v3 03/11] drm/connector: Add deprication notes for drm_connector_register/unregister

2024-12-12 Thread Imre Deak
On Thu, Dec 12, 2024 at 12:10:58PM +0200, Jani Nikula wrote: > [...] > On Thu, 12 Dec 2024, Imre Deak wrote: > > @@ -863,9 +866,14 @@ EXPORT_SYMBOL(drm_connector_dynamic_register); > > * drm_connector_unregister - unregister a connector > > * @connector: the

Re: [PATCH v3 01/11] drm/connector: Add a way to init/add a connector in separate steps

2024-12-12 Thread Imre Deak
On Thu, Dec 12, 2024 at 12:04:17PM +0200, Jani Nikula wrote: > On Thu, 12 Dec 2024, Imre Deak wrote: > > Atm when the connector is added to the drm_mode_config::connector_list, > > the connector may not be fully initialized yet. This is not a problem > > for static connect

[PATCH v3 07/11] drm/nouveau/dp_mst: Expose a connector to kernel users after it's properly initialized

2024-12-11 Thread Imre Deak
which doesn't add the connector to the list - and registering it with drm_connector_dynamic_register() - which adds the connector to the list - after the initialization is complete. Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich Signed-off-by: Imre Deak --- drivers/gpu/drm/nouvea

[PATCH v3 10/11] drm/i915/dp_mst: Fix error handling while adding a connector

2024-12-11 Thread Imre Deak
After an error during adding an MST connector the MST port and the intel_connector object could be leaked, fix this up. Reviewed-by: Rodrigo Vivi Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 17 + 1 file changed, 9 insertions(+), 8 deletions

[PATCH v3 06/11] drm/amd/dp_mst: Expose a connector to kernel users after it's properly initialized

2024-12-11 Thread Imre Deak
which doesn't add the connector to the list - and registering it with drm_connector_dynamic_register() - which adds the connector to the list - after the initialization is complete. Cc: Harry Wentland Cc: Leo Li Cc: Wayne Lin Cc: Alex Deucher Cc: Lyude Paul Signed-off-by: Imre Deak --- d

[PATCH v3 04/11] drm/dp_mst: Register connectors via drm_connector_dynamic_register()

2024-12-11 Thread Imre Deak
to WARN in such cases. Cc: Lyude Paul Cc: Harry Wentland Cc: Leo Li Cc: Wayne Lin Cc: Alex Deucher Cc: Karol Herbst Cc: Danilo Krummrich Signed-off-by: Imre Deak --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH v3 11/11] drm/i915/dp_mst: Use intel_connector vs. drm_connector pointer in intel_dp_mst.c

2024-12-11 Thread Imre Deak
nnector, calling the drm_connector pointer _connector. Suggested-by: Jani Nikula Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 180 ++-- 1 file changed, 88 insertions(+), 92 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/

[PATCH v3 09/11] drm/tests: Add tests for drm_connector_dynamic_init()/register()

2024-12-11 Thread Imre Deak
Add kunit tests for drm_connector_dynamic_init()/drm_connector_dynamic_register() added in this patchset. Suggested-by: Maxime Ripard Signed-off-by: Imre Deak --- drivers/gpu/drm/tests/drm_connector_test.c | 463 + 1 file changed, 463 insertions(+) diff --git a/drivers/gpu

[PATCH v3 08/11] drm/connector: Warn if a connector is registered/added incorrectly

2024-12-11 Thread Imre Deak
ons incorrectly). Signed-off-by: Imre Deak --- drivers/gpu/drm/drm_connector.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index c322dbf6e3161..1bd7407223fbb 100644 --- a/drivers/gpu/drm/drm_connector.c ++

[PATCH v3 05/11] drm/i915/dp_mst: Expose a connector to kernel users after it's properly initialized

2024-12-11 Thread Imre Deak
en calling drm_connector_dynamic_register(). Cc: Lyude Paul Reviewed-by: Rodrigo Vivi (v1) Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 27 +++-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drive

[PATCH v3 03/11] drm/connector: Add deprication notes for drm_connector_register/unregister

2024-12-11 Thread Imre Deak
which should be a nop for them and hence are scheduled to be removed. Update the function documentation for these functions accordingly. Signed-off-by: Imre Deak --- drivers/gpu/drm/drm_connector.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers

[PATCH v3 02/11] drm/connector: Add FIXME for GETRESOURCES ioctl wrt. uninited connectors

2024-12-11 Thread Imre Deak
r Signed-off-by: Imre Deak --- drivers/gpu/drm/drm_mode_config.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c index 37d2e0a4ef4be..8642a2fb25a90 100644 --- a/drivers/gpu/drm/drm_mode_config.c +++ b

[PATCH v3 01/11] drm/connector: Add a way to init/add a connector in separate steps

2024-12-11 Thread Imre Deak
the commit log according to the above changes. - Update the commit log describing the problematic scenario during connector detection. (Maxime) Cc: Jani Nikula Cc: Simona Vetter Cc: Maxime Ripard Reviewed-by: Rodrigo Vivi (v1) Signed-off-by: Imre Deak --- drivers

[PATCH v3 0/7] drm/connector: Expose only a properly inited connector

2024-12-11 Thread Imre Deak
Nikula Cc: Simona Vetter Cc: Maxime Ripard Cc: Lyude Paul Cc: Harry Wentland Cc: Leo Li Cc: Wayne Lin Cc: Alex Deucher Cc: Karol Herbst Cc: Danilo Krummrich [1] https://lore.kernel.org/all/20241126161859.1858058-1-imre.d...@intel.com Imre Deak (11): drm/connector: Add a way to init

Re: ✓ i915.CI.Full: success for drm/dp_mst: Fix a few side-band message handling issues (rev3)

2024-12-05 Thread Imre Deak
On Wed, Dec 04, 2024 at 03:30:24PM +, Patchwork wrote: > == Series Details == > > Series: drm/dp_mst: Fix a few side-band message handling issues (rev3) > URL : https://patchwork.freedesktop.org/series/142057/ > State : success Thanks for the review, patchset is pushed to drm-misc-fixes. >

[PATCH v2 5/7] drm/dp_mst: Ensure mst_primary pointer is valid in drm_dp_mst_handle_up_req()

2024-12-04 Thread Imre Deak
ff-by: Imre Deak --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 24 ++- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c index 895c78806f0c5..7a0e757b712c7 100644 --- a/dr

[PATCH v2 4/7] drm/dp_mst: Fix down request message timeout handling

2024-12-03 Thread Imre Deak
ter verify_rx_request_type() fails. Cc: Lyude Paul Signed-off-by: Imre Deak --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topolog

[PATCH 5/7] drm/dp_mst: Ensure mst_primary pointer is valid in drm_dp_mst_handle_up_req()

2024-12-03 Thread Imre Deak
/use-after-free of mst_primary in drm_dp_mst_handle_up_req(). Avoid the above by holding a reference for mst_primary in drm_dp_mst_handle_up_req() while it's used. Cc: Lyude Paul Signed-off-by: Imre Deak --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 23 ++- 1 file ch

[PATCH 3/7] drm/dp_mst: Simplify error path in drm_dp_mst_handle_down_rep()

2024-12-03 Thread Imre Deak
Simplify the error return path in drm_dp_mst_handle_down_rep(), preparing for the next patch. While at it use reset_msg_rx_state() instead of open-coding it. Cc: Lyude Paul Signed-off-by: Imre Deak --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 7 +-- 1 file changed, 1 insertion

[PATCH 6/7] drm/dp_mst: Reset message rx state after OOM in drm_dp_mst_handle_up_req()

2024-12-03 Thread Imre Deak
After an out-of-memory error the reception state should be reset, so that the next attempt receiving a message doesn't fail (due to getting a start-of-message packet, while the reception state has already the start-of-message flag set). Cc: Lyude Paul Signed-off-by: Imre Deak --- driver

[PATCH 0/7] drm/dp_mst: Fix a few side-band message handling issues

2024-12-03 Thread Imre Deak
This patchset fixes a few issues related to MST side-band message handling reported by IGT CI (patch 1), by a user (patch 2) and ones I noticed during debugging (patch 4-6). Cc: Lyude Paul Imre Deak (7): drm/dp_mst: Fix resetting msg rx state after topology removal drm/dp_mst: Verify

[PATCH 4/7] drm/dp_mst: Fix down request message timeout handling

2024-12-03 Thread Imre Deak
freed txmsg, hence leading to a use-after-free in drm_dp_mst_handle_down_rep(). Prevent the above by holding the drm_dp_mst_topology_mgr::qlock in drm_dp_mst_handle_down_rep() for the whole duration txmsg is looked up from the request list and dereferenced. Cc: Lyude Paul Signed-off-by: Imre Deak

[PATCH 7/7] drm/dp_mst: Use reset_msg_rx_state() instead of open coding it

2024-12-03 Thread Imre Deak
Use reset_msg_rx_state() in drm_dp_mst_handle_up_req() instead of open-coding it. Cc: Lyude Paul Signed-off-by: Imre Deak --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b

[PATCH 2/7] drm/dp_mst: Verify request type in the corresponding down message reply

2024-12-03 Thread Imre Deak
804 Signed-off-by: Imre Deak --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c index 1475aa95ab6b2..bcf3a33123be1 100644 --

[PATCH 1/7] drm/dp_mst: Fix resetting msg rx state after topology removal

2024-12-03 Thread Imre Deak
nect") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13056 Signed-off-by: Imre Deak --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 21 +-- include/drm/display/drm_dp_mst_helper.h | 7 +++ 2 files changed, 26 insertions(+), 2 deletions(-) dif

Re: [PATCH v2 1/4] drm/dp: Add a way to init/add a connector in separate steps

2024-12-02 Thread Imre Deak
On Mon, Dec 02, 2024 at 04:07:56PM +0100, Maxime Ripard wrote: > On Mon, Dec 02, 2024 at 03:24:43PM +0200, Imre Deak wrote: > > On Mon, Dec 02, 2024 at 02:07:36PM +0200, Jani Nikula wrote: > > > On Mon, 02 Dec 2024, Maxime Ripard wrote: > > > > It's not about wh

Re: [PATCH v2 1/4] drm/dp: Add a way to init/add a connector in separate steps

2024-12-02 Thread Imre Deak
On Mon, Dec 02, 2024 at 05:35:34PM +0100, Simona Vetter wrote: > On Tue, Nov 26, 2024 at 06:18:56PM +0200, Imre Deak wrote: > > Atm when the connector is added to the drm_mode_config::connector_list, > > the connector may not be fully initialized yet. This is not a problem >

Re: [PATCH v2 1/4] drm/dp: Add a way to init/add a connector in separate steps

2024-12-02 Thread Imre Deak
On Mon, Dec 02, 2024 at 02:07:36PM +0200, Jani Nikula wrote: > On Mon, 02 Dec 2024, Maxime Ripard wrote: > > It's not about whether we have a problem or not: you introduce new > > framework functions, you need to have kunit tests to check their > > behaviour. > > I don't fundamentally disagree wi

Re: [PATCH] drm/dp_mst: Fix drm RAD print

2024-11-29 Thread Imre Deak
the port > number of one nibble. > > [How] > Adjust the code by: > - RAD array items are valuable only for LCT >= 1. > - Use 0xF as the mask to replace BIT_MASK(4) > > Fixes: 2f015ec6eab6 ("drm/dp_mst: Add sideband down request tracing + > selftests")

Re: [PATCH v2 1/4] drm/dp: Add a way to init/add a connector in separate steps

2024-11-29 Thread Imre Deak
On Fri, Nov 29, 2024 at 03:46:28PM +0100, Maxime Ripard wrote: > On Fri, Nov 29, 2024 at 04:26:01PM +0200, Imre Deak wrote: > > Adding more people from DRM core domain. Any comment, objection to this > > change? > > > > On Tue, Nov 26, 2024 at 06:18:56PM +0200, Imre Dea

Re: [PATCH v2 1/4] drm/dp: Add a way to init/add a connector in separate steps

2024-11-29 Thread Imre Deak
Adding more people from DRM core domain. Any comment, objection to this change? On Tue, Nov 26, 2024 at 06:18:56PM +0200, Imre Deak wrote: > Atm when the connector is added to the drm_mode_config::connector_list, > the connector may not be fully initialized yet. This is not a problem >

[PATCH v2 1/4] drm/dp: Add a way to init/add a connector in separate steps

2024-11-26 Thread Imre Deak
7;t have a dependency. v2: (Jani) - Let initing DDC as well via drm_connector_init_core(). - Rename __drm_connector_init to drm_connector_init_core_and_add(). Cc: Jani Nikula Reviewed-by: Rodrigo Vivi (v1) Signed-off-by: Imre Deak --- drivers/gpu/drm/drm_connector.c | 111 ++-

[PATCH v2 2/4] drm/i915/dp_mst: Expose a connector to kernel users after it's properly initialized

2024-11-26 Thread Imre Deak
After a connector is added to the drm_mode_config::connector_list, it's visible to any in-kernel users looking up connectors via the above list. Make sure that the connector is properly initialized before such look-ups. Reviewed-by: Rodrigo Vivi Signed-off-by: Imre Deak --- drivers/gp

[PATCH v2 4/4] drm/i915/dp_mst: Use intel_connector vs. drm_connector pointer in intel_dp_mst.c

2024-11-26 Thread Imre Deak
nnector, calling the drm_connector pointer _connector. Suggested-by: Jani Nikula Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 184 ++-- 1 file changed, 90 insertions(+), 94 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/

[PATCH v2 3/4] drm/i915/dp_mst: Fix error handling while adding a connector

2024-11-26 Thread Imre Deak
After an error during adding an MST connector the MST port and the intel_connector object could be leaked, fix this up. Reviewed-by: Rodrigo Vivi Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 17 + 1 file changed, 9 insertions(+), 8 deletions

[PATCH v2 0/4] drm/dp: Expose only a properly inited connector

2024-11-26 Thread Imre Deak
5-1-imre.d...@intel.com Imre Deak (4): drm/dp: Add a way to init/add a connector in separate steps drm/i915/dp_mst: Expose a connector to kernel users after it's properly initialized drm/i915/dp_mst: Fix error handling while adding a connector drm/i915/dp_mst: Use intel_connector vs

Re: ✗ i915.CI.BAT: failure for drm/dp_mst: Fix MST sideband message body length check

2024-11-26 Thread Imre Deak
On Mon, Nov 25, 2024 at 10:04:46PM +, Patchwork wrote: > == Series Details == > > Series: drm/dp_mst: Fix MST sideband message body length check > URL : https://patchwork.freedesktop.org/series/141772/ > State : failure Thanks for the review, patch is pushed to drm-misc-fixes. The failure

[PATCH] drm/dp_mst: Fix MST sideband message body length check

2024-11-25 Thread Imre Deak
d_irq_handle_event+0xc8/0x1580 [drm_display_helper] Cc: Cc: Lyude Paul Signed-off-by: Imre Deak --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c index ac901

Re: [PATCH 1/3] drm/dp: extract drm_dp_dpcd_poll_act_handled()

2024-11-22 Thread Imre Deak
On Fri, Nov 22, 2024 at 02:22:44PM +0200, Jani Nikula wrote: > On Wed, 20 Nov 2024, Imre Deak wrote: > > On Mon, Nov 18, 2024 at 05:14:52PM +0200, Jani Nikula wrote: > >> SST with 128b/132b channel coding needs this too. Extract to a separate > >> helper, independ

Re: [PATCH 1/3] drm/dp: extract drm_dp_dpcd_poll_act_handled()

2024-11-20 Thread Imre Deak
On Wed, Nov 20, 2024 at 04:59:43PM +0200, Imre Deak wrote: > On Mon, Nov 18, 2024 at 05:14:52PM +0200, Jani Nikula wrote: > > SST with 128b/132b channel coding needs this too. Extract to a separate > > helper, independent of MST. > > > > Pass timeout in as a paramete

Re: [PATCH 3/3] drm/dp: extract drm_dp_dpcd_clear_payload()

2024-11-20 Thread Imre Deak
On Mon, Nov 18, 2024 at 05:14:54PM +0200, Jani Nikula wrote: > SST with 128b/132b channel coding needs this too. Extract to a separate > helper, independent of MST. > > Signed-off-by: Jani Nikula Reviewed-by: Imre Deak > --- > drivers/gpu/drm/display/drm_dp_h

Re: [PATCH 2/3] drm/dp: extract drm_dp_dpcd_write_payload()

2024-11-20 Thread Imre Deak
; + * drm_dp_dpcd_write_payload() - Write payload Stg like "Write Virtual Channel Payload information to payload table" instead? Regardless of the above or the earlier mtp namespacing comment, patch looks ok: Reviewed-by: Imre Deak > + * @aux: DisplayPort AUX channel >

Re: [PATCH 1/3] drm/dp: extract drm_dp_dpcd_poll_act_handled()

2024-11-20 Thread Imre Deak
* for the ACT handled bit for up to @timeout_ms milliseconds, defaulting to > + * 3000 ms if 0. > + * > + * Returns: > + * 0 if the ACT was handled in time, negative error code on failure. > + */ > +int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms) I wonder if i

Re: [PATCH 3/4] drm/i915/dp_mst: Expose a connector to kernel users after it's properly initialized

2024-11-18 Thread Imre Deak
On Mon, Nov 18, 2024 at 02:12:14PM +0200, Jani Nikula wrote: > On Fri, 15 Nov 2024, Imre Deak wrote: > > After a connector is added to the drm_mode_config::connector_list, it's > > visible to any in-kernel users looking up connectors via the above list. > > Make

Re: [PATCH 2/4] drm/dp: Add a way to init/add a connector in separate steps

2024-11-18 Thread Imre Deak
On Mon, Nov 18, 2024 at 02:09:29PM +0200, Jani Nikula wrote: > On Fri, 15 Nov 2024, Imre Deak wrote: > > Atm when the connector is added to the drm_mode_config::connector_list, > > the connector may not be fully initialized yet. This is not a problem > > for user spac

Re: [PATCH 1/4] drm/i915/dp_mst: Fix connector initialization in intel_dp_add_mst_connector()

2024-11-18 Thread Imre Deak
On Mon, Nov 18, 2024 at 11:10:18AM +0200, Jani Nikula wrote: > On Fri, 15 Nov 2024, Imre Deak wrote: > > On Fri, Nov 15, 2024 at 03:20:58PM -0500, Rodrigo Vivi wrote: > >> On Fri, Nov 15, 2024 at 06:41:56PM +0200, Imre Deak wrote: > >> > The connector initialization

Re: [PATCH 3/4] drm/i915/dp_mst: Expose a connector to kernel users after it's properly initialized

2024-11-18 Thread Imre Deak
On Mon, Nov 18, 2024 at 02:23:48PM +0200, Jani Nikula wrote: > On Mon, 18 Nov 2024, Imre Deak wrote: > > On Mon, Nov 18, 2024 at 02:12:14PM +0200, Jani Nikula wrote: > >> On Fri, 15 Nov 2024, Imre Deak wrote: > >> > After a connector is added to the drm_mod

Re: [PATCH 1/4] drm/i915/dp_mst: Fix connector initialization in intel_dp_add_mst_connector()

2024-11-15 Thread Imre Deak
On Fri, Nov 15, 2024 at 03:20:58PM -0500, Rodrigo Vivi wrote: > On Fri, Nov 15, 2024 at 06:41:56PM +0200, Imre Deak wrote: > > The connector initialization in intel_dp_add_mst_connector() depends on > > the device pointer in connector to be valid, at least by connector > >

  1   2   3   4   5   6   7   8   >