All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] drm/msm/dsi_phy: Replace parent names with clk_hw pointers
@ 2022-05-23 21:38 ` Marijn Suijten
  0 siblings, 0 replies; 41+ messages in thread
From: Marijn Suijten @ 2022-05-23 21:38 UTC (permalink / raw)
  To: phone-devel, Stephen Boyd, Dmitry Baryshkov
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Marijn Suijten,
	Michael Turquette, Rob Clark, Abhinav Kumar, Sean Paul,
	David Airlie, Daniel Vetter, Rajeev Nandan, Vladimir Lypak,
	Arnd Bergmann, Jonathan Marek, linux-clk, linux-kernel,
	linux-arm-msm, dri-devel, freedreno

As stated in [1] I promised to tackle and send this series.

parent_hw pointers are easier to manage and cheaper to use than
repeatedly formatting the parent name and subsequently leaving the clk
framework to perform lookups based on that name.

This series starts out by adding extra constructors for divider, mux and
fixed-factor clocks that have parent_hw(s) pointer argument(s) instead
of some DT index or name.  Followed by individual patches performing the
conversion, one DSI PHY at a time.

dsi_phy_28nm_8960 includes an extra fixup to replace "eternal"
devm_kzalloc allocations (for the lifetime of the device) with
stack-local char arrays, like all the other DSI PHY drivers.

I couldn't help but notice that clock names are wildly varying:

- Some use underscores in the _clk suffix where others have nothing;
- Some have an _ after the %d, others have not;
- Some use a _pll suffix after dsi%d or even _phy_pll suffix.

Are there any thoughts or feelings towards unifying these?
Theoretically no clock names are used anywhere in the kernel, and
everything is based on a phandle + index in DT (I have yet to validate
this).  Obviously no .name/.fw_name will be updated to not break DT.

Which, by the way, is there a particular reason for:

  #define DSI_BYTE_PLL_CLK		0
  #define DSI_PIXEL_PLL_CLK		1

To not be in the dt-bindings and used in the DT?

And with enough future improvements out of the way, let's round out this
patch-series by stating that it has been successfully tested on:

- Sony Nile Discovery (Xperia XA2 Ultra): 14nm;
- Sony Seine PDX201 (Xperia 10II): 14nm;
- Sony Loire Suzu (Xperia X): 28nm.

And no diff is observed in debugfs's clk_summary.

Unfortunately all other devices in my collection with a 7/10nm DSI PHY
have a DSC panel which we have yet to get working.

[1]: https://lore.kernel.org/linux-arm-msm/20220502214235.s5plebunh4ttjhge@SoMainline.org/

Marijn Suijten (9):
  clk: divider: Introduce devm_clk_hw_register_divider_parent_hw()
  clk: mux: Introduce devm_clk_hw_register_mux_parent_hws()
  clk: fixed-factor: Introduce *clk_hw_register_fixed_factor_parent_hw()
  drm/msm/dsi_phy_28nm: Replace parent names with clk_hw pointers
  drm/msm/dsi_phy_28nm_8960: Replace parent names with clk_hw pointers
  drm/msm/dsi_phy_28nm_8960: Use stack memory for temporary clock names
  drm/msm/dsi_phy_14nm: Replace parent names with clk_hw pointers
  drm/msm/dsi_phy_10nm: Replace parent names with clk_hw pointers
  drm/msm/dsi_phy_7nm: Replace parent names with clk_hw pointers

 drivers/clk/clk-fixed-factor.c                | 57 ++++++++++--
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c    | 92 ++++++++-----------
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c    | 36 ++++----
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c    | 52 +++++------
 .../gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c   | 26 ++----
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c     | 92 +++++++++----------
 include/linux/clk-provider.h                  | 34 +++++++
 7 files changed, 209 insertions(+), 180 deletions(-)

--
2.36.1

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2022-05-25  8:01 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23 21:38 [PATCH 0/9] drm/msm/dsi_phy: Replace parent names with clk_hw pointers Marijn Suijten
2022-05-23 21:38 ` Marijn Suijten
2022-05-23 21:38 ` [PATCH 1/9] clk: divider: Introduce devm_clk_hw_register_divider_parent_hw() Marijn Suijten
2022-05-23 21:38   ` Marijn Suijten
2022-05-23 21:38 ` [PATCH 2/9] clk: mux: Introduce devm_clk_hw_register_mux_parent_hws() Marijn Suijten
2022-05-23 21:38   ` Marijn Suijten
2022-05-23 21:38 ` [PATCH 3/9] clk: fixed-factor: Introduce *clk_hw_register_fixed_factor_parent_hw() Marijn Suijten
2022-05-23 21:38   ` Marijn Suijten
2022-05-23 21:38 ` [PATCH 4/9] drm/msm/dsi_phy_28nm: Replace parent names with clk_hw pointers Marijn Suijten
2022-05-23 21:38   ` Marijn Suijten
2022-05-23 22:34   ` Dmitry Baryshkov
2022-05-23 22:34     ` Dmitry Baryshkov
2022-05-23 21:38 ` [PATCH 5/9] drm/msm/dsi_phy_28nm_8960: " Marijn Suijten
2022-05-23 21:38   ` Marijn Suijten
2022-05-23 22:44   ` Dmitry Baryshkov
2022-05-23 22:44     ` Dmitry Baryshkov
2022-05-23 22:44     ` Dmitry Baryshkov
2022-05-23 22:44       ` Dmitry Baryshkov
2022-05-24 21:44       ` Marijn Suijten
2022-05-24 21:44         ` Marijn Suijten
2022-05-23 21:38 ` [PATCH 6/9] drm/msm/dsi_phy_28nm_8960: Use stack memory for temporary clock names Marijn Suijten
2022-05-23 21:38   ` Marijn Suijten
2022-05-23 22:45   ` Dmitry Baryshkov
2022-05-23 22:45     ` Dmitry Baryshkov
2022-05-23 21:38 ` [PATCH 7/9] drm/msm/dsi_phy_14nm: Replace parent names with clk_hw pointers Marijn Suijten
2022-05-23 21:38   ` Marijn Suijten
2022-05-23 22:50   ` Dmitry Baryshkov
2022-05-23 22:50     ` Dmitry Baryshkov
2022-05-23 21:38 ` [PATCH 8/9] drm/msm/dsi_phy_10nm: " Marijn Suijten
2022-05-23 21:38   ` Marijn Suijten
2022-05-23 22:51   ` Dmitry Baryshkov
2022-05-23 22:51     ` Dmitry Baryshkov
2022-05-23 21:38 ` [PATCH 9/9] drm/msm/dsi_phy_7nm: " Marijn Suijten
2022-05-23 21:38   ` Marijn Suijten
2022-05-23 22:52   ` Dmitry Baryshkov
2022-05-23 22:52     ` Dmitry Baryshkov
2022-05-23 23:43 ` [PATCH 0/9] drm/msm/dsi_phy: " Dmitry Baryshkov
2022-05-23 23:43   ` Dmitry Baryshkov
2022-05-24 22:03   ` Marijn Suijten
2022-05-24 22:03     ` Marijn Suijten
2022-05-25  8:01     ` Dmitry Baryshkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.