drm/amd/display: Fix memory leak caused by missed dc_sink_release
[Why] There is currently an intermittent hang from a memory leak in DTN stress testing. It is caused by unfreed memory during driver disable. [How] Do a dc_sink_release in the case that skips it incorrectly. Signed-off-by: SivapiriyanKumarasamy <sivapiriyan.kumarasamy@amd.com> Reviewed-by: Aric Cyr <Aric.Cyr@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
18e4aa33bd
commit
219097df0f
|
@ -772,8 +772,12 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
|
|||
* fail-safe mode
|
||||
*/
|
||||
if (dc_is_hdmi_signal(link->connector_signal) ||
|
||||
dc_is_dvi_signal(link->connector_signal))
|
||||
dc_is_dvi_signal(link->connector_signal)) {
|
||||
if (prev_sink != NULL)
|
||||
dc_sink_release(prev_sink);
|
||||
|
||||
return false;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue