diff options
author | Imre Deak <imre.deak@intel.com> | 2023-05-10 13:31:20 +0300 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2023-05-16 16:53:45 +0300 |
commit | 7ff9a17e372e5152a77ec657949a3c9250720fa4 (patch) | |
tree | d0a8d762e99043603f1ca49be50a49a2f3e23c01 /drivers/gpu/drm/i915/display/intel_modeset_setup.c | |
parent | 0694cab1d5a425139d9cda08332f59fb79248ff3 (diff) | |
download | linux-7ff9a17e372e5152a77ec657949a3c9250720fa4.tar.xz |
drm/i915: Make the CRTC state consistent during sanitize-disabling
Make sure that the CRTC state is reset correctly, as expected after
disabling the CRTC.
In particular this change will:
- Zero all the CSC blob pointers after intel_crtc_free_hw_state()
has freed them.
- Zero the shared DPLL and port PLL pointers and clear the
corresponding CRTC reference flag in the PLL state.
- Reset all the transcoder and pipe fields.
v2:
- Reset fully the CRTC state. (Ville)
- Clear pipe active flags in the DPLL state.
v3:
- Clear only the CRTC reference flag and add a helper for this.
(Ville)
v4:
- Rebased on previous patch, adding
intel_unreference_shared_dpll_crtc() separately. (Ville)
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230510103131.1618266-4-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_modeset_setup.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_modeset_setup.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_modeset_setup.c b/drivers/gpu/drm/i915/display/intel_modeset_setup.c index eefa4018dc0c..6e55806bbe06 100644 --- a/drivers/gpu/drm/i915/display/intel_modeset_setup.c +++ b/drivers/gpu/drm/i915/display/intel_modeset_setup.c @@ -88,13 +88,14 @@ static void intel_crtc_disable_noatomic(struct intel_crtc *crtc, crtc->active = false; crtc->base.enabled = false; - drm_WARN_ON(&i915->drm, - drm_atomic_set_mode_for_crtc(&crtc_state->uapi, NULL) < 0); - crtc_state->uapi.active = false; - crtc_state->uapi.connector_mask = 0; - crtc_state->uapi.encoder_mask = 0; + if (crtc_state->shared_dpll) + intel_unreference_shared_dpll_crtc(crtc, + crtc_state->shared_dpll, + &crtc_state->shared_dpll->state); + + __drm_atomic_helper_crtc_destroy_state(&crtc_state->uapi); intel_crtc_free_hw_state(crtc_state); - memset(&crtc_state->hw, 0, sizeof(crtc_state->hw)); + intel_crtc_state_reset(crtc_state, crtc); for_each_encoder_on_crtc(&i915->drm, &crtc->base, encoder) encoder->base.crtc = NULL; |