All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Todd Previte" <tprevite@gmail.com>
To: 'Rodrigo Vivi' <rodrigo.vivi@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: preserve other DP_TEST_SINK bits.
Date: Mon, 29 Sep 2014 15:39:06 -0700	[thread overview]
Message-ID: <009801cfdc36$2f1454c0$8d3cfe40$@gmail.com> (raw)
In-Reply-To: <1412029792-1992-1-git-send-email-rodrigo.vivi@intel.com>

Hi Rodrigo,

Looks good. Only thing that needs to be removed is that extra blank line
between the last part of the function and the return statement. Otherwise...

Reviewed-by: Todd Previte <tprevite@gmail.com>

-----Original Message-----
From: Rodrigo Vivi [mailto:rodrigo.vivi@intel.com] 
Sent: Monday, September 29, 2014 3:30 PM
To: intel-gfx@lists.freedesktop.org
Cc: Rodrigo Vivi; Todd Previte
Subject: [PATCH] drm/i915: preserve other DP_TEST_SINK bits.

Sink crc was implemented based on dp 1.1 spec that had all TEST_SINK bits
reserved reading all 0s. But when reviewing my latest changes on sink crc
Todd warned me that on new specs we have other valid bits on this reg that
we might want to preserve.

Cc: Todd Previte <tprevite@gmail.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c
b/drivers/gpu/drm/i915/intel_dp.c index b8699b0..7d5fa2f 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3821,8 +3821,9 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8
*crc)
 	if (!(buf & DP_TEST_CRC_SUPPORTED))
 		return -ENOTTY;
 
+	drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK, &buf);
 	if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_SINK,
-			       DP_TEST_SINK_START) < 0)
+				buf | DP_TEST_SINK_START) < 0)
 		return -EIO;
 
 	drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK_MISC, &buf); @@
-3841,7 +3842,10 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, u8
*crc)
 	if (drm_dp_dpcd_read(&intel_dp->aux, DP_TEST_CRC_R_CR, crc, 6) < 0)
 		return -EIO;
 
-	drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_SINK, 0);
+	drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK, &buf);
+	drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_SINK,
+			buf & ~DP_TEST_SINK_START);
+
 	return 0;
 }
 
--
1.9.3

  reply	other threads:[~2014-09-29 22:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-29 22:29 [PATCH] drm/i915: preserve other DP_TEST_SINK bits Rodrigo Vivi
2014-09-29 22:39 ` Todd Previte [this message]
2014-09-30  7:42   ` Daniel Vetter
2014-09-30 20:36 ` Daniel Vetter
2014-09-30 20:41   ` Rodrigo Vivi
2014-10-01  8:06     ` Daniel Vetter

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='009801cfdc36$2f1454c0$8d3cfe40$@gmail.com' \
    --to=tprevite@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --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 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.