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 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx