From patchwork Mon May 9 05:12:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 1628291 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=v64oSNGM; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KxTpT4Sw6z9sGg for ; Mon, 9 May 2022 15:13:20 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nnvhq-0002Zq-0l; Mon, 09 May 2022 05:13:14 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nnvhn-0002Yj-8z for kernel-team@lists.ubuntu.com; Mon, 09 May 2022 05:13:11 +0000 Received: from localhost.localdomain (unknown [10.101.196.174]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 094693F834 for ; Mon, 9 May 2022 05:13:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1652073190; bh=QhD6MOCzsAemarbrxPiaN/JhGr8mBuMpCgKQMOLu4H0=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=v64oSNGMun5iCQCN1JaHwZ6JHtMu+HpGVDqa6kx5/8wr8aK7ZcS7JHruYpAdJiTBv 39iZuObdBwt92ls+THKQPE9nHdsbpvxoxXr7pGSsViN/lOCciJ4IQGWSd3Cp04+iML L/itHIllTBpIBQBw1jC0Nnz1makZ01HSquGsdMQdBwiJ6KCtbDh3sLQE2idgYY5LES I+ABL3pI9muTj3SpmFWX2kiJVEDR1frBPvdjM0p9Va1xBR0ANn8Q/hUGejhlwcv4XR /8bdEX1U8b5aQ7O+DwLCjtLfSHyTY7JlRw/w/K/iV70DdwrEB/aFAuaFRinD+F195Q 8RyHINiVB56Dw== From: Kai-Heng Feng To: kernel-team@lists.ubuntu.com Subject: [J/OEM-5.14] [PATCH 2/2] drm/amdgpu: explicitly check for s0ix when evicting resources Date: Mon, 9 May 2022 13:12:20 +0800 Message-Id: <20220509051220.1965568-3-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509051220.1965568-1-kai.heng.feng@canonical.com> References: <20220509051220.1965568-1-kai.heng.feng@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Mario Limonciello BugLink: https://bugs.launchpad.net/bugs/1972134 This codepath should be running in both s0ix and s3, but only does currently because s3 and s0ix are both set in the s0ix case. Signed-off-by: Mario Limonciello Acked-by: Evan Quan Signed-off-by: Alex Deucher (cherry picked from commit e53d9665ab003df0ece8f869fcd3c2bbbecf7190) Signed-off-by: Kai-Heng Feng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index c8a8ee25a27fb..a926b5ebbfdf5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3939,8 +3939,8 @@ void amdgpu_device_fini_sw(struct amdgpu_device *adev) */ static void amdgpu_device_evict_resources(struct amdgpu_device *adev) { - /* No need to evict vram on APUs for suspend to ram */ - if (adev->in_s3 && (adev->flags & AMD_IS_APU)) + /* No need to evict vram on APUs for suspend to ram or s2idle */ + if ((adev->in_s3 || adev->in_s0ix) && (adev->flags & AMD_IS_APU)) return; if (amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM))