Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp626890pxv; Thu, 15 Jul 2021 11:54:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycgN/bX/tp83vPYvr3KrQZvRYQpcoK2ZooahkdC7Q0dNeulq263t7gBVSPcYrqbbmWTb6S X-Received: by 2002:a17:907:f8e:: with SMTP id kb14mr7033266ejc.40.1626375246054; Thu, 15 Jul 2021 11:54:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626375246; cv=none; d=google.com; s=arc-20160816; b=BCDgTc16aafvodvBcPF3ci6cvMrqlR52QmG0NSL/5Splxhv4B5ZXFd1PDsC66jDUiW M1Nvb6f+M3LVKZKNWREbgfMVzUM/Xdi5U4vkmIz8CQqK3V1HPWz9KeYGCyorsCjmgvbR Ckj9YtB6QgQQ/qxIF1wc7BRTSBBinIfHQWbfkLkaffJzJhaS7I9708lLCZZFD4uEqMIK ApsYHj4j+yzW5HM4IsuJE1m804uUbAjlULarxEW36qWXIUWM04ShtFEtgq70tHFeY0RE RK1dUNpEka7kSE4K3J9IXQR8ddeiQbflfB3kpvkftfd3R11wSJnBlZFzr3ykpnIZ/tZt nxtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Brbb77O2sD3kzI1AAwFXn3A42d7CapJCu538V94liG4=; b=o82EAjnpnbSLNDMz34BDsefkfsHHpshhoF4Bg+oMFURJaYdm36stRxqvlas0RplRFv nCH774nvSbsN4o+82kFvRhEsc9KwLMC399hNpkjmckSZ2Btqyh//hAR/KSJLLyByIGhD suzmrSv62s7uvAlvjvxK/a3gRvDqYLKMVsOTtYBSnUtsRlby827hCFMT18/J3gPgw1PM OKTcs03OKw0z310ziGBO8UJF3dNRvTgiLPuNVX5c+aIDzchhvasHlqWDauhsuEWwaDZJ xTXGncAv0lVCKVui3+Lnc7JAjlv6jMg0TLe48OLD7X2L3FwBSdqpQesEulOTd7lcMpYY zU1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sXfFEHUP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gx12si5602516ejb.579.2021.07.15.11.53.42; Thu, 15 Jul 2021 11:54:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sXfFEHUP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241473AbhGOSzh (ORCPT + 99 others); Thu, 15 Jul 2021 14:55:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:53924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239688AbhGOSuz (ORCPT ); Thu, 15 Jul 2021 14:50:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4970B613E5; Thu, 15 Jul 2021 18:47:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626374879; bh=4C0lKNgXTCKNz35FbKot2gFcyMQerStQtkexXZeC10M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sXfFEHUPjzlz585AjndnlA1UrnhXOpanfWSHZ/M3cVamaIKsoZOpBGEysFGkkV00e XpEsglqsb0HxvlEuDdNUoBYkuWu9qcMebYRpH9Dbe4Z9Tjd9D8GZ16FtmuDOmyQV3S zrbA+HVL7R/cFRtrka4J5JVB1IdIjFX4DZI9XByk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vladimir Stempen , Wenjing Liu , Stylon Wang , Daniel Wheeler , Alex Deucher , Sasha Levin Subject: [PATCH 5.10 066/215] drm/amd/display: Release MST resources on switch from MST to SST Date: Thu, 15 Jul 2021 20:37:18 +0200 Message-Id: <20210715182611.052768498@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182558.381078833@linuxfoundation.org> References: <20210715182558.381078833@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladimir Stempen [ Upstream commit 3f8518b60c10aa96f3efa38a967a0b4eb9211ac0 ] [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 Reviewed-by: Wenjing Liu Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- 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 32b73ea86673..a7f8caf1086b 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 @@ -1704,6 +1704,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.30.2