From patchwork Sat Oct 22 07:20:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7254 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1091562wrr; Sat, 22 Oct 2022 00:51:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7zUAacOweZIhnXj5Pqc2/p17QK2DFX0gJ96BxX6WmzPtpgm7F72KN/yz27aYeGHrRsGtvP X-Received: by 2002:a17:90a:65c7:b0:20f:8385:cc18 with SMTP id i7-20020a17090a65c700b0020f8385cc18mr26571756pjs.235.1666425067032; Sat, 22 Oct 2022 00:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666425067; cv=none; d=google.com; s=arc-20160816; b=mhFuMLu5weei4lm3liQdQP+HvefymO8rzvm2pnraMoapcQyvL0F2IQDDhySfAZX6U8 QeR9SxSg87wCaly/EwJp0cKQLrguH1BgDh6TZsDMs1nooGski9T5b496bYWCYHyeBYr5 86dvU7T6xqaQTPtXizXU//o73XzWKf0JWz0UHKYgwIdq5yN1ImZjVmUppOHARO/QEojt toC2fhCGpLRAnwiweZkbYcdwyuKI54v06syhzHoTKts1UKzFhao9EoHH5ErpBw5Z+4xQ C4kX0BezCIyiXOLJ8ieQ8laFO+oczDmbVeoTymI58JQ8Rbhoj63K3qyOK4A6zpYMHXzB 0Qbw== 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=VjxtpeoXE0jGL17wnHdRvbcEDU4hI1mAIlWJednx+Q9X1hxWkYd56pTJDX67G4dq/m XtiRYBoZ7SUWq3doDzqpm26MMerTJIJ/mnxp9wF4WkZSuZHRyqIgy4lmCZq4UHiQw8KH 3vwNLzy0/sE5TODWNkuagRa8VR2sqPbi4SuAAEs2+7qlwuf8+GHsH7/eAYHr0igEamyS YKDRLRVhI9H1miPX5/Xa2R6itIcjCj5ANm9X6UORQ0N9IUpoe7wPoPX69W+ySDpaa38P VtxPfXhuy2l0UgiMo9/+DLBmvI0Jln/oA1TlJeuHXWrA35TpkPwCigq/NJOu9NbFfqPw fV2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vUs+wuBo; 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 r5-20020a63ce45000000b0045a3e1d1a77si26114732pgi.111.2022.10.22.00.50.54; Sat, 22 Oct 2022 00:51:07 -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=vUs+wuBo; 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 S231713AbiJVHuc (ORCPT + 99 others); Sat, 22 Oct 2022 03:50:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231671AbiJVHs7 (ORCPT ); Sat, 22 Oct 2022 03:48:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAD4A209FB3; Sat, 22 Oct 2022 00:45:36 -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 3C5EF60B8A; Sat, 22 Oct 2022 07:41:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A843C433C1; Sat, 22 Oct 2022 07:41:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424511; bh=E8K2O0dMkobnDwehst82URM/QgRsMeOSGBHxTus3uzE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vUs+wuBoXYSQviq7zhGv+Nt0sKr8mfSQKKpaniFAR/eD0plsfxFFvC4gKqlpoSNMu C2X8KCHjuBdyelw7P7d+/2eseowvo99LhvZbzjDo9JO1K1EquCBXxiuaxLV0kS3j+S Wwh1f9jIaMMVJG1+Hi7/LWZ4zjbGSXrDoh7GfCbo= 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 5.19 174/717] drm/amd/display: explicitly disable psr_feature_enable appropriately Date: Sat, 22 Oct 2022 09:20:53 +0200 Message-Id: <20221022072446.314280756@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747373331399378517?= X-GMAIL-MSGID: =?utf-8?q?1747373331399378517?= 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;