From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Lespiau Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915: debugs: Add support for probing DP sink CRC. Date: Thu, 16 Jan 2014 18:09:22 +0000 Message-ID: <20140116180922.GB17903@strange.amr.corp.intel.com> References: <1389723710-21223-1-git-send-email-rodrigo.vivi@gmail.com> <1389723710-21223-2-git-send-email-rodrigo.vivi@gmail.com> <20140116175506.GA17903@strange.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20140116175506.GA17903@strange.amr.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Rodrigo Vivi Cc: Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Thu, Jan 16, 2014 at 05:55:06PM +0000, Damien Lespiau wrote: > > + /* 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); > > I think there's a better way to do this. There's a TEST_CRC_COUNT in > TEST_SINK_MISC that is incremented everytime the CRCs are updated. You > could: > * start by grabbing TEST_CRC_COUNT > * have a loop that waits for a vblank, check if the TEST_CRC_COUNT has > changed > * return the new CRC if the update has occured > * or give up after a number of waits (say 10) There seem to be support for an interrupt to come from the device to signal the CRCs are ready (AUTOMATED_TEST_REQUEST of DEVICE_SERVICE_IRQ_VECTOR), but that's pushing it :) -- Damien