From: Nathan Ciobanu <nathan.d.ciobanu@linux.intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Marc Herbert <marc.herbert@intel.com>,
Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Subject: Re: [PATCH v5 2/2] drm/i915/dp: Refactor mav_vswing_tries variable
Date: Fri, 20 Jul 2018 11:27:38 -0700 [thread overview]
Message-ID: <20180720182738.GA18776@nc-new> (raw)
In-Reply-To: <20180720101902.GL5565@intel.com>
On Fri, Jul 20, 2018 at 01:19:02PM +0300, Ville Syrjälä wrote:
> On Thu, Jul 19, 2018 at 02:48:07PM -0700, Nathan Ciobanu wrote:
> > Changes the type and renames the max_vswing_tries variable
> > which was declared as an integer but used as a boolean
> > making it easy to be confused with a counter.
> >
> > Changes in v2:
> > - updated the title and commit message
> > - left the loop exit point in place
> >
> > 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 | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp_link_training.c b/drivers/gpu/drm/i915/intel_dp_link_training.c
> > index 7903de7a54c9..ec5f2bb55c9a 100644
> > --- a/drivers/gpu/drm/i915/intel_dp_link_training.c
> > +++ b/drivers/gpu/drm/i915/intel_dp_link_training.c
> > @@ -129,7 +129,8 @@ 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;
> > + bool max_vswing = false;
>
> max_vswing_reached?
Ok, I renamed it and resent the patch. Thanks,
Nathan
>
> > uint8_t link_config[2];
> > uint8_t link_bw, rate_select;
> >
> > @@ -181,7 +182,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,7 +202,7 @@ static bool intel_dp_link_max_vswing_reached(struct intel_dp *intel_dp)
> > return false;
> > }
> >
> > - if (max_vswing_tries == 1) {
> > + if (max_vswing) {
> > DRM_DEBUG_KMS("Max Voltage Swing reached\n");
> > return false;
> > }
> > @@ -223,7 +223,7 @@ static bool intel_dp_link_max_vswing_reached(struct intel_dp *intel_dp)
> > voltage_tries = 1;
> >
> > if (intel_dp_link_max_vswing_reached(intel_dp))
> > - ++max_vswing_tries;
> > + max_vswing = true;
> >
> > }
> > 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
>
> --
> Ville Syrjälä
> Intel
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-07-20 18:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-19 21:48 [PATCH v5 2/2] drm/i915/dp: Refactor mav_vswing_tries variable Nathan Ciobanu
2018-07-20 0:07 ` [PATCH v5] drm/i915/dp: Refactor max_vswing_tries variable Nathan Ciobanu
2018-07-20 0:29 ` ✗ Fi.CI.BAT: failure for series starting with [v5,2/2] drm/i915/dp: Refactor mav_vswing_tries variable (rev2) Patchwork
2018-07-20 10:19 ` [PATCH v5 2/2] drm/i915/dp: Refactor mav_vswing_tries variable Ville Syrjälä
2018-07-20 18:27 ` Nathan Ciobanu [this message]
2018-07-20 18:23 ` [PATCH v5] drm/i915/dp: Refactor max_vswing_tries variable Nathan Ciobanu
2018-07-20 19:12 ` Rodrigo Vivi
2018-07-20 19:16 ` ✗ Fi.CI.BAT: failure for series starting with [v5] drm/i915/dp: Refactor max_vswing_tries variable (rev3) Patchwork
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=20180720182738.GA18776@nc-new \
--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 \
--cc=ville.syrjala@linux.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).