* [PATCH v2 1/9] drm/imx/ipuv3/imx-tve: convert from round_rate() to determine_rate()
2025-08-11 10:56 [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate() Brian Masney
@ 2025-08-11 10:56 ` Brian Masney
2025-09-15 4:47 ` Peng Fan
2025-08-11 10:56 ` [PATCH v2 2/9] drm/mcde/mcde_clk_div: " Brian Masney
` (9 subsequent siblings)
10 siblings, 1 reply; 17+ messages in thread
From: Brian Masney @ 2025-08-11 10:56 UTC (permalink / raw)
To: Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Raphael Gallais-Pou, Philippe Cornu, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Stephen Boyd
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi, Brian Masney
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
drivers/gpu/drm/imx/ipuv3/imx-tve.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/imx/ipuv3/imx-tve.c b/drivers/gpu/drm/imx/ipuv3/imx-tve.c
index c5629e155d25aef5b43445bc18c6c90039c99974..63f23b821b0be66a8e8a379e1375ffd98552e72f 100644
--- a/drivers/gpu/drm/imx/ipuv3/imx-tve.c
+++ b/drivers/gpu/drm/imx/ipuv3/imx-tve.c
@@ -368,17 +368,20 @@ static unsigned long clk_tve_di_recalc_rate(struct clk_hw *hw,
return 0;
}
-static long clk_tve_di_round_rate(struct clk_hw *hw, unsigned long rate,
- unsigned long *prate)
+static int clk_tve_di_determine_rate(struct clk_hw *hw,
+ struct clk_rate_request *req)
{
unsigned long div;
- div = *prate / rate;
+ div = req->best_parent_rate / req->rate;
if (div >= 4)
- return *prate / 4;
+ req->rate = req->best_parent_rate / 4;
else if (div >= 2)
- return *prate / 2;
- return *prate;
+ req->rate = req->best_parent_rate / 2;
+ else
+ req->rate = req->best_parent_rate;
+
+ return 0;
}
static int clk_tve_di_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -409,7 +412,7 @@ static int clk_tve_di_set_rate(struct clk_hw *hw, unsigned long rate,
}
static const struct clk_ops clk_tve_di_ops = {
- .round_rate = clk_tve_di_round_rate,
+ .determine_rate = clk_tve_di_determine_rate,
.set_rate = clk_tve_di_set_rate,
.recalc_rate = clk_tve_di_recalc_rate,
};
--
2.50.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2 1/9] drm/imx/ipuv3/imx-tve: convert from round_rate() to determine_rate()
2025-08-11 10:56 ` [PATCH v2 1/9] drm/imx/ipuv3/imx-tve: convert from " Brian Masney
@ 2025-09-15 4:47 ` Peng Fan
0 siblings, 0 replies; 17+ messages in thread
From: Peng Fan @ 2025-09-15 4:47 UTC (permalink / raw)
To: Brian Masney
Cc: Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Raphael Gallais-Pou, Philippe Cornu, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Stephen Boyd, linux-clk, dri-devel, imx, linux-arm-kernel,
linux-kernel, linux-arm-msm, freedreno, linux-stm32, linux-sunxi
On Mon, Aug 11, 2025 at 06:56:05AM -0400, Brian Masney wrote:
>The round_rate() clk ops is deprecated, so migrate this driver from
>round_rate() to determine_rate() using the Coccinelle semantic patch
>on the cover letter of this series.
>
>Signed-off-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 2/9] drm/mcde/mcde_clk_div: convert from round_rate() to determine_rate()
2025-08-11 10:56 [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate() Brian Masney
2025-08-11 10:56 ` [PATCH v2 1/9] drm/imx/ipuv3/imx-tve: convert from " Brian Masney
@ 2025-08-11 10:56 ` Brian Masney
2025-08-11 10:56 ` [PATCH v2 3/9] drm/msm/disp/mdp4/mdp4_lvds_pll: " Brian Masney
` (8 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Brian Masney @ 2025-08-11 10:56 UTC (permalink / raw)
To: Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Raphael Gallais-Pou, Philippe Cornu, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Stephen Boyd
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi, Brian Masney
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
drivers/gpu/drm/mcde/mcde_clk_div.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/mcde/mcde_clk_div.c b/drivers/gpu/drm/mcde/mcde_clk_div.c
index 3056ac566473487817b40f8b9b3146dbba2ae81c..8c5af2677357fcd6587279d58077d38ff836f0c0 100644
--- a/drivers/gpu/drm/mcde/mcde_clk_div.c
+++ b/drivers/gpu/drm/mcde/mcde_clk_div.c
@@ -71,12 +71,15 @@ static int mcde_clk_div_choose_div(struct clk_hw *hw, unsigned long rate,
return best_div;
}
-static long mcde_clk_div_round_rate(struct clk_hw *hw, unsigned long rate,
- unsigned long *prate)
+static int mcde_clk_div_determine_rate(struct clk_hw *hw,
+ struct clk_rate_request *req)
{
- int div = mcde_clk_div_choose_div(hw, rate, prate, true);
+ int div = mcde_clk_div_choose_div(hw, req->rate,
+ &req->best_parent_rate, true);
- return DIV_ROUND_UP_ULL(*prate, div);
+ req->rate = DIV_ROUND_UP_ULL(req->best_parent_rate, div);
+
+ return 0;
}
static unsigned long mcde_clk_div_recalc_rate(struct clk_hw *hw,
@@ -132,7 +135,7 @@ static int mcde_clk_div_set_rate(struct clk_hw *hw, unsigned long rate,
static const struct clk_ops mcde_clk_div_ops = {
.enable = mcde_clk_div_enable,
.recalc_rate = mcde_clk_div_recalc_rate,
- .round_rate = mcde_clk_div_round_rate,
+ .determine_rate = mcde_clk_div_determine_rate,
.set_rate = mcde_clk_div_set_rate,
};
--
2.50.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 3/9] drm/msm/disp/mdp4/mdp4_lvds_pll: convert from round_rate() to determine_rate()
2025-08-11 10:56 [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate() Brian Masney
2025-08-11 10:56 ` [PATCH v2 1/9] drm/imx/ipuv3/imx-tve: convert from " Brian Masney
2025-08-11 10:56 ` [PATCH v2 2/9] drm/mcde/mcde_clk_div: " Brian Masney
@ 2025-08-11 10:56 ` Brian Masney
2025-08-11 10:56 ` [PATCH v2 4/9] drm/msm/hdmi_pll_8960: " Brian Masney
` (7 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Brian Masney @ 2025-08-11 10:56 UTC (permalink / raw)
To: Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Raphael Gallais-Pou, Philippe Cornu, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Stephen Boyd
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi, Brian Masney,
Dmitry Baryshkov, Konrad Dybcio
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_pll.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_pll.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_pll.c
index fa2c294705105f5facbf7087a9d646f710c4a7fe..82e6225c8d491d44e30631cd5a442fb7c2de3f75 100644
--- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_pll.c
+++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_pll.c
@@ -98,11 +98,14 @@ static unsigned long mpd4_lvds_pll_recalc_rate(struct clk_hw *hw,
return lvds_pll->pixclk;
}
-static long mpd4_lvds_pll_round_rate(struct clk_hw *hw, unsigned long rate,
- unsigned long *parent_rate)
+static int mpd4_lvds_pll_determine_rate(struct clk_hw *hw,
+ struct clk_rate_request *req)
{
- const struct pll_rate *pll_rate = find_rate(rate);
- return pll_rate->rate;
+ const struct pll_rate *pll_rate = find_rate(req->rate);
+
+ req->rate = pll_rate->rate;
+
+ return 0;
}
static int mpd4_lvds_pll_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -118,7 +121,7 @@ static const struct clk_ops mpd4_lvds_pll_ops = {
.enable = mpd4_lvds_pll_enable,
.disable = mpd4_lvds_pll_disable,
.recalc_rate = mpd4_lvds_pll_recalc_rate,
- .round_rate = mpd4_lvds_pll_round_rate,
+ .determine_rate = mpd4_lvds_pll_determine_rate,
.set_rate = mpd4_lvds_pll_set_rate,
};
--
2.50.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 4/9] drm/msm/hdmi_pll_8960: convert from round_rate() to determine_rate()
2025-08-11 10:56 [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate() Brian Masney
` (2 preceding siblings ...)
2025-08-11 10:56 ` [PATCH v2 3/9] drm/msm/disp/mdp4/mdp4_lvds_pll: " Brian Masney
@ 2025-08-11 10:56 ` Brian Masney
2025-08-11 10:56 ` [PATCH v2 5/9] drm/pl111: " Brian Masney
` (6 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Brian Masney @ 2025-08-11 10:56 UTC (permalink / raw)
To: Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Raphael Gallais-Pou, Philippe Cornu, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Stephen Boyd
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi, Brian Masney,
Dmitry Baryshkov, Konrad Dybcio
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c b/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
index 83c8781fcc3f6e1db99cfec64055ee5f359e49e5..6ba6bbdb7e05304f0a4be269384b7b9a5d6c668a 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
@@ -373,12 +373,14 @@ static unsigned long hdmi_pll_recalc_rate(struct clk_hw *hw,
return pll->pixclk;
}
-static long hdmi_pll_round_rate(struct clk_hw *hw, unsigned long rate,
- unsigned long *parent_rate)
+static int hdmi_pll_determine_rate(struct clk_hw *hw,
+ struct clk_rate_request *req)
{
- const struct pll_rate *pll_rate = find_rate(rate);
+ const struct pll_rate *pll_rate = find_rate(req->rate);
+
+ req->rate = pll_rate->rate;
- return pll_rate->rate;
+ return 0;
}
static int hdmi_pll_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -402,7 +404,7 @@ static const struct clk_ops hdmi_pll_ops = {
.enable = hdmi_pll_enable,
.disable = hdmi_pll_disable,
.recalc_rate = hdmi_pll_recalc_rate,
- .round_rate = hdmi_pll_round_rate,
+ .determine_rate = hdmi_pll_determine_rate,
.set_rate = hdmi_pll_set_rate,
};
--
2.50.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 5/9] drm/pl111: convert from round_rate() to determine_rate()
2025-08-11 10:56 [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate() Brian Masney
` (3 preceding siblings ...)
2025-08-11 10:56 ` [PATCH v2 4/9] drm/msm/hdmi_pll_8960: " Brian Masney
@ 2025-08-11 10:56 ` Brian Masney
2025-08-11 10:56 ` [PATCH v2 6/9] drm/stm/dw_mipi_dsi-stm: " Brian Masney
` (5 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Brian Masney @ 2025-08-11 10:56 UTC (permalink / raw)
To: Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Raphael Gallais-Pou, Philippe Cornu, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Stephen Boyd
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi, Brian Masney
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
drivers/gpu/drm/pl111/pl111_display.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c
index b9fe926a49e8bb42116ac382010829e333edbf8f..6d567e5c7c6fd559ba369a2761d3c402a14c6fe4 100644
--- a/drivers/gpu/drm/pl111/pl111_display.c
+++ b/drivers/gpu/drm/pl111/pl111_display.c
@@ -473,12 +473,15 @@ static int pl111_clk_div_choose_div(struct clk_hw *hw, unsigned long rate,
return best_div;
}
-static long pl111_clk_div_round_rate(struct clk_hw *hw, unsigned long rate,
- unsigned long *prate)
+static int pl111_clk_div_determine_rate(struct clk_hw *hw,
+ struct clk_rate_request *req)
{
- int div = pl111_clk_div_choose_div(hw, rate, prate, true);
+ int div = pl111_clk_div_choose_div(hw, req->rate,
+ &req->best_parent_rate, true);
- return DIV_ROUND_UP_ULL(*prate, div);
+ req->rate = DIV_ROUND_UP_ULL(req->best_parent_rate, div);
+
+ return 0;
}
static unsigned long pl111_clk_div_recalc_rate(struct clk_hw *hw,
@@ -528,7 +531,7 @@ static int pl111_clk_div_set_rate(struct clk_hw *hw, unsigned long rate,
static const struct clk_ops pl111_clk_div_ops = {
.recalc_rate = pl111_clk_div_recalc_rate,
- .round_rate = pl111_clk_div_round_rate,
+ .determine_rate = pl111_clk_div_determine_rate,
.set_rate = pl111_clk_div_set_rate,
};
--
2.50.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 6/9] drm/stm/dw_mipi_dsi-stm: convert from round_rate() to determine_rate()
2025-08-11 10:56 [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate() Brian Masney
` (4 preceding siblings ...)
2025-08-11 10:56 ` [PATCH v2 5/9] drm/pl111: " Brian Masney
@ 2025-08-11 10:56 ` Brian Masney
2025-08-21 9:35 ` Yannick FERTRE
2025-08-11 10:56 ` [PATCH v2 7/9] drm/stm/lvds: " Brian Masney
` (4 subsequent siblings)
10 siblings, 1 reply; 17+ messages in thread
From: Brian Masney @ 2025-08-11 10:56 UTC (permalink / raw)
To: Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Raphael Gallais-Pou, Philippe Cornu, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Stephen Boyd
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi, Brian Masney
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.
Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
index 2c7bc064bc66c6a58903a207cbe8091a14231c2b..58eae6804cc82d174323744206be7046568b905c 100644
--- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
+++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
@@ -274,8 +274,8 @@ static unsigned long dw_mipi_dsi_clk_recalc_rate(struct clk_hw *hw,
return (unsigned long)pll_out_khz * 1000;
}
-static long dw_mipi_dsi_clk_round_rate(struct clk_hw *hw, unsigned long rate,
- unsigned long *parent_rate)
+static int dw_mipi_dsi_clk_determine_rate(struct clk_hw *hw,
+ struct clk_rate_request *req)
{
struct dw_mipi_dsi_stm *dsi = clk_to_dw_mipi_dsi_stm(hw);
unsigned int idf, ndiv, odf, pll_in_khz, pll_out_khz;
@@ -283,14 +283,14 @@ static long dw_mipi_dsi_clk_round_rate(struct clk_hw *hw, unsigned long rate,
DRM_DEBUG_DRIVER("\n");
- pll_in_khz = (unsigned int)(*parent_rate / 1000);
+ pll_in_khz = (unsigned int)(req->best_parent_rate / 1000);
/* Compute best pll parameters */
idf = 0;
ndiv = 0;
odf = 0;
- ret = dsi_pll_get_params(dsi, pll_in_khz, rate / 1000,
+ ret = dsi_pll_get_params(dsi, pll_in_khz, req->rate / 1000,
&idf, &ndiv, &odf);
if (ret)
DRM_WARN("Warning dsi_pll_get_params(): bad params\n");
@@ -298,7 +298,9 @@ static long dw_mipi_dsi_clk_round_rate(struct clk_hw *hw, unsigned long rate,
/* Get the adjusted pll out value */
pll_out_khz = dsi_pll_get_clkout_khz(pll_in_khz, idf, ndiv, odf);
- return pll_out_khz * 1000;
+ req->rate = pll_out_khz * 1000;
+
+ return 0;
}
static int dw_mipi_dsi_clk_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -351,7 +353,7 @@ static const struct clk_ops dw_mipi_dsi_stm_clk_ops = {
.disable = dw_mipi_dsi_clk_disable,
.is_enabled = dw_mipi_dsi_clk_is_enabled,
.recalc_rate = dw_mipi_dsi_clk_recalc_rate,
- .round_rate = dw_mipi_dsi_clk_round_rate,
+ .determine_rate = dw_mipi_dsi_clk_determine_rate,
.set_rate = dw_mipi_dsi_clk_set_rate,
};
--
2.50.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2 6/9] drm/stm/dw_mipi_dsi-stm: convert from round_rate() to determine_rate()
2025-08-11 10:56 ` [PATCH v2 6/9] drm/stm/dw_mipi_dsi-stm: " Brian Masney
@ 2025-08-21 9:35 ` Yannick FERTRE
0 siblings, 0 replies; 17+ messages in thread
From: Yannick FERTRE @ 2025-08-21 9:35 UTC (permalink / raw)
To: Brian Masney, Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Raphael Gallais-Pou,
Philippe Cornu, Maxime Coquelin, Alexandre Torgue, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Stephen Boyd
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi
Hi Brian,
thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 11/08/2025 à 12:56, Brian Masney a écrit :
> The round_rate() clk ops is deprecated, so migrate this driver from
> round_rate() to determine_rate() using the Coccinelle semantic patch
> on the cover letter of this series.
>
> Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---
> drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> index 2c7bc064bc66c6a58903a207cbe8091a14231c2b..58eae6804cc82d174323744206be7046568b905c 100644
> --- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> +++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> @@ -274,8 +274,8 @@ static unsigned long dw_mipi_dsi_clk_recalc_rate(struct clk_hw *hw,
> return (unsigned long)pll_out_khz * 1000;
> }
>
> -static long dw_mipi_dsi_clk_round_rate(struct clk_hw *hw, unsigned long rate,
> - unsigned long *parent_rate)
> +static int dw_mipi_dsi_clk_determine_rate(struct clk_hw *hw,
> + struct clk_rate_request *req)
> {
> struct dw_mipi_dsi_stm *dsi = clk_to_dw_mipi_dsi_stm(hw);
> unsigned int idf, ndiv, odf, pll_in_khz, pll_out_khz;
> @@ -283,14 +283,14 @@ static long dw_mipi_dsi_clk_round_rate(struct clk_hw *hw, unsigned long rate,
>
> DRM_DEBUG_DRIVER("\n");
>
> - pll_in_khz = (unsigned int)(*parent_rate / 1000);
> + pll_in_khz = (unsigned int)(req->best_parent_rate / 1000);
>
> /* Compute best pll parameters */
> idf = 0;
> ndiv = 0;
> odf = 0;
>
> - ret = dsi_pll_get_params(dsi, pll_in_khz, rate / 1000,
> + ret = dsi_pll_get_params(dsi, pll_in_khz, req->rate / 1000,
> &idf, &ndiv, &odf);
> if (ret)
> DRM_WARN("Warning dsi_pll_get_params(): bad params\n");
> @@ -298,7 +298,9 @@ static long dw_mipi_dsi_clk_round_rate(struct clk_hw *hw, unsigned long rate,
> /* Get the adjusted pll out value */
> pll_out_khz = dsi_pll_get_clkout_khz(pll_in_khz, idf, ndiv, odf);
>
> - return pll_out_khz * 1000;
> + req->rate = pll_out_khz * 1000;
> +
> + return 0;
> }
>
> static int dw_mipi_dsi_clk_set_rate(struct clk_hw *hw, unsigned long rate,
> @@ -351,7 +353,7 @@ static const struct clk_ops dw_mipi_dsi_stm_clk_ops = {
> .disable = dw_mipi_dsi_clk_disable,
> .is_enabled = dw_mipi_dsi_clk_is_enabled,
> .recalc_rate = dw_mipi_dsi_clk_recalc_rate,
> - .round_rate = dw_mipi_dsi_clk_round_rate,
> + .determine_rate = dw_mipi_dsi_clk_determine_rate,
> .set_rate = dw_mipi_dsi_clk_set_rate,
> };
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 7/9] drm/stm/lvds: convert from round_rate() to determine_rate()
2025-08-11 10:56 [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate() Brian Masney
` (5 preceding siblings ...)
2025-08-11 10:56 ` [PATCH v2 6/9] drm/stm/dw_mipi_dsi-stm: " Brian Masney
@ 2025-08-11 10:56 ` Brian Masney
2025-08-21 9:36 ` Yannick FERTRE
2025-08-11 10:56 ` [PATCH v2 8/9] drm/sun4i/sun4i_hdmi_ddc_clk: " Brian Masney
` (3 subsequent siblings)
10 siblings, 1 reply; 17+ messages in thread
From: Brian Masney @ 2025-08-11 10:56 UTC (permalink / raw)
To: Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Raphael Gallais-Pou, Philippe Cornu, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Stephen Boyd
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi, Brian Masney
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.
Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
drivers/gpu/drm/stm/lvds.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/stm/lvds.c b/drivers/gpu/drm/stm/lvds.c
index 07788e8d3d8302a3951e97d64736b721033998d3..fe38c0984b2b552e1ccaef4d1e589b9d86a40ee3 100644
--- a/drivers/gpu/drm/stm/lvds.c
+++ b/drivers/gpu/drm/stm/lvds.c
@@ -682,8 +682,8 @@ static unsigned long lvds_pixel_clk_recalc_rate(struct clk_hw *hw,
return (unsigned long)lvds->pixel_clock_rate;
}
-static long lvds_pixel_clk_round_rate(struct clk_hw *hw, unsigned long rate,
- unsigned long *parent_rate)
+static int lvds_pixel_clk_determine_rate(struct clk_hw *hw,
+ struct clk_rate_request *req)
{
struct stm_lvds *lvds = container_of(hw, struct stm_lvds, lvds_ck_px);
unsigned int pll_in_khz, bdiv = 0, mdiv = 0, ndiv = 0;
@@ -703,7 +703,7 @@ static long lvds_pixel_clk_round_rate(struct clk_hw *hw, unsigned long rate,
mode = list_first_entry(&connector->modes,
struct drm_display_mode, head);
- pll_in_khz = (unsigned int)(*parent_rate / 1000);
+ pll_in_khz = (unsigned int)(req->best_parent_rate / 1000);
if (lvds_is_dual_link(lvds->link_type))
multiplier = 2;
@@ -719,14 +719,16 @@ static long lvds_pixel_clk_round_rate(struct clk_hw *hw, unsigned long rate,
lvds->pixel_clock_rate = (unsigned long)pll_get_clkout_khz(pll_in_khz, bdiv, mdiv, ndiv)
* 1000 * multiplier / 7;
- return lvds->pixel_clock_rate;
+ req->rate = lvds->pixel_clock_rate;
+
+ return 0;
}
static const struct clk_ops lvds_pixel_clk_ops = {
.enable = lvds_pixel_clk_enable,
.disable = lvds_pixel_clk_disable,
.recalc_rate = lvds_pixel_clk_recalc_rate,
- .round_rate = lvds_pixel_clk_round_rate,
+ .determine_rate = lvds_pixel_clk_determine_rate,
};
static const struct clk_init_data clk_data = {
--
2.50.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2 7/9] drm/stm/lvds: convert from round_rate() to determine_rate()
2025-08-11 10:56 ` [PATCH v2 7/9] drm/stm/lvds: " Brian Masney
@ 2025-08-21 9:36 ` Yannick FERTRE
0 siblings, 0 replies; 17+ messages in thread
From: Yannick FERTRE @ 2025-08-21 9:36 UTC (permalink / raw)
To: Brian Masney, Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Raphael Gallais-Pou,
Philippe Cornu, Maxime Coquelin, Alexandre Torgue, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Stephen Boyd
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi
Hi Brian,
thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 11/08/2025 à 12:56, Brian Masney a écrit :
> The round_rate() clk ops is deprecated, so migrate this driver from
> round_rate() to determine_rate() using the Coccinelle semantic patch
> on the cover letter of this series.
>
> Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---
> drivers/gpu/drm/stm/lvds.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/stm/lvds.c b/drivers/gpu/drm/stm/lvds.c
> index 07788e8d3d8302a3951e97d64736b721033998d3..fe38c0984b2b552e1ccaef4d1e589b9d86a40ee3 100644
> --- a/drivers/gpu/drm/stm/lvds.c
> +++ b/drivers/gpu/drm/stm/lvds.c
> @@ -682,8 +682,8 @@ static unsigned long lvds_pixel_clk_recalc_rate(struct clk_hw *hw,
> return (unsigned long)lvds->pixel_clock_rate;
> }
>
> -static long lvds_pixel_clk_round_rate(struct clk_hw *hw, unsigned long rate,
> - unsigned long *parent_rate)
> +static int lvds_pixel_clk_determine_rate(struct clk_hw *hw,
> + struct clk_rate_request *req)
> {
> struct stm_lvds *lvds = container_of(hw, struct stm_lvds, lvds_ck_px);
> unsigned int pll_in_khz, bdiv = 0, mdiv = 0, ndiv = 0;
> @@ -703,7 +703,7 @@ static long lvds_pixel_clk_round_rate(struct clk_hw *hw, unsigned long rate,
> mode = list_first_entry(&connector->modes,
> struct drm_display_mode, head);
>
> - pll_in_khz = (unsigned int)(*parent_rate / 1000);
> + pll_in_khz = (unsigned int)(req->best_parent_rate / 1000);
>
> if (lvds_is_dual_link(lvds->link_type))
> multiplier = 2;
> @@ -719,14 +719,16 @@ static long lvds_pixel_clk_round_rate(struct clk_hw *hw, unsigned long rate,
> lvds->pixel_clock_rate = (unsigned long)pll_get_clkout_khz(pll_in_khz, bdiv, mdiv, ndiv)
> * 1000 * multiplier / 7;
>
> - return lvds->pixel_clock_rate;
> + req->rate = lvds->pixel_clock_rate;
> +
> + return 0;
> }
>
> static const struct clk_ops lvds_pixel_clk_ops = {
> .enable = lvds_pixel_clk_enable,
> .disable = lvds_pixel_clk_disable,
> .recalc_rate = lvds_pixel_clk_recalc_rate,
> - .round_rate = lvds_pixel_clk_round_rate,
> + .determine_rate = lvds_pixel_clk_determine_rate,
> };
>
> static const struct clk_init_data clk_data = {
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 8/9] drm/sun4i/sun4i_hdmi_ddc_clk: convert from round_rate() to determine_rate()
2025-08-11 10:56 [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate() Brian Masney
` (6 preceding siblings ...)
2025-08-11 10:56 ` [PATCH v2 7/9] drm/stm/lvds: " Brian Masney
@ 2025-08-11 10:56 ` Brian Masney
2025-08-11 10:56 ` [PATCH v2 9/9] drm/sun4i/sun4i_tcon_dclk: " Brian Masney
` (2 subsequent siblings)
10 siblings, 0 replies; 17+ messages in thread
From: Brian Masney @ 2025-08-11 10:56 UTC (permalink / raw)
To: Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Raphael Gallais-Pou, Philippe Cornu, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Stephen Boyd
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi, Brian Masney
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c
index 12430b9d4e930f7e7b0536a5cabdf788ba182176..b1beadb9bb59f8fffd23fd5f1a175d7385cd5e06 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c
@@ -59,13 +59,15 @@ static unsigned long sun4i_ddc_calc_divider(unsigned long rate,
return best_rate;
}
-static long sun4i_ddc_round_rate(struct clk_hw *hw, unsigned long rate,
- unsigned long *prate)
+static int sun4i_ddc_determine_rate(struct clk_hw *hw,
+ struct clk_rate_request *req)
{
struct sun4i_ddc *ddc = hw_to_ddc(hw);
- return sun4i_ddc_calc_divider(rate, *prate, ddc->pre_div,
- ddc->m_offset, NULL, NULL);
+ req->rate = sun4i_ddc_calc_divider(req->rate, req->best_parent_rate,
+ ddc->pre_div, ddc->m_offset, NULL, NULL);
+
+ return 0;
}
static unsigned long sun4i_ddc_recalc_rate(struct clk_hw *hw,
@@ -101,7 +103,7 @@ static int sun4i_ddc_set_rate(struct clk_hw *hw, unsigned long rate,
static const struct clk_ops sun4i_ddc_ops = {
.recalc_rate = sun4i_ddc_recalc_rate,
- .round_rate = sun4i_ddc_round_rate,
+ .determine_rate = sun4i_ddc_determine_rate,
.set_rate = sun4i_ddc_set_rate,
};
--
2.50.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 9/9] drm/sun4i/sun4i_tcon_dclk: convert from round_rate() to determine_rate()
2025-08-11 10:56 [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate() Brian Masney
` (7 preceding siblings ...)
2025-08-11 10:56 ` [PATCH v2 8/9] drm/sun4i/sun4i_hdmi_ddc_clk: " Brian Masney
@ 2025-08-11 10:56 ` Brian Masney
2025-09-14 12:08 ` [PATCH v2 0/9] drm: convert from clk " Brian Masney
2025-09-15 13:27 ` Raphael Gallais-Pou
10 siblings, 0 replies; 17+ messages in thread
From: Brian Masney @ 2025-08-11 10:56 UTC (permalink / raw)
To: Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Raphael Gallais-Pou, Philippe Cornu, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Stephen Boyd
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi, Brian Masney
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
drivers/gpu/drm/sun4i/sun4i_tcon_dclk.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon_dclk.c b/drivers/gpu/drm/sun4i/sun4i_tcon_dclk.c
index 03d7de1911cd654f395ea85ad914588c4351f391..4afb12bd5281f0d1720cfe2c8f79b80d97244ef2 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon_dclk.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon_dclk.c
@@ -67,8 +67,8 @@ static unsigned long sun4i_dclk_recalc_rate(struct clk_hw *hw,
return parent_rate / val;
}
-static long sun4i_dclk_round_rate(struct clk_hw *hw, unsigned long rate,
- unsigned long *parent_rate)
+static int sun4i_dclk_determine_rate(struct clk_hw *hw,
+ struct clk_rate_request *req)
{
struct sun4i_dclk *dclk = hw_to_dclk(hw);
struct sun4i_tcon *tcon = dclk->tcon;
@@ -77,7 +77,7 @@ static long sun4i_dclk_round_rate(struct clk_hw *hw, unsigned long rate,
int i;
for (i = tcon->dclk_min_div; i <= tcon->dclk_max_div; i++) {
- u64 ideal = (u64)rate * i;
+ u64 ideal = (u64)req->rate * i;
unsigned long rounded;
/*
@@ -99,17 +99,19 @@ static long sun4i_dclk_round_rate(struct clk_hw *hw, unsigned long rate,
goto out;
}
- if (abs(rate - rounded / i) <
- abs(rate - best_parent / best_div)) {
+ if (abs(req->rate - rounded / i) <
+ abs(req->rate - best_parent / best_div)) {
best_parent = rounded;
best_div = i;
}
}
out:
- *parent_rate = best_parent;
+ req->best_parent_rate = best_parent;
- return best_parent / best_div;
+ req->rate = best_parent / best_div;
+
+ return 0;
}
static int sun4i_dclk_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -155,7 +157,7 @@ static const struct clk_ops sun4i_dclk_ops = {
.is_enabled = sun4i_dclk_is_enabled,
.recalc_rate = sun4i_dclk_recalc_rate,
- .round_rate = sun4i_dclk_round_rate,
+ .determine_rate = sun4i_dclk_determine_rate,
.set_rate = sun4i_dclk_set_rate,
.get_phase = sun4i_dclk_get_phase,
--
2.50.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate()
2025-08-11 10:56 [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate() Brian Masney
` (8 preceding siblings ...)
2025-08-11 10:56 ` [PATCH v2 9/9] drm/sun4i/sun4i_tcon_dclk: " Brian Masney
@ 2025-09-14 12:08 ` Brian Masney
2025-09-15 0:14 ` Dmitry Baryshkov
2025-09-15 11:01 ` Raphael Gallais-Pou
2025-09-15 13:27 ` Raphael Gallais-Pou
10 siblings, 2 replies; 17+ messages in thread
From: Brian Masney @ 2025-09-14 12:08 UTC (permalink / raw)
To: Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Raphael Gallais-Pou, Philippe Cornu, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Stephen Boyd
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi,
Dmitry Baryshkov, Konrad Dybcio
Hi all,
On Mon, Aug 11, 2025 at 06:56:04AM -0400, Brian Masney wrote:
> The round_rate() clk ops is deprecated in the clk framework in favor
> of the determine_rate() clk ops, so let's go ahead and convert the
> drivers in the drm subsystem using the Coccinelle semantic patch
> posted below. I did a few minor cosmetic cleanups of the code in a
> few cases.
>
> Changes since v1:
> - Drop space after the cast (Maxime)
> - Added various Acked-by and Reviewed-by tags
Would it be possible to get this picked up for v6.18? I'd like to remove
this API from drivers/clk in v6.19.
I'm not sure which tree(s) this should go through. All of the patches
except patch 1 have at least one Acked-by or Reviewed-by.
Thanks,
Brian
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate()
2025-09-14 12:08 ` [PATCH v2 0/9] drm: convert from clk " Brian Masney
@ 2025-09-15 0:14 ` Dmitry Baryshkov
2025-09-15 11:01 ` Raphael Gallais-Pou
1 sibling, 0 replies; 17+ messages in thread
From: Dmitry Baryshkov @ 2025-09-15 0:14 UTC (permalink / raw)
To: Brian Masney
Cc: Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Raphael Gallais-Pou, Philippe Cornu, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Stephen Boyd, linux-clk, dri-devel, imx, linux-arm-kernel,
linux-kernel, linux-arm-msm, freedreno, linux-stm32, linux-sunxi,
Konrad Dybcio
On Sun, Sep 14, 2025 at 08:08:33AM -0400, Brian Masney wrote:
> Hi all,
>
> On Mon, Aug 11, 2025 at 06:56:04AM -0400, Brian Masney wrote:
> > The round_rate() clk ops is deprecated in the clk framework in favor
> > of the determine_rate() clk ops, so let's go ahead and convert the
> > drivers in the drm subsystem using the Coccinelle semantic patch
> > posted below. I did a few minor cosmetic cleanups of the code in a
> > few cases.
> >
> > Changes since v1:
> > - Drop space after the cast (Maxime)
> > - Added various Acked-by and Reviewed-by tags
>
> Would it be possible to get this picked up for v6.18? I'd like to remove
> this API from drivers/clk in v6.19.
>
> I'm not sure which tree(s) this should go through. All of the patches
> except patch 1 have at least one Acked-by or Reviewed-by.
Patches 3, 4 were merged through the msm tree.
>
> Thanks,
>
> Brian
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate()
2025-09-14 12:08 ` [PATCH v2 0/9] drm: convert from clk " Brian Masney
2025-09-15 0:14 ` Dmitry Baryshkov
@ 2025-09-15 11:01 ` Raphael Gallais-Pou
1 sibling, 0 replies; 17+ messages in thread
From: Raphael Gallais-Pou @ 2025-09-15 11:01 UTC (permalink / raw)
To: Brian Masney, Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Philippe Cornu, Maxime Coquelin, Alexandre Torgue, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Stephen Boyd
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi,
Dmitry Baryshkov, Konrad Dybcio
On 9/14/25 14:08, Brian Masney wrote:
> Hi all,
>
> On Mon, Aug 11, 2025 at 06:56:04AM -0400, Brian Masney wrote:
>> The round_rate() clk ops is deprecated in the clk framework in favor
>> of the determine_rate() clk ops, so let's go ahead and convert the
>> drivers in the drm subsystem using the Coccinelle semantic patch
>> posted below. I did a few minor cosmetic cleanups of the code in a
>> few cases.
>>
>> Changes since v1:
>> - Drop space after the cast (Maxime)
>> - Added various Acked-by and Reviewed-by tags
> Would it be possible to get this picked up for v6.18? I'd like to remove
> this API from drivers/clk in v6.19.
>
> I'm not sure which tree(s) this should go through. All of the patches
> except patch 1 have at least one Acked-by or Reviewed-by.
If there are no objections I'll merge the rest of the series in the
drm-misc-next later today.
Regards,
Raphaël
>
> Thanks,
>
> Brian
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate()
2025-08-11 10:56 [PATCH v2 0/9] drm: convert from clk round_rate() to determine_rate() Brian Masney
` (9 preceding siblings ...)
2025-09-14 12:08 ` [PATCH v2 0/9] drm: convert from clk " Brian Masney
@ 2025-09-15 13:27 ` Raphael Gallais-Pou
10 siblings, 0 replies; 17+ messages in thread
From: Raphael Gallais-Pou @ 2025-09-15 13:27 UTC (permalink / raw)
To: Philipp Zabel, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Linus Walleij, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, Yannick Fertre,
Philippe Cornu, Maxime Coquelin, Alexandre Torgue, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Stephen Boyd, Brian Masney
Cc: linux-clk, dri-devel, imx, linux-arm-kernel, linux-kernel,
linux-arm-msm, freedreno, linux-stm32, linux-sunxi,
Dmitry Baryshkov, Konrad Dybcio
On Mon, 11 Aug 2025 06:56:04 -0400, Brian Masney wrote:
> The round_rate() clk ops is deprecated in the clk framework in favor
> of the determine_rate() clk ops, so let's go ahead and convert the
> drivers in the drm subsystem using the Coccinelle semantic patch
> posted below. I did a few minor cosmetic cleanups of the code in a
> few cases.
>
> Changes since v1:
> - Drop space after the cast (Maxime)
> - Added various Acked-by and Reviewed-by tags
>
> [...]
Applied, thanks!
[1/9] drm/imx/ipuv3/imx-tve: convert from round_rate() to determine_rate()
commit: 6a1977472f6be561aa613d0ee969cb7e268faf5c
[2/9] drm/mcde/mcde_clk_div: convert from round_rate() to determine_rate()
commit: a3e12b9c84e25fc7b0e3ff1ea4ba17512a791386
[5/9] drm/pl111: convert from round_rate() to determine_rate()
commit: b1a122f404d4467623f66b596f8aba0e1ca9d14e
[6/9] drm/stm/dw_mipi_dsi-stm: convert from round_rate() to determine_rate()
commit: 5ccf442ecd419e90f9f74a708d41e56b684eff40
[7/9] drm/stm/lvds: convert from round_rate() to determine_rate()
commit: 1dc50bc8a3f14789b76e58a4590cd4e9595d6e7d
[8/9] drm/sun4i/sun4i_hdmi_ddc_clk: convert from round_rate() to determine_rate()
commit: 5c04f4812782e861166401458b6cf16dfe1be264
[9/9] drm/sun4i/sun4i_tcon_dclk: convert from round_rate() to determine_rate()
commit: a076fe9f126fbc0c52795db4ae21501e6f8fd03d
Best regards,
--
Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
^ permalink raw reply [flat|nested] 17+ messages in thread