Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Kandpal, Suraj" <suraj.kandpal@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Syrjala, Ville" <ville.syrjala@intel.com>,
	"Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>,
	"Shankar, Uma" <uma.shankar@intel.com>,
	"Kahola, Mika" <mika.kahola@intel.com>
Subject: Re: [PATCH 05/11] drm/i915/dpll: Move away from using shared dpll
Date: Fri, 28 Feb 2025 16:26:57 +0200	[thread overview]
Message-ID: <Z8HHsZbQWxr04C9k@intel.com> (raw)
In-Reply-To: <SN7PR11MB67505D632A7CCE485E8FB81FE3CD2@SN7PR11MB6750.namprd11.prod.outlook.com>

On Thu, Feb 27, 2025 at 10:18:31AM +0000, Kandpal, Suraj wrote:
> 
> 
> > -----Original Message-----
> > From: Jani Nikula <jani.nikula@linux.intel.com>
> > Sent: Tuesday, February 25, 2025 9:00 PM
> > To: Kandpal, Suraj <suraj.kandpal@intel.com>; intel-xe@lists.freedesktop.org;
> > intel-gfx@lists.freedesktop.org; Syrjala, Ville <ville.syrjala@intel.com>
> > Cc: Nautiyal, Ankit K <ankit.k.nautiyal@intel.com>; Shankar, Uma
> > <uma.shankar@intel.com>; Kahola, Mika <mika.kahola@intel.com>
> > Subject: RE: [PATCH 05/11] drm/i915/dpll: Move away from using shared dpll
> > 
> > On Tue, 25 Feb 2025, "Kandpal, Suraj" <suraj.kandpal@intel.com> wrote:
> > >> -----Original Message-----
> > >> From: Kandpal, Suraj
> > >> Sent: Tuesday, February 25, 2025 2:25 PM
> > >> To: Jani Nikula <jani.nikula@linux.intel.com>;
> > >> intel-xe@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
> > >> Cc: Nautiyal, Ankit K <ankit.k.nautiyal@intel.com>; Shankar, Uma
> > >> <uma.shankar@intel.com>; Kahola, Mika <mika.kahola@intel.com>
> > >> Subject: RE: [PATCH 05/11] drm/i915/dpll: Move away from using shared
> > >> dpll
> > >>
> > >>
> > >>
> > >> > -----Original Message-----
> > >> > From: Jani Nikula <jani.nikula@linux.intel.com>
> > >> > Sent: Tuesday, February 25, 2025 2:17 PM
> > >> > To: Kandpal, Suraj <suraj.kandpal@intel.com>;
> > >> > intel-xe@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
> > >> > Cc: Nautiyal, Ankit K <ankit.k.nautiyal@intel.com>; Shankar, Uma
> > >> > <uma.shankar@intel.com>; Kahola, Mika <mika.kahola@intel.com>;
> > >> > Kandpal, Suraj <suraj.kandpal@intel.com>
> > >> > Subject: Re: [PATCH 05/11] drm/i915/dpll: Move away from using
> > >> > shared dpll
> > >> >
> > >> > On Tue, 25 Feb 2025, Suraj Kandpal <suraj.kandpal@intel.com> wrote:
> > >> > > Rename functions to move away from using shared dpll in the dpll
> > >> > > framework as much as possible since dpll may not always be shared.
> > >> > >
> > >> > > Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> > >> >
> > >> > ...
> > >> >
> > >> > > diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.h
> > >> > > b/drivers/gpu/drm/i915/display/intel_dpll_mgr.h
> > >> > > index 6edd103eda55..ef66aca5da1d 100644
> > >> > > --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.h
> > >> > > +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.h
> > >> > > @@ -387,24 +387,24 @@ struct intel_global_dpll {  #define
> > >> > > SKL_DPLL2
> > >> > > 2 #define SKL_DPLL3 3
> > >> > >
> > >> > > -/* shared dpll functions */
> > >> > > +/* global dpll functions */
> > >> > >  struct intel_global_dpll *
> > >> > > -intel_get_shared_dpll_by_id(struct intel_display *display,
> > >> > > +intel_get_global_dpll_by_id(struct intel_display *display,
> > >> > >  			    enum intel_dpll_id id);
> > >> > > -void assert_shared_dpll(struct intel_display *display,
> > >> > > +void assert_global_dpll(struct intel_display *display,
> > >> > >  			struct intel_global_dpll *pll,
> > >> > >  			bool state);
> > >> > > -#define assert_shared_dpll_enabled(d, p) assert_shared_dpll(d,
> > >> > > p,
> > >> > > true) -#define assert_shared_dpll_disabled(d, p)
> > >> > > assert_shared_dpll(d, p, false) -int
> > >> > > intel_compute_shared_dplls(struct intel_atomic_state *state,
> > >> > > +#define assert_global_dpll_enabled(d, p) assert_global_dpll(d,
> > >> > > +p,
> > >> > > +true) #define assert_global_dpll_disabled(d, p)
> > >> > > +assert_global_dpll(d, p, false) int
> > >> > > +intel_compute_global_dplls(struct intel_atomic_state *state,
> > >> > >  			       struct intel_crtc *crtc,
> > >> > >  			       struct intel_encoder *encoder); -int
> > >> > > intel_reserve_shared_dplls(struct intel_atomic_state *state,
> > >> > > +int intel_reserve_global_dplls(struct intel_atomic_state *state,
> > >> > >  			       struct intel_crtc *crtc,
> > >> > >  			       struct intel_encoder *encoder); -void
> > >> > > intel_release_shared_dplls(struct intel_atomic_state *state,
> > >> > > +void intel_release_global_dplls(struct intel_atomic_state
> > >> > > +*state,
> > >> > >  				struct intel_crtc *crtc);
> > >> > > -void intel_unreference_shared_dpll_crtc(const struct intel_crtc
> > >> > > *crtc,
> > >> > > +void intel_unreference_global_dpll_crtc(const struct intel_crtc
> > >> > > +*crtc,
> > >> > >  					const struct intel_global_dpll *pll,
> > >> > >  					struct intel_dpll_state
> > >> > *shared_dpll_state);  void
> > >> > > icl_set_active_port_dpll(struct intel_crtc_state *crtc_state, @@
> > >> > > -418,10 +418,10 @@ int intel_dpll_get_freq(struct intel_display
> > >> > > *display,  bool intel_dpll_get_hw_state(struct intel_display *display,
> > >> > >  			     struct intel_global_dpll *pll,
> > >> > >  			     struct intel_dpll_hw_state *dpll_hw_state); -void
> > >> > > intel_enable_shared_dpll(const struct intel_crtc_state
> > >> > > *crtc_state); -void intel_disable_shared_dpll(const struct
> > >> > > intel_crtc_state *crtc_state); -void
> > >> > > intel_shared_dpll_swap_state(struct
> > >> > > intel_atomic_state *state); -void intel_shared_dpll_init(struct
> > >> > > intel_display *display);
> > >> > > +void intel_enable_global_dpll(const struct intel_crtc_state
> > >> > > +*crtc_state); void intel_disable_global_dpll(const struct
> > >> > > +intel_crtc_state *crtc_state); void intel_dpll_swap_state(struct
> > >> > > +intel_atomic_state *state); void intel_global_dpll_init(struct
> > >> > > +intel_display *display);
> > >> > >  void intel_dpll_update_ref_clks(struct intel_display *display);
> > >> > > void intel_dpll_readout_hw_state(struct intel_display *display);
> > >> > > void intel_dpll_sanitize_state(struct intel_display *display); @@
> > >> > > -437,6
> > >> > > +437,6 @@ bool intel_dpll_is_combophy(enum intel_dpll_id id);
> > >> > >
> > >> > >  void intel_dpll_state_verify(struct intel_atomic_state *state,
> > >> > >  			     struct intel_crtc *crtc); -void
> > >> > > intel_shared_dpll_verify_disabled(struct intel_atomic_state
> > >> > > *state);
> > >> > > +void intel_global_dpll_verify_disabled(struct intel_atomic_state
> > >> > > +*state);
> > >> > >
> > >> > >  #endif /* _INTEL_DPLL_MGR_H_ */
> > >> >
> > >> > If you're renaming almost everything anyway, I'd appreciate moving
> > >> > towards naming functions according to the file name, i.e. functions
> > >> > in intel_foo.[ch] would be named intel_foo_*().
> > >> >
> > >> > The dpll mgr is notoriously bad in this regard. I'm also open to
> > >> > renaming the entire file, intel_dpll_mgr.[ch] isn't all that great.
> > >> >
> > >> > I'm not sure if the term "global" (instead of "shared") was very
> > >> > well justified in patch 3. Maybe all of these should be thought out
> > >> > together for the
> > >> naming.
> > >> >
> > >>
> > >> I agree with the renaming I would have very much have to keep the
> > >> naming simple something like Intel_dpll_func but that exits !
> > >> intel_dpll_mgr_funcs but intel_dpll_mgr already has some hooks defined
> > inside It.
> > >> I chose global since that way we will be able to represent both PLL
> > >> using shared PHY and PLL with individual PHY.
> > >> Also renaming intel_dpll_mgr.[ch] we have a intel_dpll.[ch] making it
> > >> a problem What if we renamed the file to intel_global_dpll.[ch]
> > >
> > > Jani what do you think of this ?
> > 
> > I think Ville probably has opinions on this. Cc'd.
> 
> Hi Ville,
> Any thoughts ?

IMO it should just be intel_dpll_*. We want all PLLs to provide
the same uniform interface for enable/disble/readout/state_dump/etc.
Whether the PLL is shared/global or not isn't interesting outside
the actual modeset sequence and PLL selection logic.

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2025-02-28 14:27 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25  8:09 [PATCH 00/11] DPLL framework redesign Suraj Kandpal
2025-02-25  8:09 ` [PATCH 01/11] drm/i915/dpll: Rename intel_shared_dpll_state Suraj Kandpal
2025-02-25  8:09 ` [PATCH 02/11] drm/i915/dpll: Rename macro for_each_shared_dpll Suraj Kandpal
2025-02-25  8:09 ` [PATCH 03/11] drm/i915/dpll: Rename intel_shared_dpll_funcs Suraj Kandpal
2025-02-25  8:09 ` [PATCH 04/11] drm/i915/dpll: Rename intel_shared_dpll Suraj Kandpal
2025-02-25  8:09 ` [PATCH 05/11] drm/i915/dpll: Move away from using shared dpll Suraj Kandpal
2025-02-25  8:46   ` Jani Nikula
2025-02-25  8:54     ` Kandpal, Suraj
2025-02-25  9:47       ` Kandpal, Suraj
2025-02-25 15:30         ` Jani Nikula
2025-02-27 10:18           ` Kandpal, Suraj
2025-02-28 14:26             ` Ville Syrjälä [this message]
2025-02-28 15:31               ` Kandpal, Suraj
2025-03-03 12:51                 ` Ville Syrjälä
2025-03-07 12:02                   ` Kahola, Mika
2025-03-07 13:06                     ` Ville Syrjälä
2025-03-07 13:53                       ` Kahola, Mika
2025-03-11  8:12                         ` Kandpal, Suraj
2025-02-25  8:09 ` [PATCH 06/11] drm/i915/dpll: Rename crtc_get_shared_dpll Suraj Kandpal
2025-02-25  8:09 ` [PATCH 07/11] drm/i915/dpll: Change argument for enable hook in intel_global_dpll_funcs Suraj Kandpal
2025-03-07 14:06   ` Ville Syrjälä
2025-03-11  8:15     ` Kandpal, Suraj
2025-03-11  9:50       ` Kahola, Mika
2025-02-25  8:09 ` [PATCH 08/11] drm/i915/drm: Rename disable hook in intel_dpll_global_func Suraj Kandpal
2025-02-25  8:09 ` [PATCH 09/11] drm/i915/dpll: Introduce new hook in intel_global_dpll_func Suraj Kandpal
2025-02-25  8:09 ` [PATCH 10/11] drm/i915/dpll: Add intel_encoder argument to get_hw_state hook Suraj Kandpal
2025-02-25  8:09 ` [PATCH 11/11] drm/i915/dpll: Change arguments for get_freq hook Suraj Kandpal
2025-02-25  8:43 ` ✓ CI.Patch_applied: success for DPLL framework redesign Patchwork
2025-02-25  8:43 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-25  8:45 ` ✓ CI.KUnit: success " Patchwork
2025-02-25  9:02 ` ✓ CI.Build: " Patchwork
2025-02-25  9:04 ` ✓ CI.Hooks: " Patchwork
2025-02-25  9:06 ` ✓ CI.checksparse: " Patchwork
2025-02-25  9:26 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-25 15:21 ` ✗ Xe.CI.Full: 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=Z8HHsZbQWxr04C9k@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=mika.kahola@intel.com \
    --cc=suraj.kandpal@intel.com \
    --cc=uma.shankar@intel.com \
    --cc=ville.syrjala@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