Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp819348pxb; Tue, 12 Apr 2022 14:20:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8AKnx82QuHhOTRstyPjTYETB24ZTzr79QfsWeWaE56l9VbcxpwOSVUoL/HeLK9+/RJ9CT X-Received: by 2002:a65:6918:0:b0:39d:9900:b457 with SMTP id s24-20020a656918000000b0039d9900b457mr3926898pgq.22.1649798402139; Tue, 12 Apr 2022 14:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649798402; cv=none; d=google.com; s=arc-20160816; b=a0y3ZpHB9Zg6legKEs+ic8KZPAKz3/oKcJOeYbrxXePrKVeQkXbELfSNjbcuHeYdCr txG0MoraaZolgSEpyZhsk5nVZ1cPrNdMTjB3EtKI6oRZDkD6IrUatr3dcldLZj3FuRDs WlSaTRe9fa0fmlO+EIS2LlJVNxShKzbKV9gN43fX6r0BTJ/Jbltbg8vZSvsKSNlT9GEe HoYMV3l+xhXseEWN30RJL7oStICdK6RDppStA9rQqYtFFoAPBY/kZv5dhXCIdkc6YYGy Cc+g+ailBNVc+k3STBdrmBdSwV2S6GTFXFI94zE9KGZiPow6N/skivUfwevbtQJBG2hb w0FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZGZNu9iiX3iSvmXUM8rzXVowDpysbTVW80h1NVMIpd0=; b=MJlVnDpZllzfDp/VFl554gljkyT5asCQnj2eeRDjAKgHG/oPjSJME2rPWP5Zn+BbIq stZpRIsTY8cVr2kEmMVKWpE3Q7dfC0eKAM5ogeuro+2Qe/3q7I+TXihudMD5x3Velwbf lGaU4QRRM8xZDIweh2ET45YpGQdNHwIw6fF0NnQUxrzI1Ghyw36njFNg39XBBceb9kM4 ksgVObNp43/ykK8YzFc39d3sIOTBTmQtqFwh3S0euysluBa22JKUE9Q10xxP5CB3U1NY L1blNftqi1IL3pJakDNqqoAXupKF5LoQOFRbOg9eKy7yw49EwVN0lqpRZYSp1p/K8/YR UOtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cnUXGmM7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l10-20020a170903120a00b001568126be52si13284071plh.605.2022.04.12.14.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 14:20:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cnUXGmM7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E677F104A5B; Tue, 12 Apr 2022 13:33:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242897AbiDLPpV (ORCPT + 99 others); Tue, 12 Apr 2022 11:45:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232032AbiDLPpU (ORCPT ); Tue, 12 Apr 2022 11:45:20 -0400 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D84FD5EBC0 for ; Tue, 12 Apr 2022 08:43:02 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id j83so19425420oih.6 for ; Tue, 12 Apr 2022 08:43:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZGZNu9iiX3iSvmXUM8rzXVowDpysbTVW80h1NVMIpd0=; b=cnUXGmM7zHLLJgvWl00m+xYFp1+371WRKCG4/3WQi09uZVR0nnJiO4SCnG8bZjyXa3 ur4i8kaIHHT4fvx/ZfYUpEweUQiDT9CDKTLmzERuNi8t9OL+kKqtRHBMMdtaEJr0ag8z wK0LR/X5rmuzQZB4EtuO+eHu7jji5tfqSRrI7zVxKpNZB5S17nrluTOxQPknb2HOC9t1 89vC0oZvlU70HG0jub9xt56KRz9Vg4G1pgb90mH5ISd6r02jDWIZf5KtrowO0Sni9jye fZKuVvIA+K88P7mfCMAzjAvLgTzGzsaMxMXxF6YLHaDvlVrQUynNwSCX95BX1bfRlR0q aimA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZGZNu9iiX3iSvmXUM8rzXVowDpysbTVW80h1NVMIpd0=; b=a18phHQ/UFtXqGm42lJqc1UEQbk60BQvZmiJSfBEa2CpQjk14OJlUL4r5EaDF3ay68 1wKNHPLmk6JoWddzKQ658jUpJh5iSrLlSyZoKROrIGrcBrwr/+soq8pyvH6RajXn4Uex ef9YE9vDkN2aWQCW6gH/SeT0tvu7FfDzXcbLZ4DmZanGqeV8ApajH99LNJHBWZR1iW/n evtlFd567hZgoWrdeypQIBedLr8oGkmPpyPhzVYX1eicI/OuMpNXbqY5rL3wyohuVQYf 09J3E/IaZBVm7WT96o7pRbDsZ501ep8ZcuBuunIss0pWbWycGPtNJMzSYrtM5tmCCuH9 ywKQ== X-Gm-Message-State: AOAM5318ApytaEiVY+MUGrfvaESLno6EyVk+PYhxBvJoFS9b3JEMCUmT LVxIFliD2sRz6MLmPvzynAYVZQKenHoELlyB+Q8= X-Received: by 2002:a05:6808:1486:b0:2f9:e821:51d9 with SMTP id e6-20020a056808148600b002f9e82151d9mr2140098oiw.253.1649778182265; Tue, 12 Apr 2022 08:43:02 -0700 (PDT) MIME-Version: 1.0 References: <20220412145350.2843514-1-richard.gong@amd.com> In-Reply-To: <20220412145350.2843514-1-richard.gong@amd.com> From: Alex Deucher Date: Tue, 12 Apr 2022 11:42:51 -0400 Message-ID: Subject: Re: [PATCHv3] drm/amdgpu: disable ASPM on Intel Alder Lake based systems To: Richard Gong Cc: "Deucher, Alexander" , Christian Koenig , xinhui pan , Dave Airlie , Daniel Vetter , amd-gfx list , kernel test robot , LKML , Maling list - DRI developers , "Limonciello, Mario" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Tue, Apr 12, 2022 at 10:59 AM Richard Gong wrote: > > Active State Power Management (ASPM) feature is enabled since kernel 5.14. > There are some AMD GFX cards (such as WX3200 and RX640) that won't work > with ASPM-enabled Intel Alder Lake based systems. Using these GFX cards as > video/display output, Intel Alder Lake based systems will hang during > suspend/resume. > > The issue was initially reported on one system (Dell Precision 3660 with > BIOS version 0.14.81), but was later confirmed to affect at least 4 Alder > Lake based systems. > > Add extra check to disable ASPM on Intel Alder Lake based systems. > > Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default") > Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885 > Reported-by: kernel test robot > Signed-off-by: Richard Gong > --- > v3: s/intel_core_asom_chk/aspm_support_quirk_check > correct build error with W=1 option > v2: correct commit description > move the check from chip family to problematic platform > --- > drivers/gpu/drm/amd/amdgpu/vi.c | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c > index 039b90cdc3bc..b0b6353b48b9 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vi.c > +++ b/drivers/gpu/drm/amd/amdgpu/vi.c > @@ -81,6 +81,10 @@ > #include "mxgpu_vi.h" > #include "amdgpu_dm.h" > > +#if IS_ENABLED(CONFIG_X86_64) Shouldn't this be X86? You could theoretically run this on 32 bit. Alex > +#include > +#endif > + > #define ixPCIE_LC_L1_PM_SUBSTATE 0x100100C6 > #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK 0x00000001L > #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK 0x00000002L > @@ -1134,13 +1138,24 @@ static void vi_enable_aspm(struct amdgpu_device *adev) > WREG32_PCIE(ixPCIE_LC_CNTL, data); > } > > +static bool aspm_support_quirk_check(void) > +{ > + if (IS_ENABLED(CONFIG_X86_64)) { > + struct cpuinfo_x86 *c = &cpu_data(0); > + > + return (c->x86 == 6 && c->x86_model != INTEL_FAM6_ALDERLAKE); > + } > + > + return true; > +} > + > static void vi_program_aspm(struct amdgpu_device *adev) > { > u32 data, data1, orig; > bool bL1SS = false; > bool bClkReqSupport = true; > > - if (!amdgpu_device_should_use_aspm(adev)) > + if (!amdgpu_device_should_use_aspm(adev) || !aspm_support_quirk_check()) > return; > > if (adev->flags & AMD_IS_APU || > -- > 2.25.1 >