Skip to content

Commit d968fda

Browse files
lumagbebarino
authored andcommitted
clk: qcom: clk-rcg2: fix gfx3d frequency calculation
Since the commit 948fb09 ("clk: Always clamp the rounded rate"), the clk_core_determine_round_nolock() would clamp the requested rate between min and max rates from the rate request. Normally these fields would be filled by clk_core_get_boundaries() called from clk_round_rate(). However clk_gfx3d_determine_rate() uses a manually crafted rate request, which did not have these fields filled. Thus the requested frequency would be clamped to 0, resulting in weird frequencies being requested from the hardware. Fix this by filling min_rate and max_rate to the values valid for the respective PLLs (0 and ULONG_MAX). Fixes: 948fb09 ("clk: Always clamp the rounded rate") Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bjorn Andersson <[email protected]> Reported-by: Rob Clark <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 37843d0 commit d968fda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/qcom/clk-rcg2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ EXPORT_SYMBOL_GPL(clk_pixel_ops);
818818
static int clk_gfx3d_determine_rate(struct clk_hw *hw,
819819
struct clk_rate_request *req)
820820
{
821-
struct clk_rate_request parent_req = { };
821+
struct clk_rate_request parent_req = { .min_rate = 0, .max_rate = ULONG_MAX };
822822
struct clk_rcg2_gfx3d *cgfx = to_clk_rcg2_gfx3d(hw);
823823
struct clk_hw *xo, *p0, *p1, *p2;
824824
unsigned long p0_rate;

0 commit comments

Comments
 (0)