Skip to content

Commit 615a292

Browse files
lumagandersson
authored andcommitted
clk: qcom: dispcc-sm8650: fix DisplayPort clocks
On SM8650 DisplayPort link clocks use frequency tables inherited from the vendor kernel, it is not applicable in the upstream kernel. Drop frequency tables and use clk_byte2_ops for those clocks. This fixes frequency selection in the OPP core (which otherwise attempts to use invalid 810 KHz as DP link rate), also fixing the following message: msm-dp-display af54000.displayport-controller: _opp_config_clk_single: failed to set clock rate: -22 Fixes: 9e939f0 ("clk: qcom: add the SM8650 Display Clock Controller driver") Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20240424-dispcc-dp-clocks-v2-4-b44038f3fa96@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent e90b513 commit 615a292

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

drivers/clk/qcom/dispcc-sm8650.c

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -343,26 +343,17 @@ static struct clk_rcg2 disp_cc_mdss_dptx0_aux_clk_src = {
343343
},
344344
};
345345

346-
static const struct freq_tbl ftbl_disp_cc_mdss_dptx0_link_clk_src[] = {
347-
F(162000, P_DP0_PHY_PLL_LINK_CLK, 1, 0, 0),
348-
F(270000, P_DP0_PHY_PLL_LINK_CLK, 1, 0, 0),
349-
F(540000, P_DP0_PHY_PLL_LINK_CLK, 1, 0, 0),
350-
F(810000, P_DP0_PHY_PLL_LINK_CLK, 1, 0, 0),
351-
{ }
352-
};
353-
354346
static struct clk_rcg2 disp_cc_mdss_dptx0_link_clk_src = {
355347
.cmd_rcgr = 0x8170,
356348
.mnd_width = 0,
357349
.hid_width = 5,
358350
.parent_map = disp_cc_parent_map_7,
359-
.freq_tbl = ftbl_disp_cc_mdss_dptx0_link_clk_src,
360351
.clkr.hw.init = &(const struct clk_init_data) {
361352
.name = "disp_cc_mdss_dptx0_link_clk_src",
362353
.parent_data = disp_cc_parent_data_7,
363354
.num_parents = ARRAY_SIZE(disp_cc_parent_data_7),
364355
.flags = CLK_SET_RATE_PARENT,
365-
.ops = &clk_rcg2_ops,
356+
.ops = &clk_byte2_ops,
366357
},
367358
};
368359

@@ -416,13 +407,12 @@ static struct clk_rcg2 disp_cc_mdss_dptx1_link_clk_src = {
416407
.mnd_width = 0,
417408
.hid_width = 5,
418409
.parent_map = disp_cc_parent_map_3,
419-
.freq_tbl = ftbl_disp_cc_mdss_dptx0_link_clk_src,
420410
.clkr.hw.init = &(const struct clk_init_data) {
421411
.name = "disp_cc_mdss_dptx1_link_clk_src",
422412
.parent_data = disp_cc_parent_data_3,
423413
.num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
424414
.flags = CLK_SET_RATE_PARENT,
425-
.ops = &clk_rcg2_ops,
415+
.ops = &clk_byte2_ops,
426416
},
427417
};
428418

@@ -476,13 +466,12 @@ static struct clk_rcg2 disp_cc_mdss_dptx2_link_clk_src = {
476466
.mnd_width = 0,
477467
.hid_width = 5,
478468
.parent_map = disp_cc_parent_map_3,
479-
.freq_tbl = ftbl_disp_cc_mdss_dptx0_link_clk_src,
480469
.clkr.hw.init = &(const struct clk_init_data) {
481470
.name = "disp_cc_mdss_dptx2_link_clk_src",
482471
.parent_data = disp_cc_parent_data_3,
483472
.num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
484473
.flags = CLK_SET_RATE_PARENT,
485-
.ops = &clk_rcg2_ops,
474+
.ops = &clk_byte2_ops,
486475
},
487476
};
488477

@@ -536,13 +525,12 @@ static struct clk_rcg2 disp_cc_mdss_dptx3_link_clk_src = {
536525
.mnd_width = 0,
537526
.hid_width = 5,
538527
.parent_map = disp_cc_parent_map_3,
539-
.freq_tbl = ftbl_disp_cc_mdss_dptx0_link_clk_src,
540528
.clkr.hw.init = &(const struct clk_init_data) {
541529
.name = "disp_cc_mdss_dptx3_link_clk_src",
542530
.parent_data = disp_cc_parent_data_3,
543531
.num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
544532
.flags = CLK_SET_RATE_PARENT,
545-
.ops = &clk_rcg2_ops,
533+
.ops = &clk_byte2_ops,
546534
},
547535
};
548536

0 commit comments

Comments
 (0)