Skip to content

Commit e90b513

Browse files
lumagandersson
authored andcommitted
clk: qcom: dispcc-sm8550: fix DisplayPort clocks
On SM8550 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 ae90000.displayport-controller: _opp_config_clk_single: failed to set clock rate: -22 Fixes: 90114ca ("clk: qcom: add SM8550 DISPCC driver") Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-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-3-b44038f3fa96@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 1113501 commit e90b513

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

drivers/clk/qcom/dispcc-sm8550.c

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

348-
static const struct freq_tbl ftbl_disp_cc_mdss_dptx0_link_clk_src[] = {
349-
F(162000, P_DP0_PHY_PLL_LINK_CLK, 1, 0, 0),
350-
F(270000, P_DP0_PHY_PLL_LINK_CLK, 1, 0, 0),
351-
F(540000, P_DP0_PHY_PLL_LINK_CLK, 1, 0, 0),
352-
F(810000, P_DP0_PHY_PLL_LINK_CLK, 1, 0, 0),
353-
{ }
354-
};
355-
356348
static struct clk_rcg2 disp_cc_mdss_dptx0_link_clk_src = {
357349
.cmd_rcgr = 0x8170,
358350
.mnd_width = 0,
359351
.hid_width = 5,
360352
.parent_map = disp_cc_parent_map_7,
361-
.freq_tbl = ftbl_disp_cc_mdss_dptx0_link_clk_src,
362353
.clkr.hw.init = &(struct clk_init_data) {
363354
.name = "disp_cc_mdss_dptx0_link_clk_src",
364355
.parent_data = disp_cc_parent_data_7,
365356
.num_parents = ARRAY_SIZE(disp_cc_parent_data_7),
366357
.flags = CLK_SET_RATE_PARENT,
367-
.ops = &clk_rcg2_ops,
358+
.ops = &clk_byte2_ops,
368359
},
369360
};
370361

@@ -418,13 +409,12 @@ static struct clk_rcg2 disp_cc_mdss_dptx1_link_clk_src = {
418409
.mnd_width = 0,
419410
.hid_width = 5,
420411
.parent_map = disp_cc_parent_map_3,
421-
.freq_tbl = ftbl_disp_cc_mdss_dptx0_link_clk_src,
422412
.clkr.hw.init = &(struct clk_init_data) {
423413
.name = "disp_cc_mdss_dptx1_link_clk_src",
424414
.parent_data = disp_cc_parent_data_3,
425415
.num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
426416
.flags = CLK_SET_RATE_PARENT,
427-
.ops = &clk_rcg2_ops,
417+
.ops = &clk_byte2_ops,
428418
},
429419
};
430420

@@ -478,13 +468,12 @@ static struct clk_rcg2 disp_cc_mdss_dptx2_link_clk_src = {
478468
.mnd_width = 0,
479469
.hid_width = 5,
480470
.parent_map = disp_cc_parent_map_3,
481-
.freq_tbl = ftbl_disp_cc_mdss_dptx0_link_clk_src,
482471
.clkr.hw.init = &(struct clk_init_data) {
483472
.name = "disp_cc_mdss_dptx2_link_clk_src",
484473
.parent_data = disp_cc_parent_data_3,
485474
.num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
486475
.flags = CLK_SET_RATE_PARENT,
487-
.ops = &clk_rcg2_ops,
476+
.ops = &clk_byte2_ops,
488477
},
489478
};
490479

@@ -538,13 +527,12 @@ static struct clk_rcg2 disp_cc_mdss_dptx3_link_clk_src = {
538527
.mnd_width = 0,
539528
.hid_width = 5,
540529
.parent_map = disp_cc_parent_map_3,
541-
.freq_tbl = ftbl_disp_cc_mdss_dptx0_link_clk_src,
542530
.clkr.hw.init = &(struct clk_init_data) {
543531
.name = "disp_cc_mdss_dptx3_link_clk_src",
544532
.parent_data = disp_cc_parent_data_3,
545533
.num_parents = ARRAY_SIZE(disp_cc_parent_data_3),
546534
.flags = CLK_SET_RATE_PARENT,
547-
.ops = &clk_rcg2_ops,
535+
.ops = &clk_byte2_ops,
548536
},
549537
};
550538

0 commit comments

Comments
 (0)