[Intel-gfx] [PATCH v2 13/15] drm/i915/dsb: Cleanup of DSB context.
Animesh Manna
animesh.manna at intel.com
Wed Aug 21 06:32:33 UTC 2019
DSB context destroyed using intel_dsb_put() in cleanup function.
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Cc: Jani Nikula <jani.nikula at intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Signed-off-by: Animesh Manna <animesh.manna at intel.com>
---
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
More information about the Intel-gfx
mailing list