mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: Dave Airlie <airlied@redhat.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org,
	Keith Packard <keithp@keithp.com>
Subject: [PATCH 3/5] drm/i915: In intel_dp_init, replace read of DPCD with intel_dp_get_dpcd
Date: Mon, 25 Jul 2011 23:36:32 -0700	[thread overview]
Message-ID: <1311662194-4050-4-git-send-email-keithp@keithp.com> (raw)
In-Reply-To: <1311662194-4050-1-git-send-email-keithp@keithp.com>

Eliminates an open-coded read and also gains the retry behaviour of
intel_dp_get_dpcd, which seems like a good idea.

Signed-off-by: Keith Packard <keithp@keithp.com>
---
 drivers/gpu/drm/i915/intel_dp.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 41674e1..9f134d2 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2015,7 +2015,7 @@ intel_dp_init(struct drm_device *dev, int output_reg)
 
 	/* Cache some DPCD data in the eDP case */
 	if (is_edp(intel_dp)) {
-		int ret;
+		bool ret;
 		u32 pp_on, pp_div;
 
 		pp_on = I915_READ(PCH_PP_ON_DELAYS);
@@ -2028,11 +2028,9 @@ intel_dp_init(struct drm_device *dev, int output_reg)
 		dev_priv->panel_t12 *= 100; /* t12 in 100ms units */
 
 		ironlake_edp_panel_vdd_on(intel_dp);
-		ret = intel_dp_aux_native_read(intel_dp, DP_DPCD_REV,
-					       intel_dp->dpcd,
-					       sizeof(intel_dp->dpcd));
+		ret = intel_dp_get_dpcd(intel_dp);
 		ironlake_edp_panel_vdd_off(intel_dp);
-		if (ret == sizeof(intel_dp->dpcd)) {
+		if (ret) {
 			if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11)
 				dev_priv->no_aux_handshake =
 					intel_dp->dpcd[DP_MAX_DOWNSPREAD] &
-- 
1.7.5.4


  parent reply	other threads:[~2011-07-26  6:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-26  6:36 drm/i915: A selection of display port fixes Keith Packard
2011-07-26  6:36 ` [PATCH 1/5] drm/i915: Use dp_detect_common in hotplug helper function Keith Packard
2011-07-26 16:36   ` [Intel-gfx] " Jesse Barnes
2011-07-26  6:36 ` [PATCH 2/5] drm/i915: Rename i915_dp_detect_common to intel_dp_get_dpcd Keith Packard
2011-07-26 16:37   ` [Intel-gfx] " Jesse Barnes
2011-07-26  6:36 ` Keith Packard [this message]
2011-07-26 16:38   ` [Intel-gfx] [PATCH 3/5] drm/i915: In intel_dp_init, replace read of DPCD with intel_dp_get_dpcd Jesse Barnes
2011-07-26  6:36 ` [PATCH 4/5] drm/i915: Delay 250ms before running the hotplug code Keith Packard
2011-07-26  7:44   ` Daniel Vetter
2011-07-26 15:24     ` Keith Packard
2011-07-26  6:36 ` [PATCH 5/5] drm/i915: DP_PIPE_ENABLED must check transcoder on CPT Keith Packard
2011-07-26 16:46   ` [Intel-gfx] " Jesse Barnes
2011-07-26 18:48 ` [Intel-gfx] drm/i915: A selection of display port fixes Adam Jackson

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=1311662194-4050-4-git-send-email-keithp@keithp.com \
    --to=keithp@keithp.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®