public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Damien Lespiau <damien.lespiau@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: Jani Nikula <jani.nikula@intel.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: debugfs: Add support for probing DP sink CRC.
Date: Fri, 24 Jan 2014 12:40:21 +0000	[thread overview]
Message-ID: <20140124124020.GC3514@strange.config> (raw)
In-Reply-To: <1390565132-25100-1-git-send-email-rodrigo.vivi@gmail.com>

On Fri, Jan 24, 2014 at 10:05:32AM -0200, Rodrigo Vivi wrote:
> +int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc)
> +{
> +	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> +	struct drm_device *dev = intel_dig_port->base.base.dev;
> +	struct intel_crtc *intel_crtc =
> +		to_intel_crtc(intel_dig_port->base.base.crtc);
> +	u8 buf[1];
> +
> +	if (!intel_dp_aux_native_read(intel_dp, DP_TEST_SINK_MISC, buf, 1))
> +		return -EAGAIN;
> +
> +	if (!(buf[0] & DP_TEST_CRC_SUPPORTED))
> +		return -ENOTTY;
> +
> +	if (!intel_dp_aux_native_write_1(intel_dp, DP_TEST_SINK,
> +					 DP_TEST_SINK_START))
> +		return -EAGAIN;
> +
> +	/* Wait 2 vblanks to be sure we will have the correct CRC value */
> +	intel_wait_for_vblank(dev, intel_crtc->pipe);
> +	intel_wait_for_vblank(dev, intel_crtc->pipe);
> +
> +	if (!intel_dp_aux_native_read_retry(intel_dp, DP_TEST_CRC_R_CR, crc, 6))
> +		return -EAGAIN;

There's still one retry hidden here.

-- 
Damien

  reply	other threads:[~2014-01-24 12:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 18:21 [PATCH 1/2] drm: dp helper: Add DP test sink CRC definition Rodrigo Vivi
2014-01-14 18:21 ` [PATCH 2/2] drm/i915: debugs: Add support for probing DP sink CRC Rodrigo Vivi
2014-01-16 17:55   ` [Intel-gfx] " Damien Lespiau
2014-01-16 18:09     ` Damien Lespiau
2014-01-23 18:15     ` [PATCH] drm/i915: debugfs: " Rodrigo Vivi
2014-01-24 10:10       ` Jani Nikula
2014-01-24 12:05         ` Rodrigo Vivi
2014-01-24 12:40           ` Damien Lespiau [this message]
2014-01-24 15:36             ` Rodrigo Vivi
2014-01-24 15:43               ` Damien Lespiau
2014-01-25 19:11                 ` Daniel Vetter
2014-01-25 20:20 ` [Intel-gfx] [PATCH 1/2] drm: dp helper: Add DP test sink CRC definition Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2014-01-09 19:47 [PATCH] drm/i915: debugfs: Add support for probing DP sink CRC Rodrigo Vivi
2014-01-09 21: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=20140124124020.GC3514@strange.config \
    --to=damien.lespiau@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=rodrigo.vivi@gmail.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