Browse Source

drm/sun4i: hdmi: Fix incorrect assignment in sun4i_tmds_determine_rate

best_div is set to i which corresponds to rate halving when it should be
set to j which corresponds to the divider.

Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support")
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180109020323.11852-3-net147@gmail.com
Jonathan Liu 7 years ago
parent
commit
58faae28f6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c

+ 1 - 1
drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c

@@ -105,7 +105,7 @@ static int sun4i_tmds_determine_rate(struct clk_hw *hw,
 				if (!best_parent || abs(rate - rounded / i) <
 				    abs(rate - best_parent / best_div)) {
 					best_parent = rounded;
-					best_div = i;
+					best_div = j;
 				}
 			}
 		}