From patchwork Fri Jul 1 02:33:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 12902588 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 26173C43334 for ; Fri, 1 Jul 2022 02:33:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A6EA810E3B0; Fri, 1 Jul 2022 02:33:37 +0000 (UTC) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 22C0310E390; Fri, 1 Jul 2022 02:33:36 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aKoPTIUbNkALaYLO/ta9WfdC3U27Fff8DETsCCQf1IOiaZiihzPSkrPvfvPpwi5aW6suIIE2jpNsHBsYcZczJP90PlGR7+OiWC9jE+ylvG7WFKDHrYb9ov31ui4AEFKZtU9eB4jIilFUU4dDLscPRIkcDM/JzODtHCaRZYBCL+yHU2p8tQnwYY7p2N00OQ2sUkW3q842R2Xqd9IrkFY4wvRSN3WbMZlqa3/Z/dheMTK+vxU1W6qo4a59IqvsTNIoNEWu6kul1/6Mbx1zRE0snzLA0YaJGqhQDmD7mSjnn6KbJnVLshVRHQ1qVM32tS4KVWeMRHRDg+Omr5XYUg6mMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WcQ+c9Vx9IWaoX5Q4p/A1m5l6ISx8PTZ2lKytNI1+Sw=; b=VGH7IZsmCwr6ORZ5DUj8NBuNjcYL9xiJzzINeVcf4zkmTNicpJuMKznSWlVvE3z//cyVO7zcIy19CKonrxYZ3cmufE21nmtkUfCjdzJmrPwoe04DJYXo55i/Mbwz1HSjheBk4jM1P9qCkmGlrOidSlrod5Gu1RC45SXgFfcxtPoJ5vy6Pk7rsYQqxwFWibUC94ca4o9tvykXcDtqbQTsL5kqjc59ByYqJRsMQMW2dlV5E0aGFgpnf9mc2Ze8KAi0rlqJ12PZ3n5aAhCHRrIrnDUyGxgyg4ViDwLW17g+UvPGHoEhjSOQobvDivVc7prq6jNlYHVlhi3wyKnvGZqJsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WcQ+c9Vx9IWaoX5Q4p/A1m5l6ISx8PTZ2lKytNI1+Sw=; b=jBTSmvuGSa1DsuSFV0AIUMW9D0syjGd83ZpNRNa83mw5JMhALqj5mGR0g06ieDBgWsYrA+44HueYVnWHVKfzlskT6+EGfOEVAQdahUwrbGUeMELgjRFfaCjHFFFXQHuA0h1Yfw4qnMLenhCaPNuynaIvP8Mu2AsiIgFHeNjFUYI= Received: from BN9PR03CA0981.namprd03.prod.outlook.com (2603:10b6:408:109::26) by DM4PR12MB5374.namprd12.prod.outlook.com (2603:10b6:5:39a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14; Fri, 1 Jul 2022 02:33:34 +0000 Received: from BN8NAM11FT020.eop-nam11.prod.protection.outlook.com (2603:10b6:408:109:cafe::39) by BN9PR03CA0981.outlook.office365.com (2603:10b6:408:109::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15 via Frontend Transport; Fri, 1 Jul 2022 02:33:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT020.mail.protection.outlook.com (10.13.176.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5395.14 via Frontend Transport; Fri, 1 Jul 2022 02:33:33 +0000 Received: from AUS-LX-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 30 Jun 2022 21:33:32 -0500 From: Mario Limonciello To: , Subject: [PATCH v3 07/10] drm/amd: Use `pm_suspend_preferred_s2idle` Date: Thu, 30 Jun 2022 21:33:25 -0500 Message-ID: <20220701023328.2783-7-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220701023328.2783-1-mario.limonciello@amd.com> References: <20220701023328.2783-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5d599002-59e8-467c-6662-08da5b0a180d X-MS-TrafficTypeDiagnostic: DM4PR12MB5374:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +KXS98Se7N3LEk1OMCePKB5sb6IPPmHS/cpOcFGvsTcBM11XUrTSKilCN070FRqp1cQqBRBFaTs002qINuJLSmJy6u3gNI6zTz4LJAB677htfbus5n5lQUSbYpPIfIg2m9/+lzfYRspYHX74SzbAkLE6ITfpzEmjKTYiZ6Ze4WUN9brhT2xjkglx1YEka4Ro4YcfqDWtySpnL+U25c5xcTePhQ88LG2HXKwwjK9Zjz+LzTfOQafehjkslljobs6DWpzB8kIFupo3bBVkvXy25ATO8qlE9EJtG8BgTT4Jk9iqzMnyKQsGMqWo1ii5uiCDc+hC4NvfnhXQWYfdi1MKt+nAIRRNLlefU2z5v0nHjC/KYHFYGAgEe4yMU4ResD3+ju6vl0PKcIg7pVWiUm8SGCoHRwC1/ZQ6xpvrgnSxCrg6acVdJPwsBo/VfBq0JlA7cdhdgPXZNw1lGRu51nJUPa/YoQXp+OFtyodfNYz9PJj8mqkdSyq/Doe5WqSaFujiieXVSz2H6Ps3j9YP9cPreMuetDTQOBytdblRdtrMdjF3c7cB3BaV5+AYxnGSz53d2FwVsclRIuOIcPQCzqhogb3vraJDqtYFd9H7troaE1QTAINLjt6n1+gYG/6ORjBbiZvbYlrn9ZNwZcN5UUk5+Apww+dfPWk3XdBOeZ9S4czIN3/0THG8nH4LX6mZyeIrXqqX/lVpjSZ1ZGR3hglPZnmhN1xhXTe6GS1G9qDCsNm947tJKUjUnpc0bGELQ3mjvg21SENAKPzfhBXnsxgaVPxs7bDvuoT5Qw8vTyo6hQlzkmNGVGSA1+QfS7AKTvSfHNgO5/e3QK1uV9BLxy2s5DCp0H9ZCf8Bt7GLQvHZWNeABJXX6A8HyuJbQhygdoKK X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(346002)(396003)(136003)(376002)(39860400002)(36840700001)(46966006)(40470700004)(5660300002)(40480700001)(4744005)(44832011)(8936002)(4326008)(36860700001)(81166007)(478600001)(356005)(1076003)(186003)(47076005)(336012)(82740400003)(426003)(83380400001)(2616005)(16526019)(7696005)(40460700003)(6666004)(41300700001)(2906002)(86362001)(26005)(110136005)(70206006)(70586007)(82310400005)(54906003)(316002)(36756003)(8676002)(81973001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2022 02:33:33.7053 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5d599002-59e8-467c-6662-08da5b0a180d X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT020.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5374 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pm@vger.kernel.org, David Airlie , "Pan, Xinhui" , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Drop the direct check from the FADT and use the helper instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index 98ac53ee6bb5..2146232c62ef 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c @@ -1072,7 +1072,7 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev) (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)) return false; - if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) { + if (!pm_suspend_preferred_s2idle()) { dev_warn_once(adev->dev, "Power consumption will be higher as BIOS has not been configured for suspend-to-idle.\n" "To use suspend-to-idle change the sleep mode in BIOS setup.\n"); From patchwork Fri Jul 1 02:33:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 12902589 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 225CBCCA480 for ; Fri, 1 Jul 2022 02:33:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 57D1B10E432; Fri, 1 Jul 2022 02:33:39 +0000 (UTC) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2074.outbound.protection.outlook.com [40.107.93.74]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A69B10E42F; Fri, 1 Jul 2022 02:33:38 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XJdWspBOCFMXM8ajZquGQxR1yNeIBjg+X7SMnkZXiyWf2pA/yRrw5/W/mbxdSZFgVRIZD9m3gGgLZ/VnzX7+kiPya2/X1l41J9N/IY+hyW6VdSFWdVDCD0OJ1DSVfwE44esEgRss9elirzJ1nT69HnpbzuDQ/9dfnoTR25GyO30+huiv6Sic+SgQvw03IjaWvjXSuI+5jhJVb3I99VWDOqmQeZAVSMGAj63SLrG+SO1LV8OkeWsuG9DppvLQDfy1HyLevy/wP1R2N5l/3QKSATG64nshZL2DScpPv25hUWKfcjcDig6huTQK0QeYBuE3geQEelKAIzBtpWHTfjnW9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UNgflNT87elPNP2tLJuLiglNSU86pfbDP+uIsZJeDdU=; b=mgZNw7lU75hyVDnQXVZHi+vfuwfAHyywyPdddDg61hWb6DyN/PAsyMTB6+hzzJikeFSiTCTGmfCSxXRzbr+Ou3oMh0b5fek16q6hjcyhIGx4G152VsLullfIjtxKNHizsB/E0lkgLzaoG6kyDjI/BhVd11yO4Sd1jvFA/gG2RBCEi3Ldn40qT7Q+ukbwCXl22Sijgh+O0hhQRtJFzTaYVsUFke3oRlOr+FtTRCrJgvqqSEBrBu68OZyhRD+GU7uSnAhgk/KmvUyZyo2v2W5bbGhncVkQWIcjyCAeH9P4jmUnXvf+MtEtDrIMR1J0uMgxPQ5FwWr1lYelkW/AL6hlOA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UNgflNT87elPNP2tLJuLiglNSU86pfbDP+uIsZJeDdU=; b=FFwQZ4IJhtBSwkMGPPdmcdIotGewTDyRIk2Jlfxqn5TID3+nbFVcBbSLRZFcCYRvTjduJSUTSwlGQZGLR04raaJsqGMphAexHyfS79zEjN20y8s15/aKn4OTRyvyZmOXW5b6SQx6EPbfw7sJqJM5LhylDMQIJWXEs53MCLp+cI0= Received: from BN9PR03CA0221.namprd03.prod.outlook.com (2603:10b6:408:f8::16) by MWHPR1201MB0159.namprd12.prod.outlook.com (2603:10b6:301:59::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15; Fri, 1 Jul 2022 02:33:35 +0000 Received: from BN8NAM11FT045.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f8:cafe::ea) by BN9PR03CA0221.outlook.office365.com (2603:10b6:408:f8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14 via Frontend Transport; Fri, 1 Jul 2022 02:33:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT045.mail.protection.outlook.com (10.13.177.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5395.14 via Frontend Transport; Fri, 1 Jul 2022 02:33:34 +0000 Received: from AUS-LX-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 30 Jun 2022 21:33:33 -0500 From: Mario Limonciello To: , Subject: [PATCH v3 08/10] drm/amd: Use `pm_suspend_default_s2idle` Date: Thu, 30 Jun 2022 21:33:26 -0500 Message-ID: <20220701023328.2783-8-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220701023328.2783-1-mario.limonciello@amd.com> References: <20220701023328.2783-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c847054f-3af7-4e6f-bf66-08da5b0a18b9 X-MS-TrafficTypeDiagnostic: MWHPR1201MB0159:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KGHHIwBYWqQ+DFapNshVqmHhHJJ42BH0MlWPsJx5q0cpK17euGJCcRlKTYlbzYHA+DewuhxKvTPN9R1jf48s3dNsWAZi+FHYz2BLixaWK0kKDyU4dAcen6wIRVcxjrf7W7azFUcr4CqHExM1W7KPDqlgVxK/A5r8BcxL5mWoKqSdTKtY5xXdRX2ZQ9e+7nkxVPj/Xwoo8NbvP18YW2EcPAwwMUmTumL5RMivqFPeY62AGeTmJkbw7TKG12xypw8FEX/TzVKgIYYYy9rs3Jbb9zdLEU6LAXvrQ5WmhiG17v1ZujfH9QaQrBNsPsP+tmztumatrZnLk2SzdkkLHpl6rYtTwDjwnMRhLxecoF8PABQs6rkU9t9OLDAvS1fHRFP/q3RRPUvdTGuz4uPQic6n+Xv8b3EgnAs8nFTcexPM8XuMao9r2BR4o0dE49wwFsTsGh7qO7SFZ6njiIKNcv5Wx4zsQtH8O17sGP64kSzNfWxaasTN2acPmWLZkNBqY6McTaNI9wTsswCSbtY+hb43jjPioZGsNxIdUjiRmHB4aURHkTlzkhkJO3Jb9vMTd5gJ6xahGRJ5WnWL+OF2VEszw0SkYPlBKpbGiYgfyTt4Fg8hAdLqFAdd60V+WKZjjJKa5xW70u5I+4b322nVfQGcbyf7YVtvCmVkyBsTJ5ba4Mh2MB0AV6HTfKrXu2lA/oUKkE96/iCCRVSDxg6QYZBPcQU6Aiw4tOSrDuB3Kx+FOxvxhV27v+rnIShaOVvQF9B1fj0/RU6tkZAx/BatF7y+zvLPej0PVknNns7rxCWyIDPslyg3RtSe10moJ+ny3pQ3k8++whWfzqQUe0q7RmctIP6mz5eyE8Y8MwHNXVTgXSZNXoIyiRN3DJ7lfLESOPAL X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(396003)(346002)(39860400002)(136003)(376002)(36840700001)(40470700004)(46966006)(70206006)(70586007)(36860700001)(8676002)(86362001)(186003)(7696005)(16526019)(44832011)(82740400003)(4326008)(1076003)(8936002)(2906002)(356005)(6666004)(81166007)(2616005)(41300700001)(5660300002)(40480700001)(478600001)(40460700003)(83380400001)(82310400005)(426003)(54906003)(26005)(316002)(336012)(36756003)(47076005)(110136005)(81973001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2022 02:33:34.8348 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c847054f-3af7-4e6f-bf66-08da5b0a18b9 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT045.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0159 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pm@vger.kernel.org, David Airlie , "Pan, Xinhui" , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Rather than examining the suspend target, examine what the system is configured to use. This should be no functional change, just improves readability by taking the helper instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index 2146232c62ef..fc2c6e311979 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c @@ -1056,7 +1056,7 @@ bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev) { if (adev->flags & AMD_IS_APU) return false; - return pm_suspend_target_state != PM_SUSPEND_TO_IDLE; + return !pm_suspend_default_s2idle(); } /** @@ -1069,7 +1069,7 @@ bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev) bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev) { if (!(adev->flags & AMD_IS_APU) || - (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)) + !pm_suspend_default_s2idle()) return false; if (!pm_suspend_preferred_s2idle()) {