[Intel-gfx] [PATCH 27/31] drm/i915: Allow 1 vblank to let Sink CRC calculation to start or stop.

Paulo Zanoni przanoni at gmail.com
Tue Nov 10 12:12:51 PST 2015


2015-11-05 16:50 GMT-02:00 Rodrigo Vivi <rodrigo.vivi at intel.com>:
> According to VESA DP Spec, setting TEST_SINK_START (bit 0)
> of TEST_SINK (00270h) "Stop/Start calculating CRC on the next frame"
>
> So let's wait at least 1 vblank to really say the calculation
> stopped or started.

I'm hoping this will fix bugs somewhere.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni at intel.com>

>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 4feb47e..c0fa90a 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3802,6 +3802,7 @@ intel_dp_probe_mst(struct intel_dp *intel_dp)
>  static int intel_dp_sink_crc_stop(struct intel_dp *intel_dp)
>  {
>         struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> +       struct drm_device *dev = dig_port->base.base.dev;
>         struct intel_crtc *intel_crtc = to_intel_crtc(dig_port->base.base.crtc);
>         u8 buf;
>         int ret = 0;
> @@ -3819,6 +3820,7 @@ static int intel_dp_sink_crc_stop(struct intel_dp *intel_dp)
>                 goto out;
>         }
>
> +       intel_wait_for_vblank(dev, intel_crtc->pipe);
>         intel_dp->sink_crc.started = false;
>   out:
>         intel_ips_enable(intel_crtc);
> @@ -3828,6 +3830,7 @@ static int intel_dp_sink_crc_stop(struct intel_dp *intel_dp)
>  static int intel_dp_sink_crc_start(struct intel_dp *intel_dp)
>  {
>         struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> +       struct drm_device *dev = dig_port->base.base.dev;
>         struct intel_crtc *intel_crtc = to_intel_crtc(dig_port->base.base.crtc);
>         u8 buf;
>         int ret;
> @@ -3857,6 +3860,7 @@ static int intel_dp_sink_crc_start(struct intel_dp *intel_dp)
>                 return -EIO;
>         }
>
> +       intel_wait_for_vblank(dev, intel_crtc->pipe);
>         intel_dp->sink_crc.started = true;
>         return 0;
>  }
> --
> 2.4.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Paulo Zanoni


More information about the Intel-gfx mailing list