From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Kandpal, Suraj" <suraj.kandpal@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Try to preserve the current shared_dpll for fastset on type-c ports
Date: Tue, 23 Jan 2024 10:53:12 +0200 [thread overview]
Message-ID: <Za9-eGDz8a0Pb92f@intel.com> (raw)
In-Reply-To: <SN7PR11MB6750086D0923AAE3C0356894E3752@SN7PR11MB6750.namprd11.prod.outlook.com>
On Mon, Jan 22, 2024 at 08:50:46AM +0000, Kandpal, Suraj wrote:
> > Subject: [PATCH] drm/i915: Try to preserve the current shared_dpll for fastset
> > on type-c ports
> >
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > 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 typ-c link reset handling which will force a full
>
> Small typo *type-c
>
> > 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@intel.com>
> > Cc: Suraj Kandpal <suraj.kandpal@intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> LGTM.
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
I took that as Reviewed-by and pushed to drm-intel-next. Thanks.
>
> > ---
> > drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> > b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> > index ef57dad1a9cb..1008e18177c9 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> > @@ -3308,6 +3308,8 @@ static int icl_compute_tc_phy_dplls(struct
> > intel_atomic_state *state,
> > 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 = {}; @@ -3326,7 +3328,11 @@
> > static int icl_compute_tc_phy_dplls(struct intel_atomic_state *state,
> > 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);
> > --
> > 2.41.0
>
--
Ville Syrjälä
Intel
prev parent reply other threads:[~2024-01-23 8:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 14:24 [PATCH] drm/i915: Try to preserve the current shared_dpll for fastset on type-c ports Ville Syrjala
2024-01-18 21:30 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-01-19 9:33 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-01-22 8:50 ` [PATCH] " Kandpal, Suraj
2024-01-23 8:53 ` Ville Syrjälä [this message]
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=Za9-eGDz8a0Pb92f@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=suraj.kandpal@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).