mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
video: rockchip: dw_mipi_dsi: Fix best_rate calculation
pllref_clk is unused after being retrieved. fin needs to be set to dsi->ref clock's rate for the following calculation to work. Otherwise fin is undefined, and calculation return bogus number based on undefined variable. Signed-off-by: Ondrej Jirman <megi@xff.cz>
This commit is contained in:
committed by
Anatolij Gustschin
parent
4158d7f987
commit
dc3f2403c2
@@ -505,7 +505,6 @@ dw_mipi_dsi_get_lane_mbps(void *priv_data, struct display_timing *timings,
|
||||
unsigned int _prediv, best_prediv;
|
||||
unsigned long _fbdiv, best_fbdiv;
|
||||
unsigned long min_delta = ULONG_MAX;
|
||||
unsigned int pllref_clk;
|
||||
|
||||
bpp = mipi_dsi_pixel_format_to_bpp(format);
|
||||
if (bpp < 0) {
|
||||
@@ -537,7 +536,7 @@ dw_mipi_dsi_get_lane_mbps(void *priv_data, struct display_timing *timings,
|
||||
return 0;
|
||||
}
|
||||
|
||||
pllref_clk = clk_get_rate(dsi->ref);
|
||||
fin = clk_get_rate(dsi->ref);
|
||||
fout = target_mbps * USEC_PER_SEC;
|
||||
|
||||
/* constraint: 5Mhz <= Fref / N <= 40MHz */
|
||||
|
||||
Reference in New Issue
Block a user