dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk round_rate() to determine_rate()
@ 2025-08-10 22:57 Brian Masney
  2025-08-10 22:57 ` [PATCH v2 1/7] drm/msm/dsi_phy_10nm: convert from " Brian Masney
                   ` (7 more replies)
  0 siblings, 8 replies; 24+ messages in thread
From: Brian Masney @ 2025-08-10 22:57 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel,
	Brian Masney

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/msm/dsi/phy 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:
- Converted over to use clamp_t() (Konrad)

Coccinelle semantic patch:

    virtual patch

    // Look up the current name of the round_rate function
    @ has_round_rate @
    identifier round_rate_name =~ ".*_round_rate";
    identifier hw_param, rate_param, parent_rate_param;
    @@

    long round_rate_name(struct clk_hw *hw_param, unsigned long rate_param,
                  unsigned long *parent_rate_param)
    {
    	...
    }

    // Rename the route_rate function name to determine_rate()
    @ script:python generate_name depends on has_round_rate @
    round_rate_name << has_round_rate.round_rate_name;
    new_name;
    @@

    coccinelle.new_name = round_rate_name.replace("_round_rate", "_determine_rate")

    // Change rate to req->rate; also change occurrences of 'return XXX'.
    @ chg_rate depends on generate_name @
    identifier has_round_rate.round_rate_name;
    identifier has_round_rate.hw_param;
    identifier has_round_rate.rate_param;
    identifier has_round_rate.parent_rate_param;
    identifier ERR =~ "E.*";
    expression E;
    @@

    long round_rate_name(struct clk_hw *hw_param, unsigned long rate_param,
                  unsigned long *parent_rate_param)
    {
    <...
    (
    -return -ERR;
    +return -ERR;
    |
    - return rate_param;
    + return 0;
    |
    - return E;
    + req->rate = E;
    +
    + return 0;
    |
    - rate_param
    + req->rate
    )
    ...>
    }

    // Coccinelle only transforms the first occurrence of the rate parameter
    // Run a second time. FIXME: Is there a better way to do this?
    @ chg_rate2 depends on generate_name @
    identifier has_round_rate.round_rate_name;
    identifier has_round_rate.hw_param;
    identifier has_round_rate.rate_param;
    identifier has_round_rate.parent_rate_param;
    @@

    long round_rate_name(struct clk_hw *hw_param, unsigned long rate_param,
                  unsigned long *parent_rate_param)
    {
    <...
    - rate_param
    + req->rate
    ...>
    }

    // Change parent_rate to req->best_parent_rate
    @ chg_parent_rate depends on generate_name @
    identifier has_round_rate.round_rate_name;
    identifier has_round_rate.hw_param;
    identifier has_round_rate.rate_param;
    identifier has_round_rate.parent_rate_param;
    @@

    long round_rate_name(struct clk_hw *hw_param, unsigned long rate_param,
                  unsigned long *parent_rate_param)
    {
    <...
    (
    - *parent_rate_param
    + req->best_parent_rate
    |
    - parent_rate_param
    + &req->best_parent_rate
    )
    ...>
    }

    // Convert the function definition from round_rate() to determine_rate()
    @ func_definition depends on chg_rate @
    identifier has_round_rate.round_rate_name;
    identifier has_round_rate.hw_param;
    identifier has_round_rate.rate_param;
    identifier has_round_rate.parent_rate_param;
    identifier generate_name.new_name;
    @@

    - long round_rate_name(struct clk_hw *hw_param, unsigned long rate_param,
    -               unsigned long *parent_rate_param)
    + int new_name(struct clk_hw *hw, struct clk_rate_request *req)
    {
        ...
    }

    // Update the ops from round_rate() to determine_rate()
    @ ops depends on func_definition @
    identifier has_round_rate.round_rate_name;
    identifier generate_name.new_name;
    @@

    {
        ...,
    -   .round_rate = round_rate_name,
    +   .determine_rate = new_name,
        ...,
    }

Note that I used coccinelle 1.2 instead of 1.3 since the newer version
adds unnecessary braces as described in this post.
https://lore.kernel.org/cocci/67642477-5f3e-4b2a-914d-579a54f48cbd@intel.com/

Signed-off-by: Brian Masney <bmasney@redhat.com>
---
Brian Masney (7):
      drm/msm/dsi_phy_10nm: convert from round_rate() to determine_rate()
      drm/msm/dsi_phy_14nm: convert from round_rate() to determine_rate()
      drm/msm/dsi_phy_28nm_8960: convert from round_rate() to determine_rate()
      drm/msm/dsi_phy_28nm: convert from round_rate() to determine_rate()
      drm/msm/dsi_phy_7nm: convert from round_rate() to determine_rate()
      drm/msm/hdmi_phy_8996: convert from round_rate() to determine_rate()
      drm/msm/hdmi_phy_8998: convert from round_rate() to determine_rate()

 drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c      | 16 +++++-------
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c      | 34 ++++++++++++-------------
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c      | 21 ++++++++-------
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c | 32 +++++++++++------------
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c       | 16 +++++-------
 drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c        | 16 +++++-------
 drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c        | 16 +++++-------
 7 files changed, 69 insertions(+), 82 deletions(-)
---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250710-drm-msm-phy-clk-round-rate-ccb10d54e804

Best regards,
-- 
Brian Masney <bmasney@redhat.com>


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

* [PATCH v2 1/7] drm/msm/dsi_phy_10nm: convert from round_rate() to determine_rate()
  2025-08-10 22:57 [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk round_rate() to determine_rate() Brian Masney
@ 2025-08-10 22:57 ` Brian Masney
  2025-08-11 10:30   ` Dmitry Baryshkov
  2025-08-11 10:33   ` Konrad Dybcio
  2025-08-10 22:57 ` [PATCH v2 2/7] drm/msm/dsi_phy_14nm: " Brian Masney
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 24+ messages in thread
From: Brian Masney @ 2025-08-10 22:57 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel,
	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. The change to use clamp_t() was
done manually.

Signed-off-by: Brian Masney <bmasney@redhat.com>
---
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
index af2e30f3f842a0157f161172bfe42059cabe6a8a..ec486ff02c9b5156cdf0902d05464cf57dc9605b 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
@@ -444,21 +444,19 @@ static unsigned long dsi_pll_10nm_vco_recalc_rate(struct clk_hw *hw,
 	return (unsigned long)vco_rate;
 }
 
-static long dsi_pll_10nm_clk_round_rate(struct clk_hw *hw,
-		unsigned long rate, unsigned long *parent_rate)
+static int dsi_pll_10nm_clk_determine_rate(struct clk_hw *hw,
+					   struct clk_rate_request *req)
 {
 	struct dsi_pll_10nm *pll_10nm = to_pll_10nm(hw);
 
-	if      (rate < pll_10nm->phy->cfg->min_pll_rate)
-		return  pll_10nm->phy->cfg->min_pll_rate;
-	else if (rate > pll_10nm->phy->cfg->max_pll_rate)
-		return  pll_10nm->phy->cfg->max_pll_rate;
-	else
-		return rate;
+	req->rate = clamp_t(unsigned long, req->rate,
+			    pll_10nm->phy->cfg->min_pll_rate, pll_10nm->phy->cfg->max_pll_rate);
+
+	return 0;
 }
 
 static const struct clk_ops clk_ops_dsi_pll_10nm_vco = {
-	.round_rate = dsi_pll_10nm_clk_round_rate,
+	.determine_rate = dsi_pll_10nm_clk_determine_rate,
 	.set_rate = dsi_pll_10nm_vco_set_rate,
 	.recalc_rate = dsi_pll_10nm_vco_recalc_rate,
 	.prepare = dsi_pll_10nm_vco_prepare,

-- 
2.50.1


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

* [PATCH v2 2/7] drm/msm/dsi_phy_14nm: convert from round_rate() to determine_rate()
  2025-08-10 22:57 [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk round_rate() to determine_rate() Brian Masney
  2025-08-10 22:57 ` [PATCH v2 1/7] drm/msm/dsi_phy_10nm: convert from " Brian Masney
@ 2025-08-10 22:57 ` Brian Masney
  2025-08-11 10:31   ` Dmitry Baryshkov
  2025-08-11 10:33   ` Konrad Dybcio
  2025-08-10 22:57 ` [PATCH v2 3/7] drm/msm/dsi_phy_28nm_8960: " Brian Masney
                   ` (5 subsequent siblings)
  7 siblings, 2 replies; 24+ messages in thread
From: Brian Masney @ 2025-08-10 22:57 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel,
	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. The change to use clamp_t() was
done manually.

Signed-off-by: Brian Masney <bmasney@redhat.com>
---
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 34 +++++++++++++++---------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
index 3a1c8ece6657c988cfb0c26af39b5d145bc576f8..fdefcbd9c2848a1c76414a41b811b29e5fed9ddc 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
@@ -578,21 +578,19 @@ static void dsi_pll_14nm_vco_unprepare(struct clk_hw *hw)
 	pll_14nm->phy->pll_on = false;
 }
 
-static long dsi_pll_14nm_clk_round_rate(struct clk_hw *hw,
-		unsigned long rate, unsigned long *parent_rate)
+static int dsi_pll_14nm_clk_determine_rate(struct clk_hw *hw,
+					   struct clk_rate_request *req)
 {
 	struct dsi_pll_14nm *pll_14nm = to_pll_14nm(hw);
 
-	if      (rate < pll_14nm->phy->cfg->min_pll_rate)
-		return  pll_14nm->phy->cfg->min_pll_rate;
-	else if (rate > pll_14nm->phy->cfg->max_pll_rate)
-		return  pll_14nm->phy->cfg->max_pll_rate;
-	else
-		return rate;
+	req->rate = clamp_t(unsigned long, req->rate,
+			    pll_14nm->phy->cfg->min_pll_rate, pll_14nm->phy->cfg->max_pll_rate);
+
+	return 0;
 }
 
 static const struct clk_ops clk_ops_dsi_pll_14nm_vco = {
-	.round_rate = dsi_pll_14nm_clk_round_rate,
+	.determine_rate = dsi_pll_14nm_clk_determine_rate,
 	.set_rate = dsi_pll_14nm_vco_set_rate,
 	.recalc_rate = dsi_pll_14nm_vco_recalc_rate,
 	.prepare = dsi_pll_14nm_vco_prepare,
@@ -622,18 +620,20 @@ static unsigned long dsi_pll_14nm_postdiv_recalc_rate(struct clk_hw *hw,
 				   postdiv->flags, width);
 }
 
-static long dsi_pll_14nm_postdiv_round_rate(struct clk_hw *hw,
-					    unsigned long rate,
-					    unsigned long *prate)
+static int dsi_pll_14nm_postdiv_determine_rate(struct clk_hw *hw,
+					       struct clk_rate_request *req)
 {
 	struct dsi_pll_14nm_postdiv *postdiv = to_pll_14nm_postdiv(hw);
 	struct dsi_pll_14nm *pll_14nm = postdiv->pll;
 
-	DBG("DSI%d PLL parent rate=%lu", pll_14nm->phy->id, rate);
+	DBG("DSI%d PLL parent rate=%lu", pll_14nm->phy->id, req->rate);
 
-	return divider_round_rate(hw, rate, prate, NULL,
-				  postdiv->width,
-				  postdiv->flags);
+	req->rate = divider_round_rate(hw, req->rate, &req->best_parent_rate,
+				       NULL,
+				       postdiv->width,
+				       postdiv->flags);
+
+	return 0;
 }
 
 static int dsi_pll_14nm_postdiv_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -680,7 +680,7 @@ static int dsi_pll_14nm_postdiv_set_rate(struct clk_hw *hw, unsigned long rate,
 
 static const struct clk_ops clk_ops_dsi_pll_14nm_postdiv = {
 	.recalc_rate = dsi_pll_14nm_postdiv_recalc_rate,
-	.round_rate = dsi_pll_14nm_postdiv_round_rate,
+	.determine_rate = dsi_pll_14nm_postdiv_determine_rate,
 	.set_rate = dsi_pll_14nm_postdiv_set_rate,
 };
 

-- 
2.50.1


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

* [PATCH v2 3/7] drm/msm/dsi_phy_28nm_8960: convert from round_rate() to determine_rate()
  2025-08-10 22:57 [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk round_rate() to determine_rate() Brian Masney
  2025-08-10 22:57 ` [PATCH v2 1/7] drm/msm/dsi_phy_10nm: convert from " Brian Masney
  2025-08-10 22:57 ` [PATCH v2 2/7] drm/msm/dsi_phy_14nm: " Brian Masney
@ 2025-08-10 22:57 ` Brian Masney
  2025-08-11 10:33   ` Dmitry Baryshkov
  2025-08-11 10:33   ` Konrad Dybcio
  2025-08-10 22:57 ` [PATCH v2 4/7] drm/msm/dsi_phy_28nm: " Brian Masney
                   ` (4 subsequent siblings)
  7 siblings, 2 replies; 24+ messages in thread
From: Brian Masney @ 2025-08-10 22:57 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel,
	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. The change to use clamp_t() was
done manually.

Signed-off-by: Brian Masney <bmasney@redhat.com>
---
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c | 32 ++++++++++++-------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c
index f3643320ff2f2bae5301bb94f1fe19fa03db584c..8dcce9581dc38730ab725e0e435ab93a04c527ed 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c
@@ -231,21 +231,19 @@ static void dsi_pll_28nm_vco_unprepare(struct clk_hw *hw)
 	pll_28nm->phy->pll_on = false;
 }
 
-static long dsi_pll_28nm_clk_round_rate(struct clk_hw *hw,
-		unsigned long rate, unsigned long *parent_rate)
+static int dsi_pll_28nm_clk_determine_rate(struct clk_hw *hw,
+					   struct clk_rate_request *req)
 {
 	struct dsi_pll_28nm *pll_28nm = to_pll_28nm(hw);
 
-	if      (rate < pll_28nm->phy->cfg->min_pll_rate)
-		return  pll_28nm->phy->cfg->min_pll_rate;
-	else if (rate > pll_28nm->phy->cfg->max_pll_rate)
-		return  pll_28nm->phy->cfg->max_pll_rate;
-	else
-		return rate;
+	req->rate = clamp_t(unsigned long, req->rate,
+			    pll_28nm->phy->cfg->min_pll_rate, pll_28nm->phy->cfg->max_pll_rate);
+
+	return 0;
 }
 
 static const struct clk_ops clk_ops_dsi_pll_28nm_vco = {
-	.round_rate = dsi_pll_28nm_clk_round_rate,
+	.determine_rate = dsi_pll_28nm_clk_determine_rate,
 	.set_rate = dsi_pll_28nm_clk_set_rate,
 	.recalc_rate = dsi_pll_28nm_clk_recalc_rate,
 	.prepare = dsi_pll_28nm_vco_prepare,
@@ -296,18 +294,20 @@ static unsigned int get_vco_mul_factor(unsigned long byte_clk_rate)
 		return 8;
 }
 
-static long clk_bytediv_round_rate(struct clk_hw *hw, unsigned long rate,
-				   unsigned long *prate)
+static int clk_bytediv_determine_rate(struct clk_hw *hw,
+				      struct clk_rate_request *req)
 {
 	unsigned long best_parent;
 	unsigned int factor;
 
-	factor = get_vco_mul_factor(rate);
+	factor = get_vco_mul_factor(req->rate);
+
+	best_parent = req->rate * factor;
+	req->best_parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw), best_parent);
 
-	best_parent = rate * factor;
-	*prate = clk_hw_round_rate(clk_hw_get_parent(hw), best_parent);
+	req->rate = req->best_parent_rate / factor;
 
-	return *prate / factor;
+	return 0;
 }
 
 static int clk_bytediv_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -328,7 +328,7 @@ static int clk_bytediv_set_rate(struct clk_hw *hw, unsigned long rate,
 
 /* Our special byte clock divider ops */
 static const struct clk_ops clk_bytediv_ops = {
-	.round_rate = clk_bytediv_round_rate,
+	.determine_rate = clk_bytediv_determine_rate,
 	.set_rate = clk_bytediv_set_rate,
 	.recalc_rate = clk_bytediv_recalc_rate,
 };

-- 
2.50.1


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

* [PATCH v2 4/7] drm/msm/dsi_phy_28nm: convert from round_rate() to determine_rate()
  2025-08-10 22:57 [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk round_rate() to determine_rate() Brian Masney
                   ` (2 preceding siblings ...)
  2025-08-10 22:57 ` [PATCH v2 3/7] drm/msm/dsi_phy_28nm_8960: " Brian Masney
@ 2025-08-10 22:57 ` Brian Masney
  2025-08-11 10:33   ` Konrad Dybcio
  2025-08-11 10:35   ` Dmitry Baryshkov
  2025-08-10 22:57 ` [PATCH v2 5/7] drm/msm/dsi_phy_7nm: " Brian Masney
                   ` (3 subsequent siblings)
  7 siblings, 2 replies; 24+ messages in thread
From: Brian Masney @ 2025-08-10 22:57 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel,
	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. The change to use clamp_t() was
done manually.

Signed-off-by: Brian Masney <bmasney@redhat.com>
---
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c
index 90348a2af3e9dac72924561b23b169a268abc3b0..d00e415b9a991cd515e01d78a48ac6fe3e830b04 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c
@@ -533,21 +533,20 @@ static void dsi_pll_28nm_vco_unprepare(struct clk_hw *hw)
 	pll_28nm->phy->pll_on = false;
 }
 
-static long dsi_pll_28nm_clk_round_rate(struct clk_hw *hw,
-		unsigned long rate, unsigned long *parent_rate)
+static int dsi_pll_28nm_clk_determine_rate(struct clk_hw *hw,
+					   struct clk_rate_request *req)
 {
 	struct dsi_pll_28nm *pll_28nm = to_pll_28nm(hw);
 
-	if      (rate < pll_28nm->phy->cfg->min_pll_rate)
-		return  pll_28nm->phy->cfg->min_pll_rate;
-	else if (rate > pll_28nm->phy->cfg->max_pll_rate)
-		return  pll_28nm->phy->cfg->max_pll_rate;
-	else
-		return rate;
+	req->rate = clamp_t(unsigned long, req->rate,
+			    pll_28nm->phy->cfg->min_pll_rate,
+			    pll_28nm->phy->cfg->max_pll_rate);
+
+	return 0;
 }
 
 static const struct clk_ops clk_ops_dsi_pll_28nm_vco_hpm = {
-	.round_rate = dsi_pll_28nm_clk_round_rate,
+	.determine_rate = dsi_pll_28nm_clk_determine_rate,
 	.set_rate = dsi_pll_28nm_clk_set_rate,
 	.recalc_rate = dsi_pll_28nm_clk_recalc_rate,
 	.prepare = dsi_pll_28nm_vco_prepare_hpm,
@@ -556,7 +555,7 @@ static const struct clk_ops clk_ops_dsi_pll_28nm_vco_hpm = {
 };
 
 static const struct clk_ops clk_ops_dsi_pll_28nm_vco_lp = {
-	.round_rate = dsi_pll_28nm_clk_round_rate,
+	.determine_rate = dsi_pll_28nm_clk_determine_rate,
 	.set_rate = dsi_pll_28nm_clk_set_rate,
 	.recalc_rate = dsi_pll_28nm_clk_recalc_rate,
 	.prepare = dsi_pll_28nm_vco_prepare_lp,
@@ -565,7 +564,7 @@ static const struct clk_ops clk_ops_dsi_pll_28nm_vco_lp = {
 };
 
 static const struct clk_ops clk_ops_dsi_pll_28nm_vco_8226 = {
-	.round_rate = dsi_pll_28nm_clk_round_rate,
+	.determine_rate = dsi_pll_28nm_clk_determine_rate,
 	.set_rate = dsi_pll_28nm_clk_set_rate,
 	.recalc_rate = dsi_pll_28nm_clk_recalc_rate,
 	.prepare = dsi_pll_28nm_vco_prepare_8226,

-- 
2.50.1


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

* [PATCH v2 5/7] drm/msm/dsi_phy_7nm: convert from round_rate() to determine_rate()
  2025-08-10 22:57 [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk round_rate() to determine_rate() Brian Masney
                   ` (3 preceding siblings ...)
  2025-08-10 22:57 ` [PATCH v2 4/7] drm/msm/dsi_phy_28nm: " Brian Masney
@ 2025-08-10 22:57 ` Brian Masney
  2025-08-11 10:33   ` Konrad Dybcio
  2025-08-11 10:35   ` Dmitry Baryshkov
  2025-08-10 22:57 ` [PATCH v2 6/7] drm/msm/hdmi_phy_8996: " Brian Masney
                   ` (2 subsequent siblings)
  7 siblings, 2 replies; 24+ messages in thread
From: Brian Masney @ 2025-08-10 22:57 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel,
	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. The change to use clamp_t() was
done manually.

Signed-off-by: Brian Masney <bmasney@redhat.com>
---
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
index 8c98f91a5930c9f2563a6b4824690ceef56987c0..c3bd3f89434eb7d3d0f3bb9455d22aa00915e797 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
@@ -561,21 +561,19 @@ static unsigned long dsi_pll_7nm_vco_recalc_rate(struct clk_hw *hw,
 	return (unsigned long)vco_rate;
 }
 
-static long dsi_pll_7nm_clk_round_rate(struct clk_hw *hw,
-		unsigned long rate, unsigned long *parent_rate)
+static int dsi_pll_7nm_clk_determine_rate(struct clk_hw *hw,
+					  struct clk_rate_request *req)
 {
 	struct dsi_pll_7nm *pll_7nm = to_pll_7nm(hw);
 
-	if      (rate < pll_7nm->phy->cfg->min_pll_rate)
-		return  pll_7nm->phy->cfg->min_pll_rate;
-	else if (rate > pll_7nm->phy->cfg->max_pll_rate)
-		return  pll_7nm->phy->cfg->max_pll_rate;
-	else
-		return rate;
+	req->rate = clamp_t(unsigned long, req->rate,
+			    pll_7nm->phy->cfg->min_pll_rate, pll_7nm->phy->cfg->max_pll_rate);
+
+	return 0;
 }
 
 static const struct clk_ops clk_ops_dsi_pll_7nm_vco = {
-	.round_rate = dsi_pll_7nm_clk_round_rate,
+	.determine_rate = dsi_pll_7nm_clk_determine_rate,
 	.set_rate = dsi_pll_7nm_vco_set_rate,
 	.recalc_rate = dsi_pll_7nm_vco_recalc_rate,
 	.prepare = dsi_pll_7nm_vco_prepare,

-- 
2.50.1


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

* [PATCH v2 6/7] drm/msm/hdmi_phy_8996: convert from round_rate() to determine_rate()
  2025-08-10 22:57 [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk round_rate() to determine_rate() Brian Masney
                   ` (4 preceding siblings ...)
  2025-08-10 22:57 ` [PATCH v2 5/7] drm/msm/dsi_phy_7nm: " Brian Masney
@ 2025-08-10 22:57 ` Brian Masney
  2025-08-11 10:33   ` Konrad Dybcio
  2025-08-11 10:35   ` Dmitry Baryshkov
  2025-08-10 22:57 ` [PATCH v2 7/7] drm/msm/hdmi_phy_8998: " Brian Masney
  2025-08-11  9:02 ` [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk " Konrad Dybcio
  7 siblings, 2 replies; 24+ messages in thread
From: Brian Masney @ 2025-08-10 22:57 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel,
	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. The change to use clamp_t() was
done manually.

Signed-off-by: Brian Masney <bmasney@redhat.com>
---
 drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
index 8c8d80b59573a37a4008752b16e094a218802508..36e928b0fd5a319b6a12b9be52705c067d51c20b 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
@@ -629,16 +629,12 @@ static int hdmi_8996_pll_prepare(struct clk_hw *hw)
 	return 0;
 }
 
-static long hdmi_8996_pll_round_rate(struct clk_hw *hw,
-				     unsigned long rate,
-				     unsigned long *parent_rate)
+static int hdmi_8996_pll_determine_rate(struct clk_hw *hw,
+					struct clk_rate_request *req)
 {
-	if (rate < HDMI_PCLK_MIN_FREQ)
-		return HDMI_PCLK_MIN_FREQ;
-	else if (rate > HDMI_PCLK_MAX_FREQ)
-		return HDMI_PCLK_MAX_FREQ;
-	else
-		return rate;
+	req->rate = clamp_t(unsigned long, req->rate, HDMI_PCLK_MIN_FREQ, HDMI_PCLK_MAX_FREQ);
+
+	return 0;
 }
 
 static unsigned long hdmi_8996_pll_recalc_rate(struct clk_hw *hw,
@@ -684,7 +680,7 @@ static int hdmi_8996_pll_is_enabled(struct clk_hw *hw)
 
 static const struct clk_ops hdmi_8996_pll_ops = {
 	.set_rate = hdmi_8996_pll_set_clk_rate,
-	.round_rate = hdmi_8996_pll_round_rate,
+	.determine_rate = hdmi_8996_pll_determine_rate,
 	.recalc_rate = hdmi_8996_pll_recalc_rate,
 	.prepare = hdmi_8996_pll_prepare,
 	.unprepare = hdmi_8996_pll_unprepare,

-- 
2.50.1


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

* [PATCH v2 7/7] drm/msm/hdmi_phy_8998: convert from round_rate() to determine_rate()
  2025-08-10 22:57 [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk round_rate() to determine_rate() Brian Masney
                   ` (5 preceding siblings ...)
  2025-08-10 22:57 ` [PATCH v2 6/7] drm/msm/hdmi_phy_8996: " Brian Masney
@ 2025-08-10 22:57 ` Brian Masney
  2025-08-11 10:33   ` Konrad Dybcio
  2025-08-11 10:36   ` Dmitry Baryshkov
  2025-08-11  9:02 ` [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk " Konrad Dybcio
  7 siblings, 2 replies; 24+ messages in thread
From: Brian Masney @ 2025-08-10 22:57 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel,
	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. The change to use clamp_t() was
done manually.

Signed-off-by: Brian Masney <bmasney@redhat.com>
---
 drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
index 33bb48ae58a2da13b7e90ff419c6e05fec1466af..a86ff370636972168124da19e114f0acab2249d2 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
@@ -646,16 +646,12 @@ static int hdmi_8998_pll_prepare(struct clk_hw *hw)
 	return 0;
 }
 
-static long hdmi_8998_pll_round_rate(struct clk_hw *hw,
-				     unsigned long rate,
-				     unsigned long *parent_rate)
+static int hdmi_8998_pll_determine_rate(struct clk_hw *hw,
+					struct clk_rate_request *req)
 {
-	if (rate < HDMI_PCLK_MIN_FREQ)
-		return HDMI_PCLK_MIN_FREQ;
-	else if (rate > HDMI_PCLK_MAX_FREQ)
-		return HDMI_PCLK_MAX_FREQ;
-	else
-		return rate;
+	req->rate = clamp_t(unsigned long, req->rate, HDMI_PCLK_MIN_FREQ, HDMI_PCLK_MAX_FREQ);
+
+	return 0;
 }
 
 static unsigned long hdmi_8998_pll_recalc_rate(struct clk_hw *hw,
@@ -688,7 +684,7 @@ static int hdmi_8998_pll_is_enabled(struct clk_hw *hw)
 
 static const struct clk_ops hdmi_8998_pll_ops = {
 	.set_rate = hdmi_8998_pll_set_clk_rate,
-	.round_rate = hdmi_8998_pll_round_rate,
+	.determine_rate = hdmi_8998_pll_determine_rate,
 	.recalc_rate = hdmi_8998_pll_recalc_rate,
 	.prepare = hdmi_8998_pll_prepare,
 	.unprepare = hdmi_8998_pll_unprepare,

-- 
2.50.1


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

* Re: [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk round_rate() to determine_rate()
  2025-08-10 22:57 [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk round_rate() to determine_rate() Brian Masney
                   ` (6 preceding siblings ...)
  2025-08-10 22:57 ` [PATCH v2 7/7] drm/msm/hdmi_phy_8998: " Brian Masney
@ 2025-08-11  9:02 ` Konrad Dybcio
  2025-08-11 10:32   ` Dmitry Baryshkov
  7 siblings, 1 reply; 24+ messages in thread
From: Konrad Dybcio @ 2025-08-11  9:02 UTC (permalink / raw)
  To: Brian Masney, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
	Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
	Simona Vetter, Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel

On 8/11/25 12:57 AM, 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/msm/dsi/phy subsystem using the Coccinelle semantic
> patch posted below. I did a few minor cosmetic cleanups of the code in a
> few cases.


Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v2 1/7] drm/msm/dsi_phy_10nm: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 1/7] drm/msm/dsi_phy_10nm: convert from " Brian Masney
@ 2025-08-11 10:30   ` Dmitry Baryshkov
  2025-08-11 10:33   ` Konrad Dybcio
  1 sibling, 0 replies; 24+ messages in thread
From: Dmitry Baryshkov @ 2025-08-11 10:30 UTC (permalink / raw)
  To: Brian Masney
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd, linux-clk, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Sun, Aug 10, 2025 at 06:57:25PM -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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---
>  drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
> index af2e30f3f842a0157f161172bfe42059cabe6a8a..ec486ff02c9b5156cdf0902d05464cf57dc9605b 100644
> --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
> +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c
> @@ -444,21 +444,19 @@ static unsigned long dsi_pll_10nm_vco_recalc_rate(struct clk_hw *hw,
>  	return (unsigned long)vco_rate;
>  }
>  
> -static long dsi_pll_10nm_clk_round_rate(struct clk_hw *hw,
> -		unsigned long rate, unsigned long *parent_rate)
> +static int dsi_pll_10nm_clk_determine_rate(struct clk_hw *hw,
> +					   struct clk_rate_request *req)
>  {
>  	struct dsi_pll_10nm *pll_10nm = to_pll_10nm(hw);
>  
> -	if      (rate < pll_10nm->phy->cfg->min_pll_rate)
> -		return  pll_10nm->phy->cfg->min_pll_rate;
> -	else if (rate > pll_10nm->phy->cfg->max_pll_rate)
> -		return  pll_10nm->phy->cfg->max_pll_rate;
> -	else
> -		return rate;
> +	req->rate = clamp_t(unsigned long, req->rate,
> +			    pll_10nm->phy->cfg->min_pll_rate, pll_10nm->phy->cfg->max_pll_rate);

Nit: I'd prefer if there was an EOL after min_pll_rate, but no need to
resend it just for the sake of it.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>



> +
> +	return 0;
>  }
>  
>  static const struct clk_ops clk_ops_dsi_pll_10nm_vco = {
> -	.round_rate = dsi_pll_10nm_clk_round_rate,
> +	.determine_rate = dsi_pll_10nm_clk_determine_rate,
>  	.set_rate = dsi_pll_10nm_vco_set_rate,
>  	.recalc_rate = dsi_pll_10nm_vco_recalc_rate,
>  	.prepare = dsi_pll_10nm_vco_prepare,
> 
> -- 
> 2.50.1
> 

-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 2/7] drm/msm/dsi_phy_14nm: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 2/7] drm/msm/dsi_phy_14nm: " Brian Masney
@ 2025-08-11 10:31   ` Dmitry Baryshkov
  2025-08-11 10:33   ` Konrad Dybcio
  1 sibling, 0 replies; 24+ messages in thread
From: Dmitry Baryshkov @ 2025-08-11 10:31 UTC (permalink / raw)
  To: Brian Masney
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd, linux-clk, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Sun, Aug 10, 2025 at 06:57:26PM -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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---
>  drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 34 +++++++++++++++---------------
>  1 file changed, 17 insertions(+), 17 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk round_rate() to determine_rate()
  2025-08-11  9:02 ` [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk " Konrad Dybcio
@ 2025-08-11 10:32   ` Dmitry Baryshkov
  0 siblings, 0 replies; 24+ messages in thread
From: Dmitry Baryshkov @ 2025-08-11 10:32 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Brian Masney, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
	Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
	Simona Vetter, Maxime Ripard, Stephen Boyd, linux-clk,
	linux-arm-msm, dri-devel, freedreno, linux-kernel

On Mon, Aug 11, 2025 at 11:02:46AM +0200, Konrad Dybcio wrote:
> On 8/11/25 12:57 AM, 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/msm/dsi/phy subsystem using the Coccinelle semantic
> > patch posted below. I did a few minor cosmetic cleanups of the code in a
> > few cases.
> 
> 
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Unfortunately pw-fdo doesn't track series replies. Could you please r-b
patches individually (sorry for the troubles).

-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 3/7] drm/msm/dsi_phy_28nm_8960: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 3/7] drm/msm/dsi_phy_28nm_8960: " Brian Masney
@ 2025-08-11 10:33   ` Dmitry Baryshkov
  2025-08-11 10:33   ` Konrad Dybcio
  1 sibling, 0 replies; 24+ messages in thread
From: Dmitry Baryshkov @ 2025-08-11 10:33 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd, linux-clk, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Sun, Aug 10, 2025 at 06:57:27PM -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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---
>  drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c | 32 ++++++++++++-------------
>  1 file changed, 16 insertions(+), 16 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 7/7] drm/msm/hdmi_phy_8998: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 7/7] drm/msm/hdmi_phy_8998: " Brian Masney
@ 2025-08-11 10:33   ` Konrad Dybcio
  2025-08-11 10:36   ` Dmitry Baryshkov
  1 sibling, 0 replies; 24+ messages in thread
From: Konrad Dybcio @ 2025-08-11 10:33 UTC (permalink / raw)
  To: Brian Masney, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
	Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
	Simona Vetter, Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel

On 8/11/25 12:57 AM, 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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v2 6/7] drm/msm/hdmi_phy_8996: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 6/7] drm/msm/hdmi_phy_8996: " Brian Masney
@ 2025-08-11 10:33   ` Konrad Dybcio
  2025-08-11 10:35   ` Dmitry Baryshkov
  1 sibling, 0 replies; 24+ messages in thread
From: Konrad Dybcio @ 2025-08-11 10:33 UTC (permalink / raw)
  To: Brian Masney, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
	Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
	Simona Vetter, Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel

On 8/11/25 12:57 AM, 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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v2 4/7] drm/msm/dsi_phy_28nm: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 4/7] drm/msm/dsi_phy_28nm: " Brian Masney
@ 2025-08-11 10:33   ` Konrad Dybcio
  2025-08-11 10:35   ` Dmitry Baryshkov
  1 sibling, 0 replies; 24+ messages in thread
From: Konrad Dybcio @ 2025-08-11 10:33 UTC (permalink / raw)
  To: Brian Masney, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
	Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
	Simona Vetter, Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel

On 8/11/25 12:57 AM, 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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v2 3/7] drm/msm/dsi_phy_28nm_8960: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 3/7] drm/msm/dsi_phy_28nm_8960: " Brian Masney
  2025-08-11 10:33   ` Dmitry Baryshkov
@ 2025-08-11 10:33   ` Konrad Dybcio
  1 sibling, 0 replies; 24+ messages in thread
From: Konrad Dybcio @ 2025-08-11 10:33 UTC (permalink / raw)
  To: Brian Masney, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
	Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
	Simona Vetter, Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel

On 8/11/25 12:57 AM, 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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v2 5/7] drm/msm/dsi_phy_7nm: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 5/7] drm/msm/dsi_phy_7nm: " Brian Masney
@ 2025-08-11 10:33   ` Konrad Dybcio
  2025-08-11 10:35   ` Dmitry Baryshkov
  1 sibling, 0 replies; 24+ messages in thread
From: Konrad Dybcio @ 2025-08-11 10:33 UTC (permalink / raw)
  To: Brian Masney, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
	Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
	Simona Vetter, Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel

On 8/11/25 12:57 AM, 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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v2 1/7] drm/msm/dsi_phy_10nm: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 1/7] drm/msm/dsi_phy_10nm: convert from " Brian Masney
  2025-08-11 10:30   ` Dmitry Baryshkov
@ 2025-08-11 10:33   ` Konrad Dybcio
  1 sibling, 0 replies; 24+ messages in thread
From: Konrad Dybcio @ 2025-08-11 10:33 UTC (permalink / raw)
  To: Brian Masney, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
	Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
	Simona Vetter, Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel

On 8/11/25 12:57 AM, 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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v2 2/7] drm/msm/dsi_phy_14nm: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 2/7] drm/msm/dsi_phy_14nm: " Brian Masney
  2025-08-11 10:31   ` Dmitry Baryshkov
@ 2025-08-11 10:33   ` Konrad Dybcio
  1 sibling, 0 replies; 24+ messages in thread
From: Konrad Dybcio @ 2025-08-11 10:33 UTC (permalink / raw)
  To: Brian Masney, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
	Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
	Simona Vetter, Maxime Ripard, Stephen Boyd
  Cc: linux-clk, linux-arm-msm, dri-devel, freedreno, linux-kernel

On 8/11/25 12:57 AM, 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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH v2 4/7] drm/msm/dsi_phy_28nm: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 4/7] drm/msm/dsi_phy_28nm: " Brian Masney
  2025-08-11 10:33   ` Konrad Dybcio
@ 2025-08-11 10:35   ` Dmitry Baryshkov
  1 sibling, 0 replies; 24+ messages in thread
From: Dmitry Baryshkov @ 2025-08-11 10:35 UTC (permalink / raw)
  To: Brian Masney
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd, linux-clk, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Sun, Aug 10, 2025 at 06:57:28PM -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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---
>  drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c | 21 ++++++++++-----------
>  1 file changed, 10 insertions(+), 11 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 5/7] drm/msm/dsi_phy_7nm: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 5/7] drm/msm/dsi_phy_7nm: " Brian Masney
  2025-08-11 10:33   ` Konrad Dybcio
@ 2025-08-11 10:35   ` Dmitry Baryshkov
  1 sibling, 0 replies; 24+ messages in thread
From: Dmitry Baryshkov @ 2025-08-11 10:35 UTC (permalink / raw)
  To: Brian Masney
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd, linux-clk, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Sun, Aug 10, 2025 at 06:57:29PM -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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---
>  drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 6/7] drm/msm/hdmi_phy_8996: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 6/7] drm/msm/hdmi_phy_8996: " Brian Masney
  2025-08-11 10:33   ` Konrad Dybcio
@ 2025-08-11 10:35   ` Dmitry Baryshkov
  1 sibling, 0 replies; 24+ messages in thread
From: Dmitry Baryshkov @ 2025-08-11 10:35 UTC (permalink / raw)
  To: Brian Masney
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd, linux-clk, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Sun, Aug 10, 2025 at 06:57:30PM -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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---
>  drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 16 ++++++----------
>  1 file changed, 6 insertions(+), 10 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 7/7] drm/msm/hdmi_phy_8998: convert from round_rate() to determine_rate()
  2025-08-10 22:57 ` [PATCH v2 7/7] drm/msm/hdmi_phy_8998: " Brian Masney
  2025-08-11 10:33   ` Konrad Dybcio
@ 2025-08-11 10:36   ` Dmitry Baryshkov
  1 sibling, 0 replies; 24+ messages in thread
From: Dmitry Baryshkov @ 2025-08-11 10:36 UTC (permalink / raw)
  To: Brian Masney
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Maxime Ripard, Stephen Boyd, linux-clk, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Sun, Aug 10, 2025 at 06:57:31PM -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. The change to use clamp_t() was
> done manually.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---
>  drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 16 ++++++----------
>  1 file changed, 6 insertions(+), 10 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2025-08-11 10:36 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-10 22:57 [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk round_rate() to determine_rate() Brian Masney
2025-08-10 22:57 ` [PATCH v2 1/7] drm/msm/dsi_phy_10nm: convert from " Brian Masney
2025-08-11 10:30   ` Dmitry Baryshkov
2025-08-11 10:33   ` Konrad Dybcio
2025-08-10 22:57 ` [PATCH v2 2/7] drm/msm/dsi_phy_14nm: " Brian Masney
2025-08-11 10:31   ` Dmitry Baryshkov
2025-08-11 10:33   ` Konrad Dybcio
2025-08-10 22:57 ` [PATCH v2 3/7] drm/msm/dsi_phy_28nm_8960: " Brian Masney
2025-08-11 10:33   ` Dmitry Baryshkov
2025-08-11 10:33   ` Konrad Dybcio
2025-08-10 22:57 ` [PATCH v2 4/7] drm/msm/dsi_phy_28nm: " Brian Masney
2025-08-11 10:33   ` Konrad Dybcio
2025-08-11 10:35   ` Dmitry Baryshkov
2025-08-10 22:57 ` [PATCH v2 5/7] drm/msm/dsi_phy_7nm: " Brian Masney
2025-08-11 10:33   ` Konrad Dybcio
2025-08-11 10:35   ` Dmitry Baryshkov
2025-08-10 22:57 ` [PATCH v2 6/7] drm/msm/hdmi_phy_8996: " Brian Masney
2025-08-11 10:33   ` Konrad Dybcio
2025-08-11 10:35   ` Dmitry Baryshkov
2025-08-10 22:57 ` [PATCH v2 7/7] drm/msm/hdmi_phy_8998: " Brian Masney
2025-08-11 10:33   ` Konrad Dybcio
2025-08-11 10:36   ` Dmitry Baryshkov
2025-08-11  9:02 ` [PATCH v2 0/7] drm/msm/dsi/phy: convert from clk " Konrad Dybcio
2025-08-11 10:32   ` Dmitry Baryshkov

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).