diff options
author | Sean Paul <seanpaul@chromium.org> | 2018-02-16 23:47:43 +0300 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2018-02-16 23:47:43 +0300 |
commit | d4da404f36b24b089d20db1fb27d8f99cb66f409 (patch) | |
tree | 349c4b792281826652eb9e6d7a46ed6622dc90de /drivers/gpu/drm/sun4i | |
parent | fa4127c5eb8def998fd8a471d51a4f2560dea0a2 (diff) | |
parent | 933519a5a269d8460450545adefcb5caec622cac (diff) | |
download | linux-d4da404f36b24b089d20db1fb27d8f99cb66f409.tar.xz |
Merge airlied/drm-next into drm-misc-next
Backmerge 4.15 and hdcp topic branch
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/sun4i')
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c index dc332ea56f6c..3ecffa52c814 100644 --- a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c +++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c @@ -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; } } } diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 8416899266cf..0d6c5ed44795 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -913,7 +913,7 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master, has_lvds_alt = false; } else { dev_err(dev, "Couldn't get the LVDS PLL\n"); - return PTR_ERR(tcon->lvds_rst); + return PTR_ERR(tcon->lvds_pll); } } else { has_lvds_alt = true; |