drm/i915: Don't flag both full modeset and fastset at the same time
Be consistent in whether we flag a full modeset or a fastset for the pipe. intel_modeset_all_pipes() would seem to be the only codepath not getting this right. The other case is when we flag the fastset initially, currently we just clear the mode_changed flag and set the update_pipe flag. But we could still have connectors_changed==true or active_changed==true forcing a full modeset anyway. So check for that after clearing the mode_changed flag. And let's add a WARN to make sure we did get it right. v2: Deal with {connectors,active}_changed Reviewed-by: Jani Nikula <jani.nikula@intel.com> #v1 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221021162442.27283-4-ville.syrjala@linux.intel.com
This commit is contained in:
parent
925ac8bc33
commit
7de5b6b546
1 changed files with 8 additions and 1 deletions
|
@ -5939,6 +5939,7 @@ int intel_modeset_all_pipes(struct intel_atomic_state *state,
|
||||||
crtc->base.base.id, crtc->base.name, reason);
|
crtc->base.base.id, crtc->base.name, reason);
|
||||||
|
|
||||||
crtc_state->uapi.mode_changed = true;
|
crtc_state->uapi.mode_changed = true;
|
||||||
|
crtc_state->update_pipe = false;
|
||||||
|
|
||||||
ret = drm_atomic_add_affected_connectors(&state->base,
|
ret = drm_atomic_add_affected_connectors(&state->base,
|
||||||
&crtc->base);
|
&crtc->base);
|
||||||
|
@ -6114,7 +6115,8 @@ static void intel_crtc_check_fastset(const struct intel_crtc_state *old_crtc_sta
|
||||||
return;
|
return;
|
||||||
|
|
||||||
new_crtc_state->uapi.mode_changed = false;
|
new_crtc_state->uapi.mode_changed = false;
|
||||||
new_crtc_state->update_pipe = true;
|
if (!intel_crtc_needs_modeset(new_crtc_state))
|
||||||
|
new_crtc_state->update_pipe = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int intel_crtc_add_planes_to_state(struct intel_atomic_state *state,
|
static int intel_crtc_add_planes_to_state(struct intel_atomic_state *state,
|
||||||
|
@ -6890,6 +6892,11 @@ static int intel_atomic_check(struct drm_device *dev,
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
/* Either full modeset or fastset (or neither), never both */
|
||||||
|
drm_WARN_ON(&dev_priv->drm,
|
||||||
|
intel_crtc_needs_modeset(new_crtc_state) &&
|
||||||
|
intel_crtc_needs_fastset(new_crtc_state));
|
||||||
|
|
||||||
if (!intel_crtc_needs_modeset(new_crtc_state) &&
|
if (!intel_crtc_needs_modeset(new_crtc_state) &&
|
||||||
!intel_crtc_needs_fastset(new_crtc_state))
|
!intel_crtc_needs_fastset(new_crtc_state))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue