@@ -13833,6 +13833,16 @@ static void skl_update_crtcs(struct intel_atomic_state *state)
icl_dbuf_slices_update(dev_priv, required_slices);
}
+static void intel_prepare_dsb(struct intel_atomic_state *state)
+{
+ struct intel_crtc_state *config;
+ struct intel_crtc *crtc;
+ int i;
+
+ for_each_new_intel_crtc_in_state(state, crtc, config, i)
+ config->dsb = intel_dsb_get(crtc);
+}
+
static void intel_atomic_helper_free_state(struct drm_i915_private *dev_priv)
{
struct intel_atomic_state *state, *next;
@@ -14185,6 +14195,7 @@ static int intel_atomic_commit(struct drm_device *dev,
dev_priv->wm.distrust_bios_wm = false;
intel_shared_dpll_swap_state(state);
intel_atomic_track_fbs(state);
+ intel_prepare_dsb(state);
if (state->modeset) {
memcpy(dev_priv->min_cdclk, state->min_cdclk,
@@ -984,6 +984,8 @@ struct intel_crtc_state {
/* Forward Error correction State */
bool fec_enable;
+
+ struct intel_dsb *dsb;
};
struct intel_crtc {
The dsb get call added part of the prepare so that we don't have things that can fail in the commit proper. The allocated dsb-context will be tracked under intel_crtc_state instead of intel_crtc per atomic-commit. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> --- drivers/gpu/drm/i915/display/intel_display.c | 11 +++++++++++ drivers/gpu/drm/i915/display/intel_display_types.h | 2 ++ 2 files changed, 13 insertions(+)