drm/msm/dsi: pll_7nm: remove unsupported dividers for DSI pixel clock
PATCH 1/1 drm/msm/dsi: pll_7nm: remove unsupported dividers for DSI pixel clock
Remove dividers that are not recommended for DSI DPHY mode when setting up the clock tree for the DSI pixel clock.
--- drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c +4 -6
@@ -586,7 +586,7 @@ static int dsi_7nm_set_usecase(struct msm_dsi_phy *phy)static int pll_7nm_register (struct dsi_pll_7nm *pll_7nm,struct clk_hw **provided_clocks) {char clk_name[32 ], parent[32 ], vco_name[32 ]; -char parent2[32 ], parent3[32 ], parent4[32 ]; +char parent2[32 ];struct clk_init_data vco_init = { .parent_data = &(const struct clk_parent_data ) { .fw_name ="ref" ,
@@ -687,15 +687,13 @@ static int pll_7nm_register(struct dsi_pll_7nm *pll_7nm, struct clk_hw **providesnprintf (clk_name,32 ,"dsi%d_pclk_mux" , pll_7nm->phy->id);snprintf (parent,32 ,"dsi%d_pll_bit_clk" , pll_7nm->phy->id);snprintf (parent2,32 ,"dsi%d_pll_by_2_bit_clk" , pll_7nm->phy->id); -snprintf (parent3,32 ,"dsi%d_pll_out_div_clk" , pll_7nm->phy->id); -snprintf (parent4,32 ,"dsi%d_pll_post_out_div_clk" , pll_7nm->phy->id); hw =devm_clk_hw_register_mux (dev, clk_name, ((const char *[]){ - parent, parent2, parent3, parent4 - }),4 ,0 , pll_7nm->phy->base + + parent, parent2, + }),2 ,0 , pll_7nm->phy->base + REG_DSI_7nm_PHY_CMN_CLK_CFG1, -0 ,2 ,0 ,NULL ); +0 ,1 ,0 ,NULL );if (IS_ERR (hw)) { ret =PTR_ERR (hw); goto fail;
Signature · 1 line
2.35.1
Quoting Dmitry Baryshkov (2022-05-01 12:56:20)
Quoted 1 line
Remove dividers that are not recommended for DSI DPHY mode when setting
Is "DPHY" intentional or just "PHY" should be here?
Quoted 4 lines
up the clock tree for the DSI pixel clock.
Signed-off-by Dmitry Baryshkov <[email protected]>---
Quoted 13 lines
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c +0
-2@@ -687,15 +687,13 @@ static int pll_7nm_register(struct dsi_pll_7nm *pll_7nm, struct clk_hw **providesnprintf (clk_name,32 ,"dsi%d_pclk_mux" , pll_7nm->phy->id);snprintf (parent,32 ,"dsi%d_pll_bit_clk" , pll_7nm->phy->id);snprintf (parent2,32 ,"dsi%d_pll_by_2_bit_clk" , pll_7nm->phy->id); -snprintf (parent3,32 ,"dsi%d_pll_out_div_clk" , pll_7nm->phy->id); -snprintf (parent4,32 ,"dsi%d_pll_post_out_div_clk" , pll_7nm->phy->id);
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c static int pll_7nm_register(struct dsi_pll_7nm *pll_7nm, struct clk_hw **provide · line 696
Quoted 10 lines
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c +3
-3hw =devm_clk_hw_register_mux (dev, clk_name, ((const char *[]){ - parent, parent2, parent3, parent4 - }),4 ,0 , pll_7nm->phy->base + + parent, parent2, + }),2 ,0 , pll_7nm->phy->base + REG_DSI_7nm_PHY_CMN_CLK_CFG1, -0 ,2 ,0 ,NULL ); +0 ,1 ,0 ,NULL );
Can you followup with a patch to move to clk_parent_data instead of strings?
Marijn Suijten
reviewerQuoted 26 lines · Stephen Boyd
Quoting Dmitry Baryshkov (2022-05-01 12:56:20)
Quoted 1 line
Remove dividers that are not recommended for DSI DPHY mode when setting
Is "DPHY" intentional or just "PHY" should be here?
Quoted 4 lines
up the clock tree for the DSI pixel clock.
Signed-off-by Dmitry Baryshkov <[email protected]>---
Reviewed-by Stephen Boyd <[email protected]>Quoted 14 lines
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c +0
-2@@ -687,15 +687,13 @@ static int pll_7nm_register(struct dsi_pll_7nm *pll_7nm, struct clk_hw **providesnprintf (clk_name,32 ,"dsi%d_pclk_mux" , pll_7nm->phy->id);snprintf (parent,32 ,"dsi%d_pll_bit_clk" , pll_7nm->phy->id);snprintf (parent2,32 ,"dsi%d_pll_by_2_bit_clk" , pll_7nm->phy->id); -snprintf (parent3,32 ,"dsi%d_pll_out_div_clk" , pll_7nm->phy->id); -snprintf (parent4,32 ,"dsi%d_pll_post_out_div_clk" , pll_7nm->phy->id);
Quoted 12 lines
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c static int pll_7nm_register(struct dsi_pll_7nm *pll_7nm, struct clk_hw **provide · line 696
Quoted 9 lines
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c +3
-3hw =devm_clk_hw_register_mux (dev, clk_name, ((const char *[]){ - parent, parent2, parent3, parent4 - }),4 ,0 , pll_7nm->phy->base + + parent, parent2, + }),2 ,0 , pll_7nm->phy->base + REG_DSI_7nm_PHY_CMN_CLK_CFG1, -0 ,2 ,0 ,NULL ); +0 ,1 ,0 ,NULL );Can you followup with a patch to move to
clk_parent_datainstead of strings?
Dmitry and I discussed this a while ago, and I actually have patches in progress converting this. Dmitry, if you haven't started on the conversion yet, perhaps it's efficient if I respin my efforts and submit them soon?
- Marijn
Quoted 40 lines · Marijn Suijten
Quoted 26 lines · Stephen Boyd
Quoting Dmitry Baryshkov (2022-05-01 12:56:20)
Quoted 1 line
Remove dividers that are not recommended for DSI DPHY mode when setting
Is "DPHY" intentional or just "PHY" should be here?
Quoted 4 lines
up the clock tree for the DSI pixel clock.
Signed-off-by Dmitry Baryshkov <[email protected]>---
Reviewed-by Stephen Boyd <[email protected]>Quoted 14 lines
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c +0
-2@@ -687,15 +687,13 @@ static int pll_7nm_register(struct dsi_pll_7nm *pll_7nm, struct clk_hw **providesnprintf (clk_name,32 ,"dsi%d_pclk_mux" , pll_7nm->phy->id);snprintf (parent,32 ,"dsi%d_pll_bit_clk" , pll_7nm->phy->id);snprintf (parent2,32 ,"dsi%d_pll_by_2_bit_clk" , pll_7nm->phy->id); -snprintf (parent3,32 ,"dsi%d_pll_out_div_clk" , pll_7nm->phy->id); -snprintf (parent4,32 ,"dsi%d_pll_post_out_div_clk" , pll_7nm->phy->id);Quoted 12 lines
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c static int pll_7nm_register(struct dsi_pll_7nm *pll_7nm, struct clk_hw **provide · line 696
Quoted 9 lines
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c +3
-3hw =devm_clk_hw_register_mux (dev, clk_name, ((const char *[]){ - parent, parent2, parent3, parent4 - }),4 ,0 , pll_7nm->phy->base + + parent, parent2, + }),2 ,0 , pll_7nm->phy->base + REG_DSI_7nm_PHY_CMN_CLK_CFG1, -0 ,2 ,0 ,NULL ); +0 ,1 ,0 ,NULL );Can you followup with a patch to move to
clk_parent_datainstead of strings?
Quoted 4 lines
Dmitry and I discussed this a while ago, and I actually have patches in progress converting this. Dmitry, if you haven't started on the conversion yet, perhaps it's efficient if I respin my efforts and submit them soon?
Yes, please. I'm under the pile of other things. Your patches will be appreciated. You don't have to convert all PHYs at once.
Signature · 2 lines
With best wishes Dmitry
Marijn Suijten
reviewerQuoted 41 lines · Dmitry Baryshkov
Quoted 40 lines · Marijn Suijten
Quoted 38 lines · Stephen Boyd
Quoting Dmitry Baryshkov (2022-05-01 12:56:20)
Quoted 1 line
Remove dividers that are not recommended for DSI DPHY mode when setting
Is "DPHY" intentional or just "PHY" should be here?
Quoted 4 lines
up the clock tree for the DSI pixel clock.
Signed-off-by Dmitry Baryshkov <[email protected]>---
Reviewed-by Stephen Boyd <[email protected]>Quoted 13 lines
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c +0
-2@@ -687,15 +687,13 @@ static int pll_7nm_register(struct dsi_pll_7nm *pll_7nm, struct clk_hw **providesnprintf (clk_name,32 ,"dsi%d_pclk_mux" , pll_7nm->phy->id);snprintf (parent,32 ,"dsi%d_pll_bit_clk" , pll_7nm->phy->id);snprintf (parent2,32 ,"dsi%d_pll_by_2_bit_clk" , pll_7nm->phy->id); -snprintf (parent3,32 ,"dsi%d_pll_out_div_clk" , pll_7nm->phy->id); -snprintf (parent4,32 ,"dsi%d_pll_post_out_div_clk" , pll_7nm->phy->id);drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c static int pll_7nm_register(struct dsi_pll_7nm *pll_7nm, struct clk_hw **provide · line 696
Quoted 10 lines
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c +3
-3hw =devm_clk_hw_register_mux (dev, clk_name, ((const char *[]){ - parent, parent2, parent3, parent4 - }),4 ,0 , pll_7nm->phy->base + + parent, parent2, + }),2 ,0 , pll_7nm->phy->base + REG_DSI_7nm_PHY_CMN_CLK_CFG1, -0 ,2 ,0 ,NULL ); +0 ,1 ,0 ,NULL );Can you followup with a patch to move to
clk_parent_datainstead of strings?
Quoted 7 lines
Quoted 4 lines
Dmitry and I discussed this a while ago, and I actually have patches in progress converting this. Dmitry, if you haven't started on the conversion yet, perhaps it's efficient if I respin my efforts and submit them soon?
Yes, please. I'm under the pile of other things. Your patches will be appreciated. You don't have to convert all PHYs at once.
Holding to my promise, the patches are now available on the lists:
https://lore.kernel.org/linux-arm-msm/[email protected]/T/#t
It was more convenient to convert the remaining PHYs on top of the 14/28nm I had already done, it's mostly trivial work anyway.
- Marijn