Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9eca6832 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter
Browse files

drm/i915: Move scanline_offset and timestamping constant setup to intel_modeset_readout_hw_state()



intel_modeset_readout_hw_state() seems like the more appropriate place
for populating the scanline_offset and timestamping constants than
intel_sanitize_crtc() since they are basically part of the state we
read out.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: default avatarPatrik Jakobsson <patrik.jakobsson@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent f9cd7b88
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -14907,8 +14907,6 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc)
	if (crtc->active) {
		struct intel_plane *plane;

		drm_calc_timestamping_constants(&crtc->base, &crtc->base.hwmode);
		update_scanline_offset(crtc);
		drm_crtc_vblank_on(&crtc->base);

		/* Disable everything but the primary plane */
@@ -15204,6 +15202,9 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
			 * recalculation.
			 */
			crtc->base.state->mode.private_flags = I915_MODE_FLAG_INHERITED;

			drm_calc_timestamping_constants(&crtc->base, &crtc->base.hwmode);
			update_scanline_offset(crtc);
		}
	}
}