From nobody Fri Oct 17 10:31:36 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDCBFC433FE for ; Wed, 19 Oct 2022 08:53:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231320AbiJSIxJ (ORCPT ); Wed, 19 Oct 2022 04:53:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231631AbiJSIwf (ORCPT ); Wed, 19 Oct 2022 04:52:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF8D510DD; Wed, 19 Oct 2022 01:50:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AE38C6174E; Wed, 19 Oct 2022 08:48:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0EBBC433C1; Wed, 19 Oct 2022 08:48:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169326; bh=E8K2O0dMkobnDwehst82URM/QgRsMeOSGBHxTus3uzE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=flTulYrbVbounvjNRF/mCmx6vwaeF8XK334nPaB8J6gBhcRSYxxIU2TFj9FfRoyfu 06++ixfvDsReX0iGMMlH97/+bLS9QhoqcrrSC8BigzDqxeAStG9yD3q5FB7Tv6bR5G tOKsOaxcyXOwgr2P6Owd/o8Gk3PB+om5cAcQXfpA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shirish S , Leo Li , Mario Limonciello , Alex Deucher Subject: [PATCH 6.0 198/862] drm/amd/display: explicitly disable psr_feature_enable appropriately Date: Wed, 19 Oct 2022 10:24:45 +0200 Message-Id: <20221019083258.748901590@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Shirish S commit 6094b9136ca9038b61e9c4b5d25cd5512ce50b34 upstream. [Why] If psr_feature_enable is set to true by default, it continues to be enabled for non capable links. [How] explicitly disable the feature on links that are not capable of the same. Fixes: 8c322309e48e9 ("drm/amd/display: Enable PSR") Signed-off-by: Shirish S Reviewed-by: Leo Li Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.15+ Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c @@ -60,11 +60,15 @@ static bool link_supports_psrsu(struct d */ void amdgpu_dm_set_psr_caps(struct dc_link *link) { - if (!(link->connector_signal & SIGNAL_TYPE_EDP)) + if (!(link->connector_signal & SIGNAL_TYPE_EDP)) { + link->psr_settings.psr_feature_enabled =3D false; return; + } =20 - if (link->type =3D=3D dc_connection_none) + if (link->type =3D=3D dc_connection_none) { + link->psr_settings.psr_feature_enabled =3D false; return; + } =20 if (link->dpcd_caps.psr_info.psr_version =3D=3D 0) { link->psr_settings.psr_version =3D DC_PSR_VERSION_UNSUPPORTED;