Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp591364pxr; Mon, 11 Apr 2022 01:54:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfm+OlTccBxpj5moKxXby3r077Tbx4RCRSR1FzDDHDCGyp0ly2UkSxeaHRMpdcujjzz7wV X-Received: by 2002:a05:6402:1541:b0:41c:bfb9:d56b with SMTP id p1-20020a056402154100b0041cbfb9d56bmr31903663edx.344.1649667253768; Mon, 11 Apr 2022 01:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649667253; cv=none; d=google.com; s=arc-20160816; b=nT/3cFpJKchw6DSx+CFasKHG89fBILJP8GdooCPs71JRz+BZ2GKfVxJbGavuh4ISt5 4lAkywZ575ZUbCR2F2sqJj+0lDInAa3djC0oCDJUW1fwKEdoC1b4k5ulM9FpQtP/s1sc Tl1Rx2lDmCISV2orNg+jXKKaIvGN95mF5OI3K6H1xm8hB9Hiedm+ob0iy55tPEIvfBIj cKNiqINlWeotaZ2mFtZw+MdBvIstrzS8AIPZBbI4nqTlEtFks5eYIbOEUcC8ndmLgqeh LMnbzVJg0dhNe3mmXsMe9PuwGx4Xg5Nb+vRctWsLfJ2n0rSRuPxxBHqyoqsADC4Zi9s/ z70Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=bhP3eIOYqFQ1TLSj31wqQTbMB1cCk1qoaWt6+VR4BLw=; b=Hquu+seZZYrYse37r2HEHH5qNuR4GPwStfiO0E8JdDSIIPzU4lzWBOXTD9ly2uADon XzY+WZzO0/qEiRZ8dOZk3P5IrvCgDnxVaN0neZT3ROsASvnT4dlnI94PHpXiHWPnjkUP 7lNw1ob3JtnwJAKJTAUVW2vmd6ukABf6BX83FMZ5p5oqT7SnitCVG841UqOARnJJI3MO dLC/Ok9vsqexkvCfhutbMH5AR8hS88vvp4hWCAxqSzJLLl6n1PBzJRjMjPIW39A6Y2Wf S71R117xuLggfdkREjoYxboZ7/9Yw7zK5hBqC0jNXSQfoqvVFTZCJXkHLGMO6sjXYZyT Emrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Qu1oWRu2; 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 cf20-20020a170906b2d400b006e7f3811dd3si5567371ejb.118.2022.04.11.01.53.49; Mon, 11 Apr 2022 01:54:13 -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=Qu1oWRu2; 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 S231875AbiDHSP2 (ORCPT + 99 others); Fri, 8 Apr 2022 14:15:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbiDHSP0 (ORCPT ); Fri, 8 Apr 2022 14:15:26 -0400 Received: from mail-oa1-x35.google.com (mail-oa1-x35.google.com [IPv6:2001:4860:4864:20::35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B4F313E0D for ; Fri, 8 Apr 2022 11:13:21 -0700 (PDT) Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-deb9295679so10540319fac.6 for ; Fri, 08 Apr 2022 11:13:21 -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:content-transfer-encoding; bh=bhP3eIOYqFQ1TLSj31wqQTbMB1cCk1qoaWt6+VR4BLw=; b=Qu1oWRu2JGHe24zZhQ4F0+ypq/DSujSGxjFiCTEtij0J1fAO2oFUTpnr9B9qfHoWTm 756Lo5Sh/3bLUXO8RxhWd6obNcOrETC75QRMjwLBYClfaffoygf2/v/YfxyLHKTl5ecJ nVNsJzxjkHMySUYQB1ak4nnoY/U56GCcuvW8Cg04SKviYKoi3iLwj5z6nE97qGjCCtGF KQorSYoGfOvuJvEmLg0qYNnuV9mYVRn2i7oJIVOb69Im5NS+7sgpUEkBfuDPBLbBa26t UvXUWISkiodiQJDHZlbxcv/CGUUkM8gAj0ylpoOiDPy51El4YHmG/B2XsL9/siOSOnTk t0zQ== 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:content-transfer-encoding; bh=bhP3eIOYqFQ1TLSj31wqQTbMB1cCk1qoaWt6+VR4BLw=; b=5XCuRV2nHk8JTcdy21O84VQgEA1dZuSrxmrJnLcCGe+xhh1aez/APO3HmJYt+9IHai IhDvQYSlbzaWD6Arq+sdnzCJSpOgY5dW/E0EcrRmoyq/boeXlpbk/MK8ZzKt7bE99HLQ bG9R+rViRY0vOD0vvo4i+cl9Bq4nCuG4jct6FV4Ef5tRkVT2L50GE8QiZq3ogE1ikfHz mky06LR2Enj1AzzQ7v0Rv6yuUcyFnLJF8r1KqPd6Q87OI7WleETF5pcjQbQlmBGqiez0 Up/mKzD1DiSAgYWiFdoz13LVzZLmJoesMm+yemCE3+1nEwOVEyigpe5AZR9GhIkXCtSe IN9w== X-Gm-Message-State: AOAM530RP3fNkX2bBVAKNTZaMcXmciapIZypbI8pJqj0BcBYpgcCKpAS A0+Qv/54BEiTcypjdNdgEojv0CYj1aC79UI8Ub9XHH/p X-Received: by 2002:a05:6870:d683:b0:de:eaa2:3550 with SMTP id z3-20020a056870d68300b000deeaa23550mr9582559oap.253.1649441599543; Fri, 08 Apr 2022 11:13:19 -0700 (PDT) MIME-Version: 1.0 References: <20220408154447.3519453-1-richard.gong@amd.com> <2603fe3e-2b8b-0161-2812-6c1f21eda02b@amd.com> In-Reply-To: <2603fe3e-2b8b-0161-2812-6c1f21eda02b@amd.com> From: Alex Deucher Date: Fri, 8 Apr 2022 14:13:08 -0400 Message-ID: Subject: Re: [PATCH] drm/amdgpu: disable ASPM for legacy products that don't support ASPM To: "Gong, Richard" Cc: "Limonciello, Mario" , "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" Content-Transfer-Encoding: quoted-printable 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 12:15 PM Gong, Richard wrote: > > Hi Alex, > > On 4/8/2022 10: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; l= inux- > >>> kernel@vger.kernel.org; Limonciello, Mario ; > >>> Gong, Richard > >>> Subject: [PATCH] drm/amdgpu: disable ASPM for legacy products that do= n'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 woul= d > >>> 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. > > I thought that initially. > > But I found out that suspend/resume works just fine on the "problematic" > platform (Dell Precision 3660, Intel ADL based) + AMD W6400 GFX card. > With WX3200 or RX640, suspend/resume works only when ASPM was disabled. > Both WX3200 and RX640 are from CHIP_POLARIS12 family. > > This is why I take chip family approach. Sure, but you could put those polaris12 boards into a different system and they work just fine with ASPM enabled. Alex > > Regards, > > Richard > > > Alex > > > >>> Signed-off-by: Richard Gong > >>> Link: https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%= 2F%2Fgitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1885&data=3D04%7= C01%7CRichard.Gong%40amd.com%7C96f8f686f75f43abb5ed08da19780fab%7C3dd8961fe= 4884e608e11a82d994e183d%7C0%7C0%7C637850300760921285%7CUnknown%7CTWFpbGZsb3= d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000= &sdata=3DxVKC0Q16ho5Y2GDuN%2Fnx68wm6NzOIyR5xJbiXPgqPpQ%3D&reserved= =3D0 > >>> --- > >>> 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 =3D=3D -1 && !pcie_aspm_enabled(pdev)) > >>> amdgpu_aspm =3D 0; > >>> > >>> + /* disable ASPM for the legacy products that don't support ASPM= */ > >>> + if ((flags & AMD_ASIC_MASK) =3D=3D CHIP_POLARIS12) > >>> + amdgpu_aspm =3D 0; > >>> + > >> I think it's problematic to disable it for the entire driver. There m= ight 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 =3D true; > >>> -- > >>> 2.25.1