Received: by 2002:a05:6a10:144:0:0:0:0 with SMTP id 4csp444891pxw; Fri, 8 Apr 2022 11:23:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsvFgXd02D2wLaN+ZFd1G0pvdp0LGA3Ydl3pGVTATTT7u9Rk/8HtAl8kyVDc5oXo+OlYTP X-Received: by 2002:a17:90b:1d08:b0:1c7:5523:6a1f with SMTP id on8-20020a17090b1d0800b001c755236a1fmr23528530pjb.225.1649442210693; Fri, 08 Apr 2022 11:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649442210; cv=none; d=google.com; s=arc-20160816; b=Xd6JszPs+vPfJbwFfhr1ZtsWHH9Lat9W7rqyuP1kwKpetkd8BgVyfP1GW7QV1J790O TjE+gxURkifZiurnaBhKfVxIx8kZW/q9bfOvBXjcqLBydt3p26OPqHvlQJN+lUM7Sq84 4+YH5Aujf55t6tGiKwwlNTF5sWW5BpEgOmIpXpz6I7lCd8WYrc2siMjZNmP2Hdxio7iq YbSBI/u2JupKvUzNSwUTfyqnn9N2o3KhEMmG+gL0laD5R0hy1O3uROkRwEPgQZwg2DV0 fmo4U0JK63br4kp/oiiCAQjELe4ak2bsTZlRmfUmuLf4Kiez4784FFWOjh2LKv6saa85 f+rQ== 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=zgPFew/129J9uUrYqgZcVA+g7qNHsWob0wEdFbRdpLU=; b=FTrA+TeaVhxn4mjrGy1EJmWw759u0D5Yfhsd8BQQk4w9H4qWM8YazNLoyVKtleHcxU Admk43rSpTYGy+ezNGzYCv8wWWEHKedQwMgasScYpjn+JBkaRbt1pDgalcilT2Zz40LT gFhB39BpzK+Pt0IIiM+Hc9uwRycTZa/nUHEG4fIt5O0dVAv6Mh4kcJL95aMleXpqiCsU IjBTPcN4KIHnPJjUcc/6nlwtNdHPxvhiBxaxc3xybBczgJ4302fXtBBHSd6cYL+7FdeX HMe0nQtU+wWn5rt5gOBCMd6ec75vk/Y+LDJ4UiUJVaw9kkoGMZlcrO7+X1AGvfrRGzST m3Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dktOw19q; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q5-20020a170902bd8500b00153b2d165d5si1468772pls.477.2022.04.08.11.23.15; Fri, 08 Apr 2022 11:23:30 -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=@gmail.com header.s=20210112 header.b=dktOw19q; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237861AbiDHP6m (ORCPT + 99 others); Fri, 8 Apr 2022 11:58:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237862AbiDHP6j (ORCPT ); Fri, 8 Apr 2022 11:58:39 -0400 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FB2FDF3D for ; Fri, 8 Apr 2022 08:56:35 -0700 (PDT) Received: by mail-ot1-x333.google.com with SMTP id x8-20020a9d6288000000b005b22c373759so6376473otk.8 for ; Fri, 08 Apr 2022 08:56:35 -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=zgPFew/129J9uUrYqgZcVA+g7qNHsWob0wEdFbRdpLU=; b=dktOw19q9ZbYejGac9aUvdm7bnjZO6AVQ9nVh7HYnAnDGbZlxD+btfMrdrWirobS88 OfBJr4SOeGf7ASzNiaXh3mN79WPPil6Ob2DuXBqxXgJMZH48aNxvRGHb5b1SluttE4RZ 77iMMPzO7WtymN5YLYlbS3iVXWDnNyfzvDHJStRQL33gyQLOprl6NjKepSdRDSiPXUmU 1jJizhER3IGFh/+FrDPao35luJJyGYEL53f7TCMTuIQ+mcUA/DObmR2IOCcSYYOAE726 GMdR+PSEAT7TZEMDfSEhb9gooThqU5UnXh0Hne6kqF3hyNtPveqNs7sQi5Jl/oqaYClP vWOQ== 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=zgPFew/129J9uUrYqgZcVA+g7qNHsWob0wEdFbRdpLU=; b=RI75Men7g30IHLL0wqagw6AaKOox0WtFVqL2MK7mvgsh2y4LrobO5beDU9kTV+7KGi ON7/oAxuPGPG59rAGaO557A7sPiZOnVzYMsPB2f/ZgOok+WL/I4jx5N/XMyPTazwQ9kM RJEaRWgeahtpangTuHwKZFb46kdrlgUlAJA1fovMlY/d1UZ8KN0VbzMhIfvG1YvALd3v 9XKuNH9OPxpm52tOzB2vLsVtszSzIK3BrSb0oaKWgA8p2EJRWBQ7gKaKnAJ9ljlPhfEN zlCO0s5Z+beYGbMPW88kgPJF86B1msT9NbTAM2UXr3rC46KDt8ni9wRgj/VgDnyMVZxV NgRA== X-Gm-Message-State: AOAM531JNd3qmB7JMs9bSl4Xg+xvx60u5i5LiAkxEVlCH++jg/UWjD1Z xgO/VaFWn+Ct8CwCqP4q8RnNUCwrdpn0iDcwf5o/UU5OYw4= X-Received: by 2002:a9d:4702:0:b0:5cd:481a:148a with SMTP id a2-20020a9d4702000000b005cd481a148amr7010989otf.200.1649433394746; Fri, 08 Apr 2022 08:56:34 -0700 (PDT) MIME-Version: 1.0 References: <20220408154447.3519453-1-richard.gong@amd.com> In-Reply-To: From: Alex Deucher Date: Fri, 8 Apr 2022 11:56:23 -0400 Message-ID: Subject: Re: [PATCH] drm/amdgpu: disable ASPM for legacy products that don't support ASPM To: "Limonciello, Mario" Cc: "Gong, Richard" , "Deucher, Alexander" , "Koenig, Christian" , "Pan, Xinhui" , "airlied@linux.ie" , "daniel@ffwll.ch" , "dri-devel@lists.freedesktop.org" , "amd-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 On Fri, Apr 8, 2022 at 11:54 AM Alex Deucher wrote: > > On Fri, Apr 8, 2022 at 11:47 AM Limonciello, Mario > wrote: > > > > [Public] > > > > > > > > > -----Original Message----- > > > From: Gong, Richard > > > Sent: Friday, April 8, 2022 10:45 > > > To: Deucher, Alexander ; Koenig, Christian > > > ; Pan, Xinhui ; > > > airlied@linux.ie; daniel@ffwll.ch > > > Cc: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux- > > > kernel@vger.kernel.org; Limonciello, Mario ; > > > Gong, Richard > > > Subject: [PATCH] drm/amdgpu: disable ASPM for legacy products that don't > > > support ASPM > > > > > > Active State Power Management (ASPM) feature is enabled since kernel > > > 5.14. > > > However there are some legacy products (WX3200 and RX640 are examples) > > > that > > > do not support ASPM. Use them as video/display output and system would > > > hang > > > during suspend/resume. > > > > > > Add extra check to disable ASPM for old products that don't have > > > ASPM support. > > The patch description is incorrect. ASPM works just fine on these > GPUs. It's more of an issue with whether the underlying platform > supports ASPM or not. Rather than disabling a chip family, I would > prefer to add a check for problematic platforms and disable ASPM on > those platforms. For example, see intel_core_rkl_chk() in smu7_hwmgr.c. We disable PCIe DPM on RKL platforms due to compatibility issues with that particular platform. Alex > > Alex > > > > > > > Signed-off-by: Richard Gong > > > Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1885 > > > --- > > > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > > > index bb1c025d9001..8987107f41ee 100644 > > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > > > @@ -2012,6 +2012,10 @@ static int amdgpu_pci_probe(struct pci_dev > > > *pdev, > > > if (amdgpu_aspm == -1 && !pcie_aspm_enabled(pdev)) > > > amdgpu_aspm = 0; > > > > > > + /* disable ASPM for the legacy products that don't support ASPM */ > > > + if ((flags & AMD_ASIC_MASK) == CHIP_POLARIS12) > > > + amdgpu_aspm = 0; > > > + > > > > I think it's problematic to disable it for the entire driver. There might be multiple > > AMDGPUs in the system, and others may support ASPM. > > > > Can it be done just as part of probe for Polaris? > > > > > if (amdgpu_virtual_display || > > > amdgpu_device_asic_has_dc_support(flags & AMD_ASIC_MASK)) > > > supports_atomic = true; > > > -- > > > 2.25.1