[Intel-gfx] [PATCH] drm/i915: Wait for vblank after register read

Jani Nikula jani.nikula at linux.intel.com
Thu Apr 19 14:09:56 UTC 2018


On Wed, 18 Apr 2018, Mika Kahola <mika.kahola at intel.com> wrote:
> When reading out CRC's we  wait for a vblank on intel_dp_sink_crc_start()
> function. When we start reading out CRC's in intel_dp_sink_crc() loop we
> first wait for a vblank yielding that all in all we end up waiting two
> vblanks on the first iteration round. Therefore, let's move the
> intel_wait_for_vblank() as the last routine that we do in an iteration loop
> in intel_dp_sink_crc().
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103166

Umm, do the CI failures in the bug really use sink crc, or are they
rather about pipe crc?

BR,
Jani.


> Signed-off-by: Mika Kahola <mika.kahola at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 62f82c4..6eb97fa 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3972,13 +3972,14 @@ int intel_dp_sink_crc(struct intel_dp *intel_dp, struct intel_crtc_state *crtc_s
>  		return ret;
>  
>  	do {
> -		intel_wait_for_vblank(dev_priv, intel_crtc->pipe);
> -
>  		if (drm_dp_dpcd_readb(&intel_dp->aux,
>  				      DP_TEST_SINK_MISC, &buf) < 0) {
>  			ret = -EIO;
>  			goto stop;
>  		}
> +
> +		intel_wait_for_vblank(dev_priv, intel_crtc->pipe);
> +
>  		count = buf & DP_TEST_COUNT_MASK;
>  
>  	} while (--attempts && count == 0);

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the Intel-gfx mailing list