All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stylon Wang <stylon.wang@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Vladimir Stempen <vladimir.stempen@amd.com>,
	Stylon Wang <stylon.wang@amd.com>,
	Eryk.Brol@amd.com, Sunpeng.Li@amd.com, Harry.Wentland@amd.com,
	Qingqing.Zhuo@amd.com, Rodrigo.Siqueira@amd.com,
	Wenjing Liu <Wenjing.Liu@amd.com>,
	Anson.Jacob@amd.com, Aurabindo.Pillai@amd.com,
	Bhawanpreet.Lakha@amd.com, bindu.r@amd.com
Subject: [PATCH 15/30] drm/amd/display: Release MST resources on switch from MST to SST
Date: Tue, 8 Jun 2021 00:46:59 +0800	[thread overview]
Message-ID: <20210607164714.311325-16-stylon.wang@amd.com> (raw)
In-Reply-To: <20210607164714.311325-1-stylon.wang@amd.com>

From: Vladimir Stempen <vladimir.stempen@amd.com>

[why]
When OS overrides training link training parameters
for MST device to SST mode, MST resources are not
released and leak of the resource may result crash and
incorrect MST discovery during following hot plugs.

[how]
Retaining sink object to be reused by SST link and
releasing MST  resources.

Signed-off-by: Vladimir Stempen <vladimir.stempen@amd.com>
Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Stylon Wang <stylon.wang@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index 87f955820c0f..919c94de2a20 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -1917,6 +1917,8 @@ static void set_dp_mst_mode(struct dc_link *link, bool mst_enable)
 		link->type = dc_connection_single;
 		link->local_sink = link->remote_sinks[0];
 		link->local_sink->sink_signal = SIGNAL_TYPE_DISPLAY_PORT;
+		dc_sink_retain(link->local_sink);
+		dm_helpers_dp_mst_stop_top_mgr(link->ctx, link);
 	} else if (mst_enable == true &&
 			link->type == dc_connection_single &&
 			link->remote_sinks[0] != NULL) {
-- 
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2021-06-07 16:48 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 16:46 [PATCH 00/30] DC Patches June, 7, 2021 Stylon Wang
2021-06-07 16:46 ` [PATCH 01/30] drm/amd/display: Trigger full update after DCC on/off Stylon Wang
2021-06-07 16:46 ` [PATCH 02/30] drm/amd/display: Enabling PSR support for multiple panels Stylon Wang
2021-06-07 16:46 ` [PATCH 03/30] drm/amd/display: delay 100ms before restart after failing to read CP_IRQ Stylon Wang
2021-06-07 16:46 ` [PATCH 04/30] drm/amd/display: Fix DCN 3.01 DSCCLK validation Stylon Wang
2021-06-07 16:46 ` [PATCH 05/30] drm/amd/display: Control power gating by driver Stylon Wang
2021-06-07 16:46 ` [PATCH 06/30] drm/amd/display: Refactor visual confirm Stylon Wang
2021-06-07 16:46 ` [PATCH 07/30] drm/amd/display: add visual confirm colors to differentiate layer_index > 0 Stylon Wang
2021-06-07 16:46 ` [PATCH 08/30] drm/amd/display: Revert "Fix clock table filling logic" Stylon Wang
2021-06-07 16:46 ` [PATCH 09/30] drm/amd/display: Expand DP module equalization API Stylon Wang
2021-06-07 16:46 ` [PATCH 10/30] drm/amd/display: Support mappable encoders when transmitting training patterns Stylon Wang
2021-06-07 16:46 ` [PATCH 11/30] drm/amd/display: Update scaling settings on modeset Stylon Wang
2021-06-07 16:46 ` [PATCH 12/30] drm/amd/display: Remove unused definition of DMUB SET_CONFIG Stylon Wang
2021-06-07 16:46 ` [PATCH 13/30] drm/amd/display: Return last used DRR VTOTAL from DC Stylon Wang
2021-06-07 16:46 ` [PATCH 14/30] drm/amd/display: Enable PSR Residency for multiple panels Stylon Wang
2021-06-07 16:46 ` Stylon Wang [this message]
2021-06-07 16:47 ` [PATCH 16/30] drm/amd/display: Change default policy for MPO with multidisplay Stylon Wang
2021-06-07 16:47 ` [PATCH 17/30] drm/amd/display: [FW Promotion] Release 0.0.68 Stylon Wang
2021-06-07 16:47 ` [PATCH 18/30] drm/amd/display: 3.2.138 Stylon Wang
2021-06-07 16:47 ` [PATCH 19/30] drm/amd/display: Add Interface to set FIFO ERRDET SW Override Stylon Wang
2021-06-07 16:47 ` [PATCH 20/30] drm/amd/display: Add interface for ADD & DROP PIXEL Registers Stylon Wang
2021-06-07 16:47 ` [PATCH 21/30] drm/amd/display: Set DISPCLK_MAX_ERRDET_CYCLES to 7 Stylon Wang
2021-06-07 16:47 ` [PATCH 22/30] drm/amd/display: Fix off-by-one error in DML Stylon Wang
2021-06-07 16:47 ` [PATCH 23/30] drm/amd/display: Fix crash during MPO + ODM combine mode recalculation Stylon Wang
2021-06-07 16:47 ` [PATCH 24/30] drm/amd/display: Add debugfs entry for dsc passthrough Stylon Wang
2021-06-07 16:47 ` [PATCH 25/30] drm/amd/display: Revert "Disconnect non-DP with no EDID" Stylon Wang
2021-06-07 16:47 ` [PATCH 26/30] drm/amd/display: Updates for ODM Transition Test Stylon Wang
2021-06-07 16:47 ` [PATCH 27/30] drm/amd/display: force CP to DESIRED when removing display Stylon Wang
2021-06-07 16:47 ` [PATCH 28/30] drm/amd/display: Add swizzle visual confirm mode Stylon Wang
2021-06-07 16:47 ` [PATCH 29/30] drm/amd/display: [FW Promotion] Release 0.0.69 Stylon Wang
2021-06-07 16:47 ` [PATCH 30/30] drm/amd/display: 3.2.139 Stylon Wang
2021-06-08 14:00 ` [PATCH 00/30] DC Patches June, 7, 2021 Wheeler, Daniel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210607164714.311325-16-stylon.wang@amd.com \
    --to=stylon.wang@amd.com \
    --cc=Anson.Jacob@amd.com \
    --cc=Aurabindo.Pillai@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Eryk.Brol@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Qingqing.Zhuo@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=Wenjing.Liu@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bindu.r@amd.com \
    --cc=vladimir.stempen@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.