From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 4/5] drm/i915: Suppress old PLL pipe_mask checks for MG/TC/TBT PLLs
Date: Thu, 7 Dec 2023 17:24:44 +0200 [thread overview]
Message-ID: <ZXHjvHXJCA5oBeyo@intel.com> (raw)
In-Reply-To: <ZXHcxvx/TZc4pE9p@ideak-desk.fi.intel.com>
On Thu, Dec 07, 2023 at 04:55:02PM +0200, Imre Deak wrote:
> On Fri, Nov 24, 2023 at 10:27:34AM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > TC ports have both the MG/TC and TBT PLLs selected simultanously (so
> > that we can switch from MG/TC to TBT as a fallback). This doesn't play
> > well with the state checker that assumes that the old PLL shouldn't
> > have the pipe in its pipe_mask anymore. Suppress that check for these
> > PLLs to avoid spurious WARNs when you disconnect a TC port and a
> > non-disabling modeset happens before actually disabling the port.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Looks ok to me:
> Reviewed-by: Imre Deak <imre.deak@intel.com>
>
> I suppose the check would be still valid for MG PLLs, but the port
> PLL stuff makes doing that cumbersome.
You mean for legacy ports?
>
> > ---
> > drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 56 +++++++++++++------
> > drivers/gpu/drm/i915/display/intel_dpll_mgr.h | 4 ++
> > 2 files changed, 42 insertions(+), 18 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> > index d86b02de2923..5c6c4fc50b1d 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> > @@ -4023,11 +4023,16 @@ static const struct intel_shared_dpll_funcs mg_pll_funcs = {
> > static const struct dpll_info icl_plls[] = {
> > { .name = "DPLL 0", .funcs = &combo_pll_funcs, .id = DPLL_ID_ICL_DPLL0, },
> > { .name = "DPLL 1", .funcs = &combo_pll_funcs, .id = DPLL_ID_ICL_DPLL1, },
> > - { .name = "TBT PLL", .funcs = &tbt_pll_funcs, .id = DPLL_ID_ICL_TBTPLL, },
> > - { .name = "MG PLL 1", .funcs = &mg_pll_funcs, .id = DPLL_ID_ICL_MGPLL1, },
> > - { .name = "MG PLL 2", .funcs = &mg_pll_funcs, .id = DPLL_ID_ICL_MGPLL2, },
> > - { .name = "MG PLL 3", .funcs = &mg_pll_funcs, .id = DPLL_ID_ICL_MGPLL3, },
> > - { .name = "MG PLL 4", .funcs = &mg_pll_funcs, .id = DPLL_ID_ICL_MGPLL4, },
> > + { .name = "TBT PLL", .funcs = &tbt_pll_funcs, .id = DPLL_ID_ICL_TBTPLL,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "MG PLL 1", .funcs = &mg_pll_funcs, .id = DPLL_ID_ICL_MGPLL1,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "MG PLL 2", .funcs = &mg_pll_funcs, .id = DPLL_ID_ICL_MGPLL2,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "MG PLL 3", .funcs = &mg_pll_funcs, .id = DPLL_ID_ICL_MGPLL3,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "MG PLL 4", .funcs = &mg_pll_funcs, .id = DPLL_ID_ICL_MGPLL4,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > {}
> > };
> >
> > @@ -4068,13 +4073,20 @@ static const struct intel_shared_dpll_funcs dkl_pll_funcs = {
> > static const struct dpll_info tgl_plls[] = {
> > { .name = "DPLL 0", .funcs = &combo_pll_funcs, .id = DPLL_ID_ICL_DPLL0, },
> > { .name = "DPLL 1", .funcs = &combo_pll_funcs, .id = DPLL_ID_ICL_DPLL1, },
> > - { .name = "TBT PLL", .funcs = &tbt_pll_funcs, .id = DPLL_ID_ICL_TBTPLL, },
> > - { .name = "TC PLL 1", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL1, },
> > - { .name = "TC PLL 2", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL2, },
> > - { .name = "TC PLL 3", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL3, },
> > - { .name = "TC PLL 4", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL4, },
> > - { .name = "TC PLL 5", .funcs = &dkl_pll_funcs, .id = DPLL_ID_TGL_MGPLL5, },
> > - { .name = "TC PLL 6", .funcs = &dkl_pll_funcs, .id = DPLL_ID_TGL_MGPLL6, },
> > + { .name = "TBT PLL", .funcs = &tbt_pll_funcs, .id = DPLL_ID_ICL_TBTPLL,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "TC PLL 1", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL1,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "TC PLL 2", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL2,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "TC PLL 3", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL3,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "TC PLL 4", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL4,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "TC PLL 5", .funcs = &dkl_pll_funcs, .id = DPLL_ID_TGL_MGPLL5,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "TC PLL 6", .funcs = &dkl_pll_funcs, .id = DPLL_ID_TGL_MGPLL6,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > {}
> > };
> >
> > @@ -4141,11 +4153,16 @@ static const struct intel_dpll_mgr adls_pll_mgr = {
> > static const struct dpll_info adlp_plls[] = {
> > { .name = "DPLL 0", .funcs = &combo_pll_funcs, .id = DPLL_ID_ICL_DPLL0, },
> > { .name = "DPLL 1", .funcs = &combo_pll_funcs, .id = DPLL_ID_ICL_DPLL1, },
> > - { .name = "TBT PLL", .funcs = &tbt_pll_funcs, .id = DPLL_ID_ICL_TBTPLL, },
> > - { .name = "TC PLL 1", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL1, },
> > - { .name = "TC PLL 2", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL2, },
> > - { .name = "TC PLL 3", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL3, },
> > - { .name = "TC PLL 4", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL4, },
> > + { .name = "TBT PLL", .funcs = &tbt_pll_funcs, .id = DPLL_ID_ICL_TBTPLL,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "TC PLL 1", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL1,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "TC PLL 2", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL2,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "TC PLL 3", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL3,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > + { .name = "TC PLL 4", .funcs = &dkl_pll_funcs, .id = DPLL_ID_ICL_MGPLL4,
> > + .flags = INTEL_DPLL_HAS_ALT_PORT_DPLL, },
> > {}
> > };
> >
> > @@ -4535,7 +4552,10 @@ void intel_shared_dpll_state_verify(struct intel_atomic_state *state,
> > I915_STATE_WARN(i915, pll->active_mask & pipe_mask,
> > "%s: pll active mismatch (didn't expect pipe %c in active mask (0x%x))\n",
> > pll->info->name, pipe_name(crtc->pipe), pll->active_mask);
> > - I915_STATE_WARN(i915, pll->state.pipe_mask & pipe_mask,
> > +
> > + /* TC ports have both MG/TC and TBT PLL referenced simultaneously */
> > + I915_STATE_WARN(i915, !(pll->info->flags & INTEL_DPLL_HAS_ALT_PORT_DPLL) &&
> > + pll->state.pipe_mask & pipe_mask,
> > "%s: pll enabled crtcs mismatch (found pipe %c in enabled mask (0x%x))\n",
> > pll->info->name, pipe_name(crtc->pipe), pll->state.pipe_mask);
> > }
> > diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.h b/drivers/gpu/drm/i915/display/intel_dpll_mgr.h
> > index 2e7ea0d8d3ff..594658087b4a 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.h
> > +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.h
> > @@ -277,12 +277,16 @@ struct dpll_info {
> > enum intel_display_power_domain power_domain;
> >
> > #define INTEL_DPLL_ALWAYS_ON (1 << 0)
> > +#define INTEL_DPLL_HAS_ALT_PORT_DPLL (1 << 1)
> > /**
> > * @flags:
> > *
> > * INTEL_DPLL_ALWAYS_ON
> > * Inform the state checker that the DPLL is kept enabled even if
> > * not in use by any CRTC.
> > + * INTEL_DPLL_HAS_ALT_PORT_DPLL
> > + * Inform the state checker that the CRTC will have two port DPLLs
> > + * referenced simultanously (for TC->TBT fallback).
> > */
> > u32 flags;
> > };
> > --
> > 2.41.0
> >
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2023-12-07 15:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 8:27 [Intel-gfx] [PATCH 1/5] drm/i915/psr: Include some basic PSR information in the state dump Ville Syrjala
2023-11-24 8:27 ` [Intel-gfx] [PATCH 2/5] drm/i915: Replace a memset() with zero initialization Ville Syrjala
2023-11-29 14:50 ` Kahola, Mika
2023-11-24 8:27 ` [Intel-gfx] [PATCH 3/5] drm/i915: Include the PLL name in the debug messages Ville Syrjala
2023-11-24 8:27 ` [Intel-gfx] [PATCH 4/5] drm/i915: Suppress old PLL pipe_mask checks for MG/TC/TBT PLLs Ville Syrjala
2023-12-07 14:05 ` Ville Syrjälä
2023-12-07 14:55 ` [Intel-gfx] " Imre Deak
2023-12-07 15:24 ` Ville Syrjälä [this message]
2023-12-07 15:47 ` Imre Deak
2023-12-07 16:06 ` Ville Syrjälä
2023-12-07 16:15 ` Imre Deak
2023-11-24 8:27 ` [Intel-gfx] [PATCH 5/5] drm/i915: Convert PLL flags to booleans Ville Syrjala
2023-11-24 8:35 ` [Intel-gfx] [PATCH 1/5] drm/i915/psr: Include some basic PSR information in the state dump Hogander, Jouni
2023-11-24 16:28 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/5] " Patchwork
2023-11-24 16:46 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-11-28 22:23 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/5] drm/i915/psr: Include some basic PSR information in the state dump (rev2) Patchwork
2023-11-28 22:37 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-11-29 4:34 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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=ZXHjvHXJCA5oBeyo@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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