aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <[email protected]>2019-01-30 20:13:59 +0200
committerVille Syrjälä <[email protected]>2019-01-31 09:46:02 +0200
commit8aae2b1cdf4452817943741ed792068b18191465 (patch)
tree22dd6ef82b76b95ce3f0f1edb1efba27dfa295ec
parentad3e7b824c185125f281d56a9e8f614effcdae91 (diff)
drm/i915: Pick the first unused PLL once again
commit 5b0bd14dcc6b ("drm/i915/icl: keep track of unused pll while looping") inadvertently (I presume) changed the code to pick the last unused dpll rather than the first unused one like we did before. While there should most likely be no harm in changing the order let's change back just to avoid a change in the behaviour. At least it might reduce the confusion when staring at logs (took me a while to figure out why DPLL1 being picked over DPLL0 when the latter was most definitely available). Cc: Lucas De Marchi <[email protected]> Cc: Paulo Zanoni <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Paulo Zanoni <[email protected]> Acked-by: Lucas De Marchi <[email protected]>
-rw-r--r--drivers/gpu/drm/i915/intel_dpll_mgr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c b/drivers/gpu/drm/i915/intel_dpll_mgr.c
index 8f70838ac7d8..0a42d11c4c33 100644
--- a/drivers/gpu/drm/i915/intel_dpll_mgr.c
+++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c
@@ -258,7 +258,8 @@ intel_find_shared_dpll(struct intel_crtc *crtc,
/* Only want to check enabled timings first */
if (shared_dpll[i].crtc_mask == 0) {
- unused_pll = pll;
+ if (!unused_pll)
+ unused_pll = pll;
continue;
}