On Wed, Apr 25, 2018 at 02:57:57PM -0700, Dhinakaran Pandiyan wrote: > Sink crc is calculated by the sink for static frames irrespective of > what the driver sets in TEST_SINK_START dpcd. Since PSR is the only use > case for sink crc, we don't really need the sink_crc_{start, stop} code. > > The second problem with the current implementation is vblank waits. > Enabling vblank interrupts triggers PSR exit, which means we aren't > really reading the correct CRC values for PSR tests. vblank waits are > replaced by delays. > > With the changes made in this patch, sink CRC is available only for > static frames. I have tested this on a SKL laptop with PSR panel. > > v2: Use refresh rate to calculate frame time. > > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx> > --- > drivers/gpu/drm/i915/i915_debugfs.c | 4 +- > drivers/gpu/drm/i915/intel_dp.c | 115 +++++------------------------------- > drivers/gpu/drm/i915/intel_drv.h | 3 +- > 3 files changed, 18 insertions(+), 104 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > index 2f05f5262bba..e4ba6527c16e 100644 > --- a/drivers/gpu/drm/i915/i915_debugfs.c > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > @@ -2749,6 +2749,7 @@ static int i915_sink_crc(struct seq_file *m, void *data) > struct drm_crtc *crtc; > struct drm_connector_state *state; > struct intel_crtc_state *crtc_state; > + int vrefresh; > > if (connector->base.connector_type != DRM_MODE_CONNECTOR_eDP) > continue; > @@ -2783,8 +2784,9 @@ static int i915_sink_crc(struct seq_file *m, void *data) > } > > intel_dp = enc_to_intel_dp(state->best_encoder); > + vrefresh = crtc_state->base.adjusted_mode.vrefresh; Hmm. Is vrefresh always populated correctly for us? -- Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx