Commit 452c3fb8 authored by Jouni Högander's avatar Jouni Högander
Browse files

drm/i915/display: Warn on use_dsb in non-dsb pipe update functions



Add drm_WARN_ON(use_dsb) into commit_pipe_{pre,post}_planes() and
intel_pipe_update_{start,end}() as they are not supposed to get called on
non-dsb updates.

Signed-off-by: default avatarJouni Högander <jouni.hogander@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250213064804.2077127-9-jouni.hogander@intel.com
parent e01cbca0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -522,6 +522,8 @@ void intel_pipe_update_start(struct intel_atomic_state *state,
	struct intel_vblank_evade_ctx evade;
	int scanline;

	drm_WARN_ON(display->drm, new_crtc_state->use_dsb);

	intel_psr_lock(new_crtc_state);

	if (new_crtc_state->do_async_flip) {
@@ -660,6 +662,8 @@ void intel_pipe_update_end(struct intel_atomic_state *state,
	ktime_t end_vbl_time = ktime_get();
	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);

	drm_WARN_ON(display->drm, new_crtc_state->use_dsb);

	if (new_crtc_state->do_async_flip)
		goto out;

+5 −1
Original line number Diff line number Diff line
@@ -7136,11 +7136,13 @@ static void commit_pipe_pre_planes(struct intel_atomic_state *state,
		intel_atomic_get_new_crtc_state(state, crtc);
	bool modeset = intel_crtc_needs_modeset(new_crtc_state);

	drm_WARN_ON(&dev_priv->drm, new_crtc_state->use_dsb);

	/*
	 * During modesets pipe configuration was programmed as the
	 * CRTC was enabled.
	 */
	if (!modeset && !new_crtc_state->use_dsb) {
	if (!modeset) {
		if (intel_crtc_needs_color_update(new_crtc_state))
			intel_color_commit_arm(NULL, new_crtc_state);

@@ -7163,6 +7165,8 @@ static void commit_pipe_post_planes(struct intel_atomic_state *state,
	const struct intel_crtc_state *new_crtc_state =
		intel_atomic_get_new_crtc_state(state, crtc);

	drm_WARN_ON(&dev_priv->drm, new_crtc_state->use_dsb);

	/*
	 * Disable the scaler(s) after the plane(s) so that we don't
	 * get a catastrophic underrun even if the two operations