Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/pl111: convert from round_rate() to determine_rate()

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.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Link: https://lore.kernel.org/r/20250811-drm-clk-round-rate-v2-5-4a91ccf239cf@redhat.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>

authored by

Brian Masney and committed by
Raphael Gallais-Pou
b1a122f4 a3e12b9c

+8 -5
+8 -5
drivers/gpu/drm/pl111/pl111_display.c
··· 473 473 return best_div; 474 474 } 475 475 476 - static long pl111_clk_div_round_rate(struct clk_hw *hw, unsigned long rate, 477 - unsigned long *prate) 476 + static int pl111_clk_div_determine_rate(struct clk_hw *hw, 477 + struct clk_rate_request *req) 478 478 { 479 - int div = pl111_clk_div_choose_div(hw, rate, prate, true); 479 + int div = pl111_clk_div_choose_div(hw, req->rate, 480 + &req->best_parent_rate, true); 480 481 481 - return DIV_ROUND_UP_ULL(*prate, div); 482 + req->rate = DIV_ROUND_UP_ULL(req->best_parent_rate, div); 483 + 484 + return 0; 482 485 } 483 486 484 487 static unsigned long pl111_clk_div_recalc_rate(struct clk_hw *hw, ··· 531 528 532 529 static const struct clk_ops pl111_clk_div_ops = { 533 530 .recalc_rate = pl111_clk_div_recalc_rate, 534 - .round_rate = pl111_clk_div_round_rate, 531 + .determine_rate = pl111_clk_div_determine_rate, 535 532 .set_rate = pl111_clk_div_set_rate, 536 533 }; 537 534