[PATCH v2 13/15] drm/i915/dsb: Cleanup of DSB context.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



DSB context destroyed using intel_dsb_put() in cleanup function.

Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
Signed-off-by: Animesh Manna <animesh.manna@xxxxxxxxx>
---
 drivers/gpu/drm/i915/display/intel_display.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index c6a5f38bdc87..7415c4cb8eee 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -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
-- 
2.22.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux