@@ -13843,6 +13843,20 @@ static void intel_prepare_dsb(struct intel_atomic_state *state)
config->dsb = intel_dsb_get(crtc);
}
+static void intel_cleanup_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) {
+ if (config->dsb) {
+ intel_dsb_put(config->dsb);
+ config->dsb = NULL;
+ }
+ }
+}
+
static void intel_atomic_helper_free_state(struct drm_i915_private *dev_priv)
{
struct intel_atomic_state *state, *next;
@@ -14061,6 +14075,8 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
drm_atomic_helper_commit_hw_done(&state->base);
+ intel_cleanup_dsb(state);
+
if (state->modeset) {
/* As one of the primary mmio accessors, KMS has a high
* likelihood of triggering bugs in unclaimed access. After we
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 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)