drm/i915: Refactor timestamping constants update
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 7 Oct 2019 11:49:43 +0000 (14:49 +0300)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 16 Oct 2019 13:58:30 +0000 (15:58 +0200)
commit993254292b9e0be97555cd3475bcdb946c558381
tree5412e3438cd1f0f7f3b0c2f987b8d3f26621c145
parent2229adc81380c46908d46a91f05a6c1650456769
drm/i915: Refactor timestamping constants update

Once we do the hw vs. uapi split we can no longer use
drm_atomic_helper_calc_timestamping_constants() as it'll
consult the uapi state instead of the hw state.

So let's just update the vblank timestamping constants whenever
we update the scanline offset. We use both to convert the hw
scanline count to something which matches the software timing
values.

First I thought to put these into intel_crtc_vblank_on() but
we may want to get the scanline counter value before that (eg.
from some early tracepoints), so let's stick to updating them
a bit earlier than intel_crtc_vblank_on().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191007114943.29307-3-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_display.c