Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75f195f4 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-fixes-2018-01-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

Final 4.15 drm-misc pull:

Just 3 sun4i patches to fix clock computation/checks.

* tag 'drm-misc-fixes-2018-01-17' of git://anongit.freedesktop.org/drm/drm-misc:
  drm/sun4i: hdmi: Add missing rate halving check in sun4i_tmds_determine_rate
  drm/sun4i: hdmi: Fix incorrect assignment in sun4i_tmds_determine_rate
  drm/sun4i: hdmi: Check for unset best_parent in sun4i_tmds_determine_rate
parents 894219d7 3b9c57ce
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -102,10 +102,13 @@ static int sun4i_tmds_determine_rate(struct clk_hw *hw,
					goto out;
				}

				if (abs(rate - rounded / i) <
				    abs(rate - best_parent / best_div)) {
				if (!best_parent ||
				    abs(rate - rounded / i / j) <
				    abs(rate - best_parent / best_half /
					best_div)) {
					best_parent = rounded;
					best_div = i;
					best_half = i;
					best_div = j;
				}
			}
		}