]> Git Repo - linux.git/commitdiff
drm/amd/display: Fix memory leak caused by missed dc_sink_release
authorSivapiriyanKumarasamy <[email protected]>
Wed, 15 Aug 2018 20:55:18 +0000 (16:55 -0400)
committerAlex Deucher <[email protected]>
Mon, 27 Aug 2018 19:53:37 +0000 (14:53 -0500)
[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 <[email protected]>
Reviewed-by: Aric Cyr <[email protected]>
Acked-by: Leo Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/display/dc/core/dc_link.c

index 567867915d32d84cb6bb68d3e4da33842de9b2e4..37eaf72ace549d6f132b9fc5933da434fc164396 100644 (file)
@@ -754,8 +754,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;
                }
This page took 0.058965 seconds and 4 git commands to generate.