From patchwork Wed Dec 21 07:26:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1718158 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=aBbrkJGR; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NcQ4g1L7gz23dV for ; Wed, 21 Dec 2022 18:27:13 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1p7tVD-00078u-1N; Wed, 21 Dec 2022 07:26:59 +0000 Received: from mail-pf1-f179.google.com ([209.85.210.179]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1p7tV8-00078M-6C for kernel-team@lists.ubuntu.com; Wed, 21 Dec 2022 07:26:54 +0000 Received: by mail-pf1-f179.google.com with SMTP id d82so10077075pfd.11 for ; Tue, 20 Dec 2022 23:26:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=xepRoNRFWpCwE/34wjSBaDRIszxdv39Y2h2GWlNo+gY=; b=aBbrkJGRySaE7PCOcfiL7PpIxT84QeiaGfRwX6jmTCDJj7nScmPRS7Bh0AcxJJudA7 2l7+qYQwgbmx9UNiBBlOTHpu5rq3aacvfpHeeFUFOMTCw+LkVQlYc2EfU0BQvEwDwwJ4 jMMLoNn7XAwGx13CrqbW4VvRsRdrWIQpO4q+EJH89K1i61e5PNOoSNo0rAg/y0mZFpmh hid+8yxO+XfipH8Cc077auDMavXN1vX0Muou7Qf/msh0hcNH53nwUNrNOPFIE20N8tDz sgvfkdspNm9wRGjkfVpfiY5+yXYf1SSaZaxaxZdJp6cJZzZttCkUHLxjqqdKTYi+cVtW RD5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=xepRoNRFWpCwE/34wjSBaDRIszxdv39Y2h2GWlNo+gY=; b=dFoetIREfHqbTihEpMnvidmG2ZbzvJPdWYHMBGkU3+c1Zu1xLalP4CCeJUdpUdN/dF O4jBlxeXymcI87XStHLoyBi+rcvG+9UJw+erZjwdCJUPWI4CBr2HnqOnA4h8xft944e8 pmbkY5mZAzxM4nIc2TBoUdaYHQZd7F5S31B6vH5sbYac8RTCaf6xuwc70V2wtZapB/Yd nSrynMm6GwVJsoJ18DYPcI7Ftabd55/FgI+QOzTXx80jzzCw3wb3ucweHR+PIInt0XK8 3DVod2YmoSQ+rxu+sEJmrClHTXEI7MG+T2w8xRysz3BEcu0y3j1Wl8FQl27/uALpIkNz iR/w== X-Gm-Message-State: AFqh2krNSUZAvv+fQjE5zKj9sgER57jxUT+ydkN4bKmni4ynTZzR0KaU 208YIBem87xwBDd02Km+WIl47s64ojI= X-Google-Smtp-Source: AMrXdXvQHQ5ETWLXiJsxQSUHNxbU7WzJUVmTd2arsr9wy3Kp+yTKEUfDE3MvP+l4uOncfPiUuQTu2g== X-Received: by 2002:aa7:9794:0:b0:577:f836:6bcb with SMTP id o20-20020aa79794000000b00577f8366bcbmr1621086pfp.29.1671607612114; Tue, 20 Dec 2022 23:26:52 -0800 (PST) Received: from localhost (118-163-61-247.hinet-ip.hinet.net. [118.163.61.247]) by smtp.gmail.com with ESMTPSA id d2-20020a623602000000b00576145a9bd0sm9772970pfa.127.2022.12.20.23.26.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 23:26:51 -0800 (PST) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/5][SRU][OEM-5.17] drm/amdgpu: Remove ATC L2 access for MMHUB 2.1.x Date: Wed, 21 Dec 2022 15:26:43 +0800 Message-Id: <20221221072647.8981-2-acelan.kao@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221221072647.8981-1-acelan.kao@canonical.com> References: <20221221072647.8981-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.210.179; envelope-from=acelan@gmail.com; helo=mail-pf1-f179.google.com 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: Lijo Lazar BugLink: https://launchpad.net/bugs/2000110 MMHUB 2.1.x versions don't have ATCL2. Remove accesses to ATCL2 registers. Since they are non-existing registers, read access will cause a 'Completer Abort' and gets reported when AER is enabled with the below patch. Tagging with the patch so that this is backported along with it. v2: squash in uninitialized warning fix (Nathan Chancellor) Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") Signed-off-by: Lijo Lazar Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org (cherry picked from commit d2c4c1569a7d7d5c8f75963bf2d62d7aeac30e2a) Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 28 +++++++------------------ 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c index 3718ff610ab28..1fcf751eabf04 100644 --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c @@ -32,8 +32,6 @@ #include "gc/gc_10_1_0_offset.h" #include "soc15_common.h" -#define mmMM_ATC_L2_MISC_CG_Sienna_Cichlid 0x064d -#define mmMM_ATC_L2_MISC_CG_Sienna_Cichlid_BASE_IDX 0 #define mmDAGB0_CNTL_MISC2_Sienna_Cichlid 0x0070 #define mmDAGB0_CNTL_MISC2_Sienna_Cichlid_BASE_IDX 0 @@ -572,7 +570,6 @@ static void mmhub_v2_0_update_medium_grain_clock_gating(struct amdgpu_device *ad case IP_VERSION(2, 1, 0): case IP_VERSION(2, 1, 1): case IP_VERSION(2, 1, 2): - def = data = RREG32_SOC15(MMHUB, 0, mmMM_ATC_L2_MISC_CG_Sienna_Cichlid); def1 = data1 = RREG32_SOC15(MMHUB, 0, mmDAGB0_CNTL_MISC2_Sienna_Cichlid); break; default: @@ -606,8 +603,6 @@ static void mmhub_v2_0_update_medium_grain_clock_gating(struct amdgpu_device *ad case IP_VERSION(2, 1, 0): case IP_VERSION(2, 1, 1): case IP_VERSION(2, 1, 2): - if (def != data) - WREG32_SOC15(MMHUB, 0, mmMM_ATC_L2_MISC_CG_Sienna_Cichlid, data); if (def1 != data1) WREG32_SOC15(MMHUB, 0, mmDAGB0_CNTL_MISC2_Sienna_Cichlid, data1); break; @@ -632,8 +627,8 @@ static void mmhub_v2_0_update_medium_grain_light_sleep(struct amdgpu_device *ade case IP_VERSION(2, 1, 0): case IP_VERSION(2, 1, 1): case IP_VERSION(2, 1, 2): - def = data = RREG32_SOC15(MMHUB, 0, mmMM_ATC_L2_MISC_CG_Sienna_Cichlid); - break; + /* There is no ATCL2 in MMHUB for 2.1.x */ + return; default: def = data = RREG32_SOC15(MMHUB, 0, mmMM_ATC_L2_MISC_CG); break; @@ -644,18 +639,8 @@ static void mmhub_v2_0_update_medium_grain_light_sleep(struct amdgpu_device *ade else data &= ~MM_ATC_L2_MISC_CG__MEM_LS_ENABLE_MASK; - if (def != data) { - switch (adev->ip_versions[MMHUB_HWIP][0]) { - case IP_VERSION(2, 1, 0): - case IP_VERSION(2, 1, 1): - case IP_VERSION(2, 1, 2): - WREG32_SOC15(MMHUB, 0, mmMM_ATC_L2_MISC_CG_Sienna_Cichlid, data); - break; - default: - WREG32_SOC15(MMHUB, 0, mmMM_ATC_L2_MISC_CG, data); - break; - } - } + if (def != data) + WREG32_SOC15(MMHUB, 0, mmMM_ATC_L2_MISC_CG, data); } static int mmhub_v2_0_set_clockgating(struct amdgpu_device *adev, @@ -693,7 +678,10 @@ static void mmhub_v2_0_get_clockgating(struct amdgpu_device *adev, u32 *flags) case IP_VERSION(2, 1, 0): case IP_VERSION(2, 1, 1): case IP_VERSION(2, 1, 2): - data = RREG32_SOC15(MMHUB, 0, mmMM_ATC_L2_MISC_CG_Sienna_Cichlid); + /* There is no ATCL2 in MMHUB for 2.1.x. Keep the status + * based on DAGB + */ + data = MM_ATC_L2_MISC_CG__ENABLE_MASK; data1 = RREG32_SOC15(MMHUB, 0, mmDAGB0_CNTL_MISC2_Sienna_Cichlid); break; default: From patchwork Wed Dec 21 07:26:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1718154 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=oILqZcYv; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NcQ4g10x2z23dR for ; Wed, 21 Dec 2022 18:27:13 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1p7tVD-000799-9X; Wed, 21 Dec 2022 07:26:59 +0000 Received: from mail-pj1-f52.google.com ([209.85.216.52]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1p7tVA-00078V-D0 for kernel-team@lists.ubuntu.com; Wed, 21 Dec 2022 07:26:56 +0000 Received: by mail-pj1-f52.google.com with SMTP id n65-20020a17090a2cc700b0021bc5ef7a14so1291004pjd.0 for ; Tue, 20 Dec 2022 23:26:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=S6TgLcl/gniPoswhqwBj4NTgmMm7pf3z9a7HPVNj2Lc=; b=oILqZcYvkFjPelaPmhM6NjUAnirdAKzBznqLITruXupH/1ZK5Ef0tz1ncX8O8Hd8Sk +s/pI6VKRUzkhktvcUIi6wKNpOTGetFptC1nQa24HSBUgKE/Or2SblxwDKkQxWQCM7RR oYlxfH/LfWxetoxzZG+D2uIu8TPfe7q9xzzB3byUzLxXNEBhauUzJHEAwNa/fKwrBSEN LnHu6q08nvefJSCxxKLy8LVpZ9xKQBQAKVHIzp6+LOmIEYSqUrzVvNRcMTLG0kvXjwfU X0faYA9W+AHOKqYb8K9NcRo6VaTedU+/hKFp73dH37Sa1h+tHpGQ7zs/zD5bwlgMbabq SovQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=S6TgLcl/gniPoswhqwBj4NTgmMm7pf3z9a7HPVNj2Lc=; b=3hvpXTIQvrZhbL9G/biEignH72G0yxTbq9bYEu7ukeGq33wtPWepaT2gglXPY0UC1/ oDhBxvRZGxUq+0UDLBX0KfF+/61U7XB1JBbx3h7467qViPcWPD0AKZnFjlxqQ6cMl1ex OYPwTzSc8qLzVG3TS2pEo5oGdaaGXYe8tuQDwMPK9KsQ1up8MZb5qc0d8V6NFiNIWknf ezCxmiboatE7DsG8dLGnmH9w8tQasqNlQ/BB/q/D6ysUIkIyXK3Zi7GYU3Qng02a125K 2Cgh/Bkrlp5k3LXbJCPTFSUvwPpWmR483qu8w8GCVMGRBxTiBWyEvN1DuqSW0n+o843w Lrbg== X-Gm-Message-State: AFqh2kreqwcS88zZ0vGLkvHEFmx1htDcEkvKUIx4ZIlSx6kjsm9ZDIBp VlKxmEy17cYPOmDlY0WuCgtOzv4hE3U= X-Google-Smtp-Source: AMrXdXscyzxmgtcaUiX2Bf+G+jIpgQ+nfnxsW5rlfqkz/ei9HL/R1838z2WPbtfvchaiDwiBZOHnVA== X-Received: by 2002:a17:902:7488:b0:189:f708:9b67 with SMTP id h8-20020a170902748800b00189f7089b67mr1086252pll.46.1671607614415; Tue, 20 Dec 2022 23:26:54 -0800 (PST) Received: from localhost (118-163-61-247.hinet-ip.hinet.net. [118.163.61.247]) by smtp.gmail.com with ESMTPSA id p10-20020a170902e74a00b00189b2b8dbedsm10641151plf.228.2022.12.20.23.26.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 23:26:53 -0800 (PST) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/5][SRU][OEM-5.17] drm/amd/pm: disable BACO entry/exit completely on several sienna cichlid cards Date: Wed, 21 Dec 2022 15:26:44 +0800 Message-Id: <20221221072647.8981-3-acelan.kao@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221221072647.8981-1-acelan.kao@canonical.com> References: <20221221072647.8981-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.52; envelope-from=acelan@gmail.com; helo=mail-pj1-f52.google.com 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: Guchun Chen BugLink: https://launchpad.net/bugs/2000110 To avoid hardware intermittent failures. Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher (cherry picked from commit 7bb91228291aa95bfee3b9d5710887673711c74c) Signed-off-by: Chia-Lin Kao (AceLan) --- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c index c96d57ad47ea9..a32884282f589 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c @@ -361,6 +361,17 @@ static void sienna_cichlid_check_bxco_support(struct smu_context *smu) smu_baco->platform_support = (val & RCC_BIF_STRAP0__STRAP_PX_CAPABLE_MASK) ? true : false; + + /* + * Disable BACO entry/exit completely on below SKUs to + * avoid hardware intermittent failures. + */ + if (((adev->pdev->device == 0x73A1) && + (adev->pdev->revision == 0x00)) || + ((adev->pdev->device == 0x73BF) && + (adev->pdev->revision == 0xCF))) + smu_baco->platform_support = false; + } } From patchwork Wed Dec 21 07:26:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1718159 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=CW3MSiIm; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NcQ4g0yY2z23dP for ; Wed, 21 Dec 2022 18:27:13 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1p7tVF-00079o-Gq; Wed, 21 Dec 2022 07:27:01 +0000 Received: from mail-pf1-f173.google.com ([209.85.210.173]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1p7tVD-00078r-6t for kernel-team@lists.ubuntu.com; Wed, 21 Dec 2022 07:26:59 +0000 Received: by mail-pf1-f173.google.com with SMTP id 130so10086149pfu.8 for ; Tue, 20 Dec 2022 23:26:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=rOjelSiP9oyUmldPg2fx7vgTaKeKUzrCkMQwFd1mjpo=; b=CW3MSiImMnVY5zzjC21umCWO9uH/KdFLLUxD7orJKo7GwgKBNNled1CC6YbWU4UhOF 1Jm4BYqXLNkmWP3+5m0FwRiRICPXMVebFW53Z2N8RMPJGZcsIFk1xpAzCwp+vkmNUosm RLzCBlc+pUyufKiqTv+Pu1j2FrNHBcYQSx4NVnQNumdDW60kocWtZoy9v9585QW3CF9Z yw2igplgnKRVQN/QUYnCnIcNSh09l4JCojMlw8AnZLbAdpHxsbeEyeaDBEaGhHU/HXYH k6NWWgskDlhcnVZcJSiOJKF7D+5SIZ/ijOmt+5d6qECQWdTFWFiYupKGdLvX7uz9ziC6 4obA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=rOjelSiP9oyUmldPg2fx7vgTaKeKUzrCkMQwFd1mjpo=; b=7pV4DJ06CGCJu9WwoR055g3KHefe9Wsg83/TV4uUYRZwr3pEpgR14+bQClv9OIiL5q e5tQ5wUTmPfJguDFXSf4Rna2+ITrhEp/MMqqSZMmNcpnx4TPteYBZ7p1fo0npM00KJe/ Zs/uEfKSX9/5xZa7SaCFvpe6dwmi09thyvMOvgSZrlL+saeXBkj3exwUpCvs1RS00qCB cWXgJSbCJNYzPMGwb2iFaFOzaubEu6Jir9vnAb9hkMhHcCS4HaJQEdGwueNzTvxwlz/5 94onB8PJ9Y39zrIPoll7cO7fc4+A+tH91HjEzvZOlAUQd4Erpscv8G4jsOCoOc4yy4S5 ExSA== X-Gm-Message-State: AFqh2kpJAvoVce+MQW+fiN3VOiP+6IvBthTjGo+xl7K2Ohsmtox756Yw lR5xcbsEogPLpTg5Dwn3JguenD/un9I= X-Google-Smtp-Source: AMrXdXs980cQMmwuWGTkpL4Im1nRmh7JutFUzRuLPwo+qYd3tdxiFcboAzL+IYqs4gj1KbsHXnpNIw== X-Received: by 2002:aa7:8a43:0:b0:576:f334:6740 with SMTP id n3-20020aa78a43000000b00576f3346740mr528115pfa.23.1671607617162; Tue, 20 Dec 2022 23:26:57 -0800 (PST) Received: from localhost (118-163-61-247.hinet-ip.hinet.net. [118.163.61.247]) by smtp.gmail.com with ESMTPSA id y15-20020aa79aef000000b0056262811c5fsm9868141pfp.59.2022.12.20.23.26.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 23:26:56 -0800 (PST) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/5][SRU][OEM-5.17] drm/amdgpu: disable BACO on special BEIGE_GOBY card Date: Wed, 21 Dec 2022 15:26:45 +0800 Message-Id: <20221221072647.8981-4-acelan.kao@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221221072647.8981-1-acelan.kao@canonical.com> References: <20221221072647.8981-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.210.173; envelope-from=acelan@gmail.com; helo=mail-pf1-f173.google.com 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: Guchun Chen BugLink: https://launchpad.net/bugs/2000110 Still avoid intermittent failure. Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Acked-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org (cherry picked from commit 0c85c067c9d9d7a1b2cc2e01a236d5d0d4a872b5) Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c index a32884282f589..9d572982897da 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c @@ -369,7 +369,9 @@ static void sienna_cichlid_check_bxco_support(struct smu_context *smu) if (((adev->pdev->device == 0x73A1) && (adev->pdev->revision == 0x00)) || ((adev->pdev->device == 0x73BF) && - (adev->pdev->revision == 0xCF))) + (adev->pdev->revision == 0xCF)) || + ((adev->pdev->device == 0x7422) && + (adev->pdev->revision == 0x00))) smu_baco->platform_support = false; } From patchwork Wed Dec 21 07:26:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1718157 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=KR+aGUgs; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NcQ4g136Bz23dS for ; Wed, 21 Dec 2022 18:27:13 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1p7tVI-0007E9-UN; Wed, 21 Dec 2022 07:27:04 +0000 Received: from mail-pj1-f44.google.com ([209.85.216.44]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1p7tVF-00079U-6A for kernel-team@lists.ubuntu.com; Wed, 21 Dec 2022 07:27:01 +0000 Received: by mail-pj1-f44.google.com with SMTP id u5so14852099pjy.5 for ; Tue, 20 Dec 2022 23:27:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=g52p8BJQoFYUY05g4GwfjDW3f1GkOYgP6h3ge84MIQ4=; b=KR+aGUgsyVUy+R0Jn3NQSaY4LGx+J9mFBVvZ3kKAgx1FpDbmgkKpi/IK2C3OObHFiX JdfPTCZeloY38Bhk37f7Jnfkf0zD0VoK9aJ5PMILFKubBBj0u35eMGWhioWwQkOv0aBW hJ5pr8hhMosNl/DKOLU1k12D4UQeZVqk87QGh60bG3PWzqLQH49mVFoljpbKcI6rNtkc TQV4Bmvl8x7dpVYTSSudZRvlQA1l9+Dba3vBHgYTE39dPBjTWvTkGMV7J2COXTJx2yOo EfT4MT5rm29B6jAoxknJJER+t4B9oYwYxI2657OBfNRSUH6aHq+QtmYLsCacNfZlWU2T 0FVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=g52p8BJQoFYUY05g4GwfjDW3f1GkOYgP6h3ge84MIQ4=; b=g+k+RbgjbaErdnJpxSJyuWYFHH6bkHAG2D/JUTT86XYwcCS9dHqwJPSZsZw/paDSC8 AMOropYpMvfLttu7LxGaQJG0oOmf5v1bO62NYcqouTE7GJBiSs9zpydATsjLayPCSEFk 3O21pBAm62MTcbzcE66wxakQ+2815pWgvRy2NX+rWTvK0AcZb4luWh6Quo0aobsRC1ek OvRwmyWe2OCr5u3J8wQdDqVixQxlwvBxDmGMlcvJsBQ4cRh9F+4vNPb6VHftPJbFC/4n EEA+1HuCoaLSbzxF9/USJSatBKa1+BN9tZWi4J2t21t8cSAfnbTrkjJlAuaiOfAHez+y BBnA== X-Gm-Message-State: AFqh2kpQxnlAVZWJr63AcAr5RHVB9fI8SNcglJELrwWi9SRnwEwUdi9g kLqoEazVpLxWRJxPEb08MJP4lVknt/8= X-Google-Smtp-Source: AMrXdXvstgAX7k7Cw33/GGQSfe9zvdvJqHbQqGtmHwcirYL52phhGmU62Ul9SqpTsHKLn6RKW4pJMQ== X-Received: by 2002:a17:902:bcc5:b0:189:cc58:77a8 with SMTP id o5-20020a170902bcc500b00189cc5877a8mr1041640pls.46.1671607619250; Tue, 20 Dec 2022 23:26:59 -0800 (PST) Received: from localhost (118-163-61-247.hinet-ip.hinet.net. [118.163.61.247]) by smtp.gmail.com with ESMTPSA id im15-20020a170902bb0f00b00189c9f7fac1sm10613475plb.62.2022.12.20.23.26.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 23:26:58 -0800 (PST) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 4/5][SRU][OEM-5.17] drm/amdgpu: disable BACO support on more cards Date: Wed, 21 Dec 2022 15:26:46 +0800 Message-Id: <20221221072647.8981-5-acelan.kao@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221221072647.8981-1-acelan.kao@canonical.com> References: <20221221072647.8981-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.44; envelope-from=acelan@gmail.com; helo=mail-pj1-f44.google.com 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: Guchun Chen BugLink: https://launchpad.net/bugs/2000110 Otherwise, some unexpected PCIE AER errors will be observed in runtime suspend/resume cycle. Signed-off-by: Guchun Chen Acked-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 192039f12233c9063d040266e7c98188c7c89dec) Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c index 9d572982897da..5e79b79f2530f 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c @@ -371,6 +371,10 @@ static void sienna_cichlid_check_bxco_support(struct smu_context *smu) ((adev->pdev->device == 0x73BF) && (adev->pdev->revision == 0xCF)) || ((adev->pdev->device == 0x7422) && + (adev->pdev->revision == 0x00)) || + ((adev->pdev->device == 0x73A3) && + (adev->pdev->revision == 0x00)) || + ((adev->pdev->device == 0x73E3) && (adev->pdev->revision == 0x00))) smu_baco->platform_support = false; From patchwork Wed Dec 21 07:26:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1718155 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ZyJ86FOU; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NcQ4g0vm5z23dC for ; Wed, 21 Dec 2022 18:27:14 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1p7tVM-0007Iv-9E; Wed, 21 Dec 2022 07:27:08 +0000 Received: from mail-pj1-f43.google.com ([209.85.216.43]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1p7tVI-0007Bj-FR for kernel-team@lists.ubuntu.com; Wed, 21 Dec 2022 07:27:04 +0000 Received: by mail-pj1-f43.google.com with SMTP id v13-20020a17090a6b0d00b00219c3be9830so1249477pjj.4 for ; Tue, 20 Dec 2022 23:27:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=2scyLDNRZu4IrA98sT50AY/6yOGVC1ufgdyftLbJsWw=; b=ZyJ86FOUPIg1IrwhMwtp/nQVVOkYW6GunvgMooljWx8ssNT2V5F7A8m0AWfyyhQvKQ 132Cbn0vCGA3So8h5MNQROXn00poiOZknRvUn9MlBm8e3KHTwR/HhSUF7/LXYsc1VmQb tokZux0DyRSZKqgUxqY9QMhBxn6/Yygbygm0odcPa6tvMwRKiikM/WSnrdZdBAbFCbJp FyKmbjcc3EbMH6OtcsyP7Selv3q7Z13DAG9f6h0ZiAo8jkML58A6WiucuaLMLJXL5sBA 6rUo5eO0pFZ07znjDhRHyOY5pgpCGn4B83FLzLblaUbfgLQZz6naQioaeM4L5LfZZeJx hMPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=2scyLDNRZu4IrA98sT50AY/6yOGVC1ufgdyftLbJsWw=; b=4awdimxJ82nZbha5entZhzLdZYhDbOvk4JHFHM5L678Epwzj0m/LMO3Fs1gsRSviwv aY/vfT7a8PCNwFUBIlswDyVl/wQRlPu4sEwsblGCa82yh0JxZbA31iPjlIPqUvPUs2HE RloBg/NGZSaEYQEDHMYqrkd/Dd5q7Z2W9q7PmmH8CSUpR/drbTkX+9JHkst+WBCWgZjn SBrMvU5TfEqgsGPMtAsfVR7OEEw8TqrigwQUcfPETK0boQf8YNJqtnOxBcmd13O0/tmU dPrt1oWBYAOZeGErsrZSENvAoMvb7wyq5Et3ggi8Xk/+FWFC7uLHQxpXsow9zVV/4SuL Vx1A== X-Gm-Message-State: AFqh2kq41/Aaeha3mSOQRRng+aV2hdVbywFfJLUI7zrdJBpOMKO6AGtG VUbOpFDpQ93IsnRME4ZlZInyJR8hJEk= X-Google-Smtp-Source: AMrXdXv00cEkXPqGXq+cd9m9kQChNGGdOw+zbIflskOr6RWitv9T1lnDh4uvryyBf6z+xzx1vyAnwA== X-Received: by 2002:a17:903:32cc:b0:189:129e:92af with SMTP id i12-20020a17090332cc00b00189129e92afmr1587906plr.14.1671607622310; Tue, 20 Dec 2022 23:27:02 -0800 (PST) Received: from localhost (118-163-61-247.hinet-ip.hinet.net. [118.163.61.247]) by smtp.gmail.com with ESMTPSA id m6-20020a170902768600b001769206a766sm10543372pll.307.2022.12.20.23.27.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 23:27:01 -0800 (PST) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 5/5][SRU][OEM-5.17] drm/amdgpu: make sure to init common IP before gmc Date: Wed, 21 Dec 2022 15:26:47 +0800 Message-Id: <20221221072647.8981-6-acelan.kao@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221221072647.8981-1-acelan.kao@canonical.com> References: <20221221072647.8981-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.43; envelope-from=acelan@gmail.com; helo=mail-pj1-f43.google.com 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: Alex Deucher BugLink: https://launchpad.net/bugs/2000110 Move common IP init before GMC init so that HDP gets remapped before GMC init which uses it. This fixes the Unsupported Request error reported through AER during driver load. The error happens as a write happens to the remap offset before real remapping is done. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216373 The error was unnoticed before and got visible because of the commit referenced below. This doesn't fix anything in the commit below, rather fixes the issue in amdgpu exposed by the commit. The reference is only to associate this commit with below one so that both go together. Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") Acked-by: Christian König Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org (cherry picked from commit a8671493d2074950553da3cf07d1be43185ef6c6) Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 7956089ed95a3..ce352aad42ff3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2357,8 +2357,16 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev) } adev->ip_blocks[i].status.sw = true; - /* need to do gmc hw init early so we can allocate gpu mem */ - if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC) { + if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON) { + /* need to do common hw init early so everything is set up for gmc */ + r = adev->ip_blocks[i].version->funcs->hw_init((void *)adev); + if (r) { + DRM_ERROR("hw_init %d failed %d\n", i, r); + goto init_failed; + } + adev->ip_blocks[i].status.hw = true; + } else if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC) { + /* need to do gmc hw init early so we can allocate gpu mem */ /* Try to reserve bad pages early */ if (amdgpu_sriov_vf(adev)) amdgpu_virt_exchange_data(adev); @@ -3016,8 +3024,8 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev) int i, r; static enum amd_ip_block_type ip_order[] = { - AMD_IP_BLOCK_TYPE_GMC, AMD_IP_BLOCK_TYPE_COMMON, + AMD_IP_BLOCK_TYPE_GMC, AMD_IP_BLOCK_TYPE_PSP, AMD_IP_BLOCK_TYPE_IH, };