From patchwork Wed Oct 19 08:24:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4631 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp212054wrs; Wed, 19 Oct 2022 02:06:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM68ssTh+pW5AF0VVGlpHzEMztdv54ax1aAuaaGC3uiJAYSaGgISm9Joi7kaMrUj1U7tCSX1 X-Received: by 2002:a65:56c4:0:b0:458:85e:9e65 with SMTP id w4-20020a6556c4000000b00458085e9e65mr6497041pgs.358.1666170396717; Wed, 19 Oct 2022 02:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170396; cv=none; d=google.com; s=arc-20160816; b=GYP1MSXXn7kjpDTBdMivIrutW1i5efGEIt1G3qaElnhBhSBLmJ1MBis93rIAHSvmUV 3L/MK6XybnUVIKQtuPR591WwQDTxZOkSCdNPsSWbzGsDqAtom5BRmVqLMd4y3HmIj5F6 MPZxmrD1eA0ZGnNmyUrt+6T63sjJNtzHflVmamkw1Pt508B96huaDF6bu8DsjKpS893B USbsodw4BRj3p8If94P2yngdS3qGSklXioXw7jHGq9rtxuQlWHyHIUOBM0Q2Psy9gr3p +AzLpImIn0fqKxHwiNMpC1hLFC/IzC6xBH+mVVcS/CA/1kAu0omwRdUq5QAetkXRKFCA fQlQ== 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=AJufPZK/Qe3ChuD6tChIt811wUzZfnUexvrLSLyNhjI=; b=Q6Q1KfkuxvU2NaqAAIijZqmNzVE/rFBtRcPM0Rf4Fzmhcp6/5AS9uJoa29skSaMqqe 04m0iUawz/FEprejQZ9zOmUXyKGRCx6ODHnANP/++lqY2MJUPNvcBEVXGirKfXiIilkX PRHfsjxyFnl4XlP9CrpcRA1EDS7IWlkDWSwORsw7RPoxFlXaJFWisFZegv0n3kJH6pGp da+tm/Tb/G2Bbao1W0o79YGcG9pYv2EqNZS/YB3Cz7Oa4ZStyj8k37p6BWlXhbkmLZuX qoS/EQMl3WTj42gywdFcrfXP6Duuygu3EK+ofDGCsVveCStnrYPC6dnT5UV2SEAjdMGL OVpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=flTulYrb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c21-20020a6566d5000000b0043077f2f57asi17735795pgw.213.2022.10.19.02.06.17; Wed, 19 Oct 2022 02:06:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=flTulYrb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231654AbiJSIxI (ORCPT + 99 others); Wed, 19 Oct 2022 04:53:08 -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 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747106290044927457?= X-GMAIL-MSGID: =?utf-8?q?1747106290044927457?= 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 = false; return; + } - if (link->type == dc_connection_none) + if (link->type == dc_connection_none) { + link->psr_settings.psr_feature_enabled = false; return; + } if (link->dpcd_caps.psr_info.psr_version == 0) { link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;