Skip to content

Commit 85c4770

Browse files
surajk8vsyrjala
authored andcommitted
drm/i915/display: Free crtc_state in verify_crtc_state
Free hw_crtc_state in verify_crtc_state after we are done using this or else it's just a resource leak. Fixes: 2745bdd ("drm/i915: Stop clobbering old crtc state during state check") Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231010053208.691260-1-suraj.kandpal@intel.com
1 parent 2bc823c commit 85c4770

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/gpu/drm/i915/display/intel_modeset_verify.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ verify_crtc_state(struct intel_atomic_state *state,
214214
}
215215

216216
if (!sw_crtc_state->hw.active)
217-
return;
217+
goto destroy_state;
218218

219219
intel_pipe_config_sanity_check(hw_crtc_state);
220220

@@ -224,6 +224,9 @@ verify_crtc_state(struct intel_atomic_state *state,
224224
intel_crtc_state_dump(hw_crtc_state, NULL, "hw state");
225225
intel_crtc_state_dump(sw_crtc_state, NULL, "sw state");
226226
}
227+
228+
destroy_state:
229+
intel_crtc_destroy_state(&crtc->base, &hw_crtc_state->uapi);
227230
}
228231

229232
void intel_modeset_verify_crtc(struct intel_atomic_state *state,

0 commit comments

Comments
 (0)