[Intel-gfx] [PATCH 12/22] drm/i915: Make the link training test for same voltage smaller
Ander Conselvan de Oliveira
ander.conselvan.de.oliveira at intel.com
Fri Oct 23 03:01:55 PDT 2015
It makes it slightly easier to read.
v2: Add missing word in patch title. (Ander)
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
---
drivers/gpu/drm/i915/intel_dp_link_training.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp_link_training.c b/drivers/gpu/drm/i915/intel_dp_link_training.c
index 9f47d8e..0da2133 100644
--- a/drivers/gpu/drm/i915/intel_dp_link_training.c
+++ b/drivers/gpu/drm/i915/intel_dp_link_training.c
@@ -187,14 +187,13 @@ clock_recovery_voltage_step(struct intel_dp *intel_dp)
break;
/* Check to see if we've tried the same voltage 5 times */
- if (intel_dp_get_train_voltage(intel_dp) == voltage) {
- ++voltage_tries;
- if (voltage_tries == 5) {
- DRM_ERROR("too many voltage retries, give up\n");
- break;
- }
- } else
+ if (intel_dp_get_train_voltage(intel_dp) != voltage) {
voltage_tries = 0;
+ } else if (++voltage_tries == 5) {
+ DRM_ERROR("too many voltage retries, give up\n");
+ break;
+ }
+
voltage = intel_dp_get_train_voltage(intel_dp);
/* Update training set as requested by target */
--
2.4.3
More information about the Intel-gfx
mailing list