From: Nathan Ciobanu <nathan.d.ciobanu@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: marc.herbert@intel.com, dhinakaran.pandiyan@intel.com,
rodrigo.vivi@intel.com
Subject: [PATCH v4 2/2] drm/i915/dp: Remove unneeded mav_vswing_tries variable
Date: Thu, 19 Jul 2018 11:40:59 -0700 [thread overview]
Message-ID: <1532025659-10325-1-git-send-email-nathan.d.ciobanu@linux.intel.com> (raw)
max_vswing_tries variable was declared as an int but
used as a bool and not even needed because we can
just check the return of intel_dp_link_max_vswing_reached.
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@linux.intel.com>
---
drivers/gpu/drm/i915/intel_dp_link_training.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp_link_training.c b/drivers/gpu/drm/i915/intel_dp_link_training.c
index 05f209f6d73f..ddfdd5d05168 100644
--- a/drivers/gpu/drm/i915/intel_dp_link_training.c
+++ b/drivers/gpu/drm/i915/intel_dp_link_training.c
@@ -129,7 +129,7 @@ static bool intel_dp_link_max_vswing_reached(struct intel_dp *intel_dp)
intel_dp_link_training_clock_recovery(struct intel_dp *intel_dp)
{
uint8_t voltage;
- int voltage_tries, max_vswing_tries, cr_tries, max_cr_tries;
+ int voltage_tries, cr_tries, max_cr_tries;
uint8_t link_config[2];
uint8_t link_bw, rate_select;
@@ -181,7 +181,6 @@ static bool intel_dp_link_max_vswing_reached(struct intel_dp *intel_dp)
max_cr_tries = 80;
voltage_tries = 1;
- max_vswing_tries = 0;
for (cr_tries = 0; cr_tries < max_cr_tries; ++cr_tries) {
uint8_t link_status[DP_LINK_STATUS_SIZE];
@@ -202,11 +201,6 @@ static bool intel_dp_link_max_vswing_reached(struct intel_dp *intel_dp)
return false;
}
- if (max_vswing_tries == 1) {
- DRM_DEBUG_KMS("Max Voltage Swing reached\n");
- return false;
- }
-
voltage = intel_dp->train_set[0] & DP_TRAIN_VOLTAGE_SWING_MASK;
/* Update training set as requested by target */
@@ -222,8 +216,10 @@ static bool intel_dp_link_max_vswing_reached(struct intel_dp *intel_dp)
else
voltage_tries = 1;
- if (intel_dp_link_max_vswing_reached(intel_dp))
- ++max_vswing_tries;
+ if (intel_dp_link_max_vswing_reached(intel_dp)) {
+ DRM_DEBUG_KMS("Max Voltage Swing reached\n");
+ return false;
+ }
}
DRM_ERROR("Failed clock recovery %d times, giving up!\n", max_cr_tries);
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
reply other threads:[~2018-07-19 18:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1532025659-10325-1-git-send-email-nathan.d.ciobanu@linux.intel.com \
--to=nathan.d.ciobanu@linux.intel.com \
--cc=dhinakaran.pandiyan@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=marc.herbert@intel.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).