From: Anthony Koo <[email protected]>

[Why]
without destroy it is causing a memory leak

[How]
destroy panel on link destruct

Signed-off-by: Anthony Koo <[email protected]>
Reviewed-by: Wyatt Wood <[email protected]>
Acked-by: Rodrigo Siqueira <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c 
b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index 2e5a97190ce3..b38abd0c362a 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -88,6 +88,9 @@ static void dc_link_destruct(struct dc_link *link)
        if (link->ddc)
                dal_ddc_service_destroy(&link->ddc);
 
+       if (link->panel)
+               link->panel->funcs->destroy(&link->panel);
+
        if (link->link_enc)
                link->link_enc->funcs->destroy(&link->link_enc);
 
-- 
2.26.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to