This is a note to let you know that I've just added the patch titled drm/i915: Try to preserve the current shared_dpll for fastset on type-c ports to the 6.7-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-i915-try-to-preserve-the-current-shared_dpll-for-fastset-on-type-c-ports.patch and it can be found in the queue-6.7 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From ba407525f8247ee4c270369f3371b9994c27bfda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@xxxxxxxxxxxxxxx> Date: Thu, 18 Jan 2024 16:24:36 +0200 Subject: drm/i915: Try to preserve the current shared_dpll for fastset on type-c ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> commit ba407525f8247ee4c270369f3371b9994c27bfda upstream. Currently icl_compute_tc_phy_dplls() assumes that the active PLL will be the TC PLL (as opposed to the TBT PLL). The actual PLL will be selected during the modeset enable sequence, but we need to put *something* into the crtc_state->shared_dpll already during compute_config(). The downside of assuming one PLL or the other is that we'll fail to fastset if the assumption doesn't match what was in use previously. So let's instead keep the same PLL that was in use previously (assuming there was one). This should allow fastset to work again when using TBT PLL, at least in the steady state. Now, assuming we want keep the same PLL may not be entirely correct either. But we should be covered by the type-c link reset handling which will force a full modeset by flagging connectors_changed=true which means the resulting modeset can't be converted into a fastset even if the full crtc state looks identical. Cc: Imre Deak <imre.deak@xxxxxxxxx> Cc: Suraj Kandpal <suraj.kandpal@xxxxxxxxx> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/20240118142436.25928-1-ville.syrjala@xxxxxxxxxxxxxxx Reviewed-by: Suraj Kandpal <suraj.kandpal@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c @@ -3288,6 +3288,8 @@ static int icl_compute_tc_phy_dplls(stru struct drm_i915_private *i915 = to_i915(state->base.dev); struct intel_crtc_state *crtc_state = intel_atomic_get_new_crtc_state(state, crtc); + const struct intel_crtc_state *old_crtc_state = + intel_atomic_get_old_crtc_state(state, crtc); struct icl_port_dpll *port_dpll = &crtc_state->icl_port_dplls[ICL_PORT_DPLL_DEFAULT]; struct skl_wrpll_params pll_params = {}; @@ -3306,7 +3308,11 @@ static int icl_compute_tc_phy_dplls(stru return ret; /* this is mainly for the fastset check */ - icl_set_active_port_dpll(crtc_state, ICL_PORT_DPLL_MG_PHY); + if (old_crtc_state->shared_dpll && + old_crtc_state->shared_dpll->info->id == DPLL_ID_ICL_TBTPLL) + icl_set_active_port_dpll(crtc_state, ICL_PORT_DPLL_DEFAULT); + else + icl_set_active_port_dpll(crtc_state, ICL_PORT_DPLL_MG_PHY); crtc_state->port_clock = icl_ddi_mg_pll_get_freq(i915, NULL, &port_dpll->hw_state); Patches currently in stable-queue which might be from ville.syrjala@xxxxxxxxxxxxxxx are queue-6.7/drm-i915-try-to-preserve-the-current-shared_dpll-for-fastset-on-type-c-ports.patch queue-6.7/drm-i915-replace-a-memset-with-zero-initialization.patch queue-6.7/drm-i915-add-missing-to-__assign_str-macros-in-trace.patch queue-6.7/drm-i915-use-named-initializers-for-dpll-info.patch queue-6.7/drm-i915-don-t-explode-when-the-dig-port-we-don-t-have-an-aux-ch.patch queue-6.7/drm-i915-stop-printing-pipe-name-as-hex.patch queue-6.7/drm-i915-include-the-pll-name-in-the-debug-messages.patch queue-6.7/drm-i915-suppress-old-pll-pipe_mask-checks-for-mg-tc-tbt-plls.patch