aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2013-10-28 06:53:41 -0400
committerVille Syrjälä <ville.syrjala@linux.intel.com>2014-01-20 04:05:41 -0500
commitc326c0a9c98c06346dd7e37815c651e9382bb7a7 (patch)
tree5a0f26d819456df326d903091fa79a99fd5940dc
parent4b4b9238a30e308b85be2249eadad74ca5d02178 (diff)
drm/i915: Call drm_calc_timestamping_constants() earlier
Update the pixel/line/frame duration information when we switch to the new pipe config. This will keep the timestamping constants in better sync with the real hardware state. Reviewed-by: mario.kleiner.de@gmail.com Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 6efac680d01a..14b024becb91 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9660,6 +9660,14 @@ static int __intel_set_mode(struct drm_crtc *crtc,
9660 /* mode_set/enable/disable functions rely on a correct pipe 9660 /* mode_set/enable/disable functions rely on a correct pipe
9661 * config. */ 9661 * config. */
9662 to_intel_crtc(crtc)->config = *pipe_config; 9662 to_intel_crtc(crtc)->config = *pipe_config;
9663
9664 /*
9665 * Calculate and store various constants which
9666 * are later needed by vblank and swap-completion
9667 * timestamping. They are derived from true hwmode.
9668 */
9669 drm_calc_timestamping_constants(crtc,
9670 &pipe_config->adjusted_mode);
9663 } 9671 }
9664 9672
9665 /* Only after disabling all output pipelines that will be changed can we 9673 /* Only after disabling all output pipelines that will be changed can we
@@ -9683,15 +9691,6 @@ static int __intel_set_mode(struct drm_crtc *crtc,
9683 for_each_intel_crtc_masked(dev, prepare_pipes, intel_crtc) 9691 for_each_intel_crtc_masked(dev, prepare_pipes, intel_crtc)
9684 dev_priv->display.crtc_enable(&intel_crtc->base); 9692 dev_priv->display.crtc_enable(&intel_crtc->base);
9685 9693
9686 if (modeset_pipes) {
9687 /* Calculate and store various constants which
9688 * are later needed by vblank and swap-completion
9689 * timestamping. They are derived from true hwmode.
9690 */
9691 drm_calc_timestamping_constants(crtc,
9692 &pipe_config->adjusted_mode);
9693 }
9694
9695 /* FIXME: add subpixel order */ 9694 /* FIXME: add subpixel order */
9696done: 9695done:
9697 if (ret && crtc->enabled) 9696 if (ret && crtc->enabled)