public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Dave Airlie <airlied@redhat•com>,
	Daniel Vetter <daniel.vetter@ffwll•ch>,
	Jani Nikula <jani.nikula@linux•intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux•intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel•com>
Cc: Imre Deak <imre.deak@intel•com>,
	DRI <dri-devel@lists•freedesktop.org>,
	Intel Graphics <intel-gfx@lists•freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: linux-next: manual merge of the drm tree with the drm-intel-fixes tree
Date: Thu, 29 Aug 2024 10:49:43 +1000	[thread overview]
Message-ID: <20240829104943.5f4b2ab3@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 4225 bytes --]

Hi all,

Today's linux-next merge of the drm tree got conflicts in:

  drivers/gpu/drm/i915/display/intel_dp_mst.c
  drivers/gpu/drm/i915/display/intel_dp_mst.h

between commit:

  a2ccc33b88e2 ("drm/i915/dp_mst: Fix MST state after a sink reset")

from the drm-intel-fixes tree and commit:

  e44bc451aa4b ("drm/i915/dp_mst: Ensure link parameters are up-to-date for a disabled link")

from the drm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/i915/display/intel_dp_mst.c
index 17978a1f9ab0,45d2230d1801..000000000000
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@@ -1999,42 -2033,32 +2033,72 @@@ bool intel_dp_mst_crtc_needs_modeset(st
  	return false;
  }
  
 +/*
 + * intel_dp_mst_verify_dpcd_state - verify the MST SW enabled state wrt. the DPCD
 + * @intel_dp: DP port object
 + *
 + * Verify if @intel_dp's MST enabled SW state matches the corresponding DPCD
 + * state. A long HPD pulse - not long enough to be detected as a disconnected
 + * state - could've reset the DPCD state, which requires tearing
 + * down/recreating the MST topology.
 + *
 + * Returns %true if the SW MST enabled and DPCD states match, %false
 + * otherwise.
 + */
 +bool intel_dp_mst_verify_dpcd_state(struct intel_dp *intel_dp)
 +{
 +	struct intel_display *display = to_intel_display(intel_dp);
 +	struct intel_connector *connector = intel_dp->attached_connector;
 +	struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
 +	struct intel_encoder *encoder = &dig_port->base;
 +	int ret;
 +	u8 val;
 +
 +	if (!intel_dp->is_mst)
 +		return true;
 +
 +	ret = drm_dp_dpcd_readb(intel_dp->mst_mgr.aux, DP_MSTM_CTRL, &val);
 +
 +	/* Adjust the expected register value for SST + SideBand. */
 +	if (ret < 0 || val != (DP_MST_EN | DP_UP_REQ_EN | DP_UPSTREAM_IS_SRC)) {
 +		drm_dbg_kms(display->drm,
 +			    "[CONNECTOR:%d:%s][ENCODER:%d:%s] MST mode got reset, removing topology (ret=%d, ctrl=0x%02x)\n",
 +			    connector->base.base.id, connector->base.name,
 +			    encoder->base.base.id, encoder->base.name,
 +			    ret, val);
 +
 +		return false;
 +	}
 +
 +	return true;
 +}
++
+ /**
+  * intel_dp_mst_prepare_probe - Prepare an MST link for topology probing
+  * @intel_dp: DP port object
+  *
+  * Prepare an MST link for topology probing, programming the target
+  * link parameters to DPCD. This step is a requirement of the enumaration
+  * of path resources during probing.
+  */
+ void intel_dp_mst_prepare_probe(struct intel_dp *intel_dp)
+ {
+ 	int link_rate = intel_dp_max_link_rate(intel_dp);
+ 	int lane_count = intel_dp_max_lane_count(intel_dp);
+ 	u8 rate_select;
+ 	u8 link_bw;
+ 
+ 	if (intel_dp->link_trained)
+ 		return;
+ 
+ 	if (intel_mst_probed_link_params_valid(intel_dp, link_rate, lane_count))
+ 		return;
+ 
+ 	intel_dp_compute_rate(intel_dp, link_rate, &link_bw, &rate_select);
+ 
+ 	intel_dp_link_training_set_mode(intel_dp, link_rate, false);
+ 	intel_dp_link_training_set_bw(intel_dp, link_bw, rate_select, lane_count,
+ 				      drm_dp_enhanced_frame_cap(intel_dp->dpcd));
+ 
+ 	intel_mst_set_probed_link_params(intel_dp, link_rate, lane_count);
+ }
diff --cc drivers/gpu/drm/i915/display/intel_dp_mst.h
index 9e4c7679f1c3,fba76454fa67..000000000000
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.h
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.h
@@@ -27,6 -27,6 +27,7 @@@ int intel_dp_mst_atomic_check_link(stru
  				   struct intel_link_bw_limits *limits);
  bool intel_dp_mst_crtc_needs_modeset(struct intel_atomic_state *state,
  				     struct intel_crtc *crtc);
 +bool intel_dp_mst_verify_dpcd_state(struct intel_dp *intel_dp);
+ void intel_dp_mst_prepare_probe(struct intel_dp *intel_dp);
  
  #endif /* __INTEL_DP_MST_H__ */

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2024-08-29  0:49 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29  0:49 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-07-16  4:18 linux-next: manual merge of the drm tree with the drm-intel-fixes tree Stephen Rothwell
2024-06-17 18:33 Mark Brown
2024-03-07  2:10 Stephen Rothwell
2024-03-07  8:27 ` Joonas Lahtinen
2023-04-17 14:39 broonie
2022-05-17  1:26 Stephen Rothwell
2022-02-25 16:14 broonie
2022-02-22 17:03 broonie
2020-05-08  3:50 Stephen Rothwell
2020-05-07  2:43 Stephen Rothwell
2020-01-22  0:37 Stephen Rothwell
2020-01-08  1:15 Stephen Rothwell
2020-01-08  1:10 Stephen Rothwell
2020-01-08  1:04 Stephen Rothwell
2020-01-08  2:28 ` Stephen Rothwell
2019-10-31  0:33 Stephen Rothwell
2019-11-08  0:42 ` Stephen Rothwell
2018-01-05  1:00 Stephen Rothwell
2017-07-21  1:26 Stephen Rothwell
2017-06-14  0:56 Stephen Rothwell
2017-06-14  0:50 Stephen Rothwell
2017-06-09  2:26 Stephen Rothwell
2017-06-08  2:53 Stephen Rothwell
2017-03-30  1:14 Stephen Rothwell
2017-03-30  1:08 Stephen Rothwell
2017-03-22  0:00 Stephen Rothwell
2017-03-27 17:14 ` Paul McKenney
2017-03-21 23:57 Stephen Rothwell
2017-03-21  0:28 Stephen Rothwell
2016-06-14  2:10 Stephen Rothwell
2015-12-22 23:06 Stephen Rothwell
2015-12-09  2:35 Stephen Rothwell
2015-12-03 14:51 Mark Brown
2015-12-03 15:49 ` Jani Nikula
2015-12-03 14:47 Mark Brown
2015-12-03 14:52 ` Imre Deak
2015-08-17  3:23 Stephen Rothwell
2015-06-05  5:46 mpe@ellerman•id.au
2015-06-05  8:03 ` Jani Nikula
2015-06-09  1:58   ` Stephen Rothwell
2015-03-16  2:30 Stephen Rothwell
2015-03-16 13:43 ` Xi Ruoyao
2015-03-16 15:04   ` Jani Nikula
2014-12-03  2:27 Stephen Rothwell
2014-12-03  8:24 ` Jani Nikula
2014-12-03  8:28   ` Stephen Rothwell
2014-11-17  3:04 Stephen Rothwell
2014-07-23  2:38 Stephen Rothwell
2014-07-09  4:06 Stephen Rothwell
2014-05-22  5:44 Stephen Rothwell
2014-05-22  5:40 Stephen Rothwell
2014-05-07  3:24 Stephen Rothwell
2013-10-28  5:46 Stephen Rothwell
2013-10-28  6:12 ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240829104943.5f4b2ab3@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=airlied@redhat$(echo .)com \
    --cc=daniel.vetter@ffwll$(echo .)ch \
    --cc=dri-devel@lists$(echo .)freedesktop.org \
    --cc=imre.deak@intel$(echo .)com \
    --cc=intel-gfx@lists$(echo .)freedesktop.org \
    --cc=jani.nikula@linux$(echo .)intel.com \
    --cc=joonas.lahtinen@linux$(echo .)intel.com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=rodrigo.vivi@intel$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox