@@ -13724,6 +13724,22 @@ static void intel_prepare_dsb(struct drm_atomic_state *state)
}
}
+static void intel_cleanup_dsb(struct drm_atomic_state *state)
+{
+ struct drm_crtc_state *crtc_state;
+ struct drm_crtc *crtc;
+ struct intel_crtc_state *config;
+ int i;
+
+ if (!state)
+ return;
+
+ for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
+ config = to_intel_crtc_state(crtc_state);
+ intel_dsb_put(config->dsb);
+ }
+}
+
static void intel_atomic_helper_free_state(struct drm_i915_private *dev_priv)
{
struct intel_atomic_state *state, *next;
@@ -13772,6 +13788,7 @@ static void intel_atomic_cleanup_work(struct work_struct *work)
container_of(work, struct drm_atomic_state, commit_work);
struct drm_i915_private *i915 = to_i915(state->dev);
+ intel_cleanup_dsb(state);
drm_atomic_helper_cleanup_planes(&i915->drm, state);
drm_atomic_helper_commit_cleanup_done(state);
drm_atomic_state_put(state);
DSB context destroyed using intel_dsb_put() in cleanup function. 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 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)