All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [PATCH v1½ 12/13] drm/i915/dp: localize link rate index variable more
Date: Thu, 26 Jan 2017 21:44:26 +0200	[thread overview]
Message-ID: <390d92075db419b587a560f2a56eb4112ebfd4ea.1485459621.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1485459621.git.jani.nikula@intel.com>
In-Reply-To: <cover.1485459621.git.jani.nikula@intel.com>

Localize link_rate_index to the if block, and rename to just index to
reduce indent.

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 7704d32286a3..429dc70c251a 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1639,7 +1639,6 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 	/* Conveniently, the link BW constants become indices with a shift...*/
 	int min_clock = 0;
 	int max_clock;
-	int link_rate_index;
 	int bpp, mode_rate;
 	int link_avail, link_clock;
 	const int *common_rates = intel_dp->common_rates;
@@ -1684,11 +1683,13 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 
 	/* Use values requested by Compliance Test Request */
 	if (intel_dp->compliance.test_type == DP_TEST_LINK_TRAINING) {
-		link_rate_index = intel_dp_find_rate(intel_dp->common_rates,
-						     intel_dp->num_common_rates,
-						     intel_dp->compliance.test_link_rate);
-		if (link_rate_index >= 0)
-			min_clock = max_clock = link_rate_index;
+		int index;
+
+		index = intel_dp_find_rate(intel_dp->common_rates,
+					   intel_dp->num_common_rates,
+					   intel_dp->compliance.test_link_rate);
+		if (index >= 0)
+			min_clock = max_clock = index;
 		min_lane_count = max_lane_count = intel_dp->compliance.test_lane_count;
 	}
 	DRM_DEBUG_KMS("DP link computation with max lane count %i "
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-01-26 19:45 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 19:44 [PATCH v1½ 00/13] drm/i915/dp: link rate and lane count refactoring Jani Nikula
2017-01-26 19:44 ` [PATCH v1½ 01/13] drm/i915/dp: use known correct array size in rate_to_index Jani Nikula
2017-01-26 19:44 ` [PATCH v1½ 02/13] drm/i915/dp: return errors from rate_to_index() Jani Nikula
2017-01-26 19:44 ` [PATCH v1½ 03/13] drm/i915/dp: rename rate_to_index() to intel_dp_find_rate() and reuse Jani Nikula
2017-02-01 21:46   ` Pandiyan, Dhinakaran
2017-02-02  8:44     ` Jani Nikula
2017-02-07 18:38       ` Pandiyan, Dhinakaran
2017-01-26 19:44 ` [PATCH v1½ 04/13] drm/i915/dp: cache source rates at init Jani Nikula
2017-01-26 19:44 ` [PATCH v1½ 05/13] drm/i915/dp: generate and cache sink rate array for all DP, not just eDP 1.4 Jani Nikula
2017-01-27 17:28   ` Ville Syrjälä
2017-01-27 19:52     ` Jani Nikula
2017-01-27 20:00       ` Ville Syrjälä
2017-01-28 10:16   ` [PATCH v2] " Jani Nikula
2017-01-26 19:44 ` [PATCH v1½ 06/13] drm/i915/dp: use the sink rates array for max sink rates Jani Nikula
2017-01-26 19:44 ` [PATCH v1½ 07/13] drm/i915/dp: cache common rates with " Jani Nikula
2017-02-01 22:08   ` Pandiyan, Dhinakaran
2017-02-02  8:38     ` Jani Nikula
2017-01-26 19:44 ` [PATCH v1½ 08/13] drm/i915/dp: do not limit rate seek when not needed Jani Nikula
2017-01-26 19:44 ` [PATCH v1½ 09/13] drm/i915/dp: don't call the link parameters sink parameters Jani Nikula
2017-01-26 19:44 ` [PATCH v1½ 10/13] drm/i915/dp: add functions for max common link rate and lane count Jani Nikula
2017-01-26 19:44 ` [PATCH v1½ 11/13] drm/i915/mst: use max link not sink " Jani Nikula
2017-01-26 19:44 ` Jani Nikula [this message]
2017-02-02  2:54   ` [PATCH v1½ 12/13] drm/i915/dp: localize link rate index variable more Manasi Navare
2017-02-02  8:42     ` Jani Nikula
2017-02-02 17:29       ` Manasi Navare
2017-02-03 14:11         ` Jani Nikula
2017-01-26 19:44 ` [PATCH v1½ 13/13] drm/i915/dp: use readb and writeb calls for single byte DPCD access Jani Nikula
2017-02-01 19:04 ` [PATCH v1½ 00/13] drm/i915/dp: link rate and lane count refactoring Pandiyan, Dhinakaran
2017-02-01 19:40 ` Manasi Navare
2017-02-02 19:01   ` Manasi Navare
2017-02-03 14:16     ` Jani Nikula

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=390d92075db419b587a560f2a56eb4112ebfd4ea.1485459621.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.