Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp66270pxb; Wed, 20 Apr 2022 16:11:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJxTDtm1MwmC+krmuwRvhwG6iE6YaNbCx/iQ0sam8KTxgofZjkfzC1GI3dUVMVEE+l5ins X-Received: by 2002:a50:d4d9:0:b0:41d:6ee0:80d with SMTP id e25-20020a50d4d9000000b0041d6ee0080dmr25436837edj.254.1650496264517; Wed, 20 Apr 2022 16:11:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650496264; cv=pass; d=google.com; s=arc-20160816; b=YYPFb1r/A9axW2lGlxQfv1CA4+ZB2XYrwuvQNDKson2z+eUx43qLKeFez+z8J61O9e dz0c/5HsomLV+hLL9/Y150fzpFdPalLV7TBc7KpHpt3ijNXk18BSsHWc72dz0rjLoEWe sSRFCV7mZg4/+9xpjsXtQhJbCO/iQHEKxviP27cb96Zknj6SJ6GQLKt+v/x1+EaypBnT grSF8CseNxryWO35/E/gUtJ9/MkVycM8EnKeNtfSNe4FYKlyfEqurt7ZnTuVn/otyeTq c86JAoMoZOdiHHynlwyuygGvOFwG81x1Xu8azeHDsEx9oC3wfqu3n328/cvnX/etyqIw xCsg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=V1+NKfCJsfGjNEjgPkUmaqRmSdLOEElcrTBr2CMDyIc=; b=DW73sBTocaYaAhtS/1QoJ8Sh7m4Nf9jm9pd+KCxywNyIPI9DvHI0JLKjbmTvlaMZLR 1xIO5Ua9pgz78njTo6Pt1UQh66taumHCeCQa8MZSFS6qTIWEctgbvEc7J2j5XtYTSjw2 rqcB4Ot1bhJSe3jKlXcLyIxncN/pswMR6ZjlaXJtqDc73wTxYSqBj5bXb5woAUJz0ubh 6sgH55FlqWwmERqOt6Vwsf8DqSc95Rt2HOm9IoIq9CZD/2r/MV0oNVnst2t8QvMVvR9s +s4F6QOZzZvgSiFreO2i5/mt53kxGZZku4etZRhVQTxyLnDuFYkJMIsXzZmeQ8kEFsC3 yjog== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=LvYDpp95; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v21-20020a1709061dd500b006e8943257bfsi2808479ejh.319.2022.04.20.16.10.40; Wed, 20 Apr 2022 16:11:04 -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=@amd.com header.s=selector1 header.b=LvYDpp95; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354433AbiDSVLa (ORCPT + 99 others); Tue, 19 Apr 2022 17:11:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348783AbiDSVL3 (ORCPT ); Tue, 19 Apr 2022 17:11:29 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2087.outbound.protection.outlook.com [40.107.92.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD5DD326FB for ; Tue, 19 Apr 2022 14:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bMywroP0KTLk4ruuRP5vjh+Y8+quKN0uuwuj9H6MarYJ1xiJ62vbO5CLN3SYH5WS85vkXcSXFmVzccZOLrOo/taE2g90xpNDp/MvZKL0JgMSLMaR0bX+jIDeOx99KE58byNk3dTaNMgLumBLpkV6DnAkZ4jb9Hlur+5/ioFBxii6gsw3SnVA2nL3eC751D/kzZtXkbnSo3vOrZXUgJHCsw3N0Kfu5YRPJgrsJjG+JJ5R+zuoqaeSK1dGGyUMFslBgZj6SXyGvhVK/WAAEH0dEgNl0DjevxY2DPW0bk+A4H/bk2agIi2sTzfSbjEyiEEnrheBL1IdqePcy8Gs46XOPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=V1+NKfCJsfGjNEjgPkUmaqRmSdLOEElcrTBr2CMDyIc=; b=PtPLw9xHjArpOZRsHKi5nEcgHzziZ9aal2hMsDPAplV1M7opQFko03XfJqmFLtOm8RmkLOp9+348du+LUhC7Tf8BntDIj7xsKbInW9n95jyQaqgd/cvJ1XdOFKeRLyiwWBnxK93YSt6JqCDUVuK5FrALVTy3EPFbsZvEN803cXA1MPXorOdBxfNsEQ7+7BeGIzd1PUsdphtuug5/xjTx8tSiKIOeemPkocMk7B8JyZ8AiK+xLhtaugXwlrJWdIHCq02DiZjlKDCZ9WG8MbNHA0+zfdX0uIcpZg/4IPqzq7Bu/5m4IXwqVqVAd82vVKiHc+A+2Ds+oBrqR4cOKxRkwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V1+NKfCJsfGjNEjgPkUmaqRmSdLOEElcrTBr2CMDyIc=; b=LvYDpp95o2taOFJwoQiaBvMYSFXHSAGBZyQOUbTjODk0v/tM1oZMDptPvrtnWdWKjBc55kx9ISSaDX6zqjUHboLPmOTqUTjmOxbovui8iFBKcApX593vDcgRZEcJWyfPLbqDhk/RGOJdfvmGagLu70COAMdgtmc2MclT23cf2Gg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SA0PR12MB4526.namprd12.prod.outlook.com (2603:10b6:806:98::23) by CH2PR12MB5545.namprd12.prod.outlook.com (2603:10b6:610:67::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20; Tue, 19 Apr 2022 21:08:43 +0000 Received: from SA0PR12MB4526.namprd12.prod.outlook.com ([fe80::8515:3855:bed9:3f05]) by SA0PR12MB4526.namprd12.prod.outlook.com ([fe80::8515:3855:bed9:3f05%7]) with mapi id 15.20.5164.025; Tue, 19 Apr 2022 21:08:43 +0000 Message-ID: <39435575-266e-59ef-a0fe-62870ba85129@amd.com> Date: Tue, 19 Apr 2022 16:08:39 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCHv4] drm/amdgpu: disable ASPM on Intel Alder Lake based systems Content-Language: en-US To: Nathan Chancellor Cc: alexander.deucher@amd.com, christian.koenig@amd.com, xinhui.pan@amd.com, airlied@linux.ie, daniel@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, mario.limonciello@amd.com, kernel test robot References: <20220412215000.897344-1-richard.gong@amd.com> From: "Gong, Richard" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BLAPR03CA0135.namprd03.prod.outlook.com (2603:10b6:208:32e::20) To SA0PR12MB4526.namprd12.prod.outlook.com (2603:10b6:806:98::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1acdd24d-ed04-4662-47a4-08da2248c8fc X-MS-TrafficTypeDiagnostic: CH2PR12MB5545:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6Hrb862zJCcRJJdG5wPY5x+iMgD757qPJuO+fMZ6+/AiNRRbsBC393DVrb5XqDyCQbOaUlCQY6i0+KWm6H1aYlyLoQJYex7Q0ioPc5Oz1Q1UX7PPX4ErBF3JEMPu5VAuSiKRAy1PA5cy6UTag6FcKFZBpoXtBhA9t2ShA9EP/o7+eSRSNq6VWjn1Juj/YyOs4bTpm5UgUX2qRUYdOdyGFE8Fq0EjuQYAp4SjsxWK1lAouBa9kt9iMRXZt6DHusRV+rMWFh1ZhVwwVVBQaKW6CX6j9fxsbH4l4Hpc4kNT4hVKJbP9aMSyVCRmoY+3TlYnDTyAEGgcW1E04kQBcv8zTEwrBEe5VBD7UCrLKGdf1hL1s/S2d0uJWZJhhRtPA89ZGDEftn9TU/m83+F5KKS2dwFLEpNw+WKqh/AXKBJpK3L8rCssN0xDPG+tQXlC0mggx87m3oOazwbSAwuEtdgcmDn0IvVKDM1neMUl0BW0xB+hypYRKfqlRdkyjHcxolzUBGB6pXMKee/t/qF3KBjJhB04r2vdl2327gFdSD0wmarq4tJPwmzoNh4Ar2G3wYe/+BmT2du3dCkPqf1f5SChcHRkZWJ7TMgklP2HRCvVi2Xa/7cyJbZG+SbhOuyBoZWYaoar6N7gXEt/LFmZCgb4xYKJZC0M9MQs1QP0qf/Ez3bsDt456XUSACKsGQWCUjvMN2ukkIpVsCgZb/H7BjUkuqFEa+XxlRBYuIatrtibIZLeNR3RFEEoLqGwXZmrE4Y9 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA0PR12MB4526.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(6506007)(186003)(26005)(6512007)(6666004)(45080400002)(53546011)(5660300002)(2906002)(36756003)(8936002)(6486002)(66556008)(83380400001)(38100700002)(2616005)(966005)(66946007)(66476007)(508600001)(316002)(4326008)(6916009)(8676002)(86362001)(31696002)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bk1mOHdNWUMzc0FJNTA5WlNuaVhHdGg0OVJXQW9lZ1V4UEVEQVZiL1pTcFFQ?= =?utf-8?B?WFBvaTB5RzFKbUVjcmZJTnRWNVpEQnpaZ1YvNFdlRERRZzJpN1lvZStTbTY2?= =?utf-8?B?Q2VuWlJqa294YVJYV1NGWmhNT3g5R2oyS1VybzNBRHdsSUNVa2phNWFZZWhF?= =?utf-8?B?S3loZDhlck5zcnc3M2tIU1FRQ2pPMzN1dHJ3YzQ5c0IvMlh6WWprOExZbHhG?= =?utf-8?B?dE90MTJSM1A4MFhMQkJHcy8yUHh4Mml4ZWZTcWlac1hoUXZRNVR4cU9JUk1E?= =?utf-8?B?cElrSnY3WVh4MWlSMjNlUmNsbUsyRTFKRHFtdXFTV2RSUEYvL1ZnT1o4dWRt?= =?utf-8?B?bUV2S21DU05UZnlIUGw2WGpJMGY0VXhrZFBYQW15Uld1bVZrbDQ4TmVIejZO?= =?utf-8?B?a0JzdFcxWXYzREhUOFFuWVRnc212UG11ekR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ZHI3V2Z6NkhXKzZYQ0ZNSGpZVTc5QnUzRFZTeU5ldFVnVDBDMWc2QTRTVjJp?= =?utf-8?B?SGI0b3lXUkVqS3ZRcml0WlFkc2ViSlhHQ2xNNVFBRmRqVU5ZMWhuZz09?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1acdd24d-ed04-4662-47a4-08da2248c8fc X-MS-Exchange-CrossTenant-AuthSource: SA0PR12MB4526.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2022 21:08:43.2575 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2prgIdBiF1e24MuNKoIt+PdxS2aCDRn22J+0qFvdwwHBCZN2FNx6ks7BwM0mmqhFngwR8z16S3Es9qernMnF3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB5545 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi Nathan, On 4/13/2022 10:40 AM, Nathan Chancellor wrote: > Hi Richard, > > On Tue, Apr 12, 2022 at 04:50:00PM -0500, 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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1885&data=04%7C01%7Crichard.gong%40amd.com%7C35699b2c088747daedf508da1d63f1f3%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637854612351767549%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=lzgZ3bV0PLFFl9uo3wt6N1dOoZpU2DqpddAk%2BTX8rEI%3D&reserved=0 >> Reported-by: kernel test robot >> Signed-off-by: Richard Gong >> --- >> v4: s/CONFIG_X86_64/CONFIG_X86 >> enhanced check logic >> 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..b33e0a9bee65 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) >> +#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)) { >> + struct cpuinfo_x86 *c = &cpu_data(0); >> + >> + return !(c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE); >> + } > I have not seen this reported by a bot, sorry if it is a duplicate. This > breaks non-x86 builds (arm64 allmodconfig for example): > > drivers/gpu/drm/amd/amdgpu/vi.c:1144:28: error: implicit declaration of function 'cpu_data' is invalid in C99 [-Werror,-Wimplicit-function-declaration] > struct cpuinfo_x86 *c = &cpu_data(0); > ^ > drivers/gpu/drm/amd/amdgpu/vi.c:1144:27: error: cannot take the address of an rvalue of type 'int' > struct cpuinfo_x86 *c = &cpu_data(0); > ^~~~~~~~~~~~ > drivers/gpu/drm/amd/amdgpu/vi.c:1146:13: error: incomplete definition of type 'struct cpuinfo_x86' > return !(c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE); > ~^ > drivers/gpu/drm/amd/amdgpu/vi.c:1144:10: note: forward declaration of 'struct cpuinfo_x86' > struct cpuinfo_x86 *c = &cpu_data(0); > ^ > drivers/gpu/drm/amd/amdgpu/vi.c:1146:28: error: incomplete definition of type 'struct cpuinfo_x86' > return !(c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE); > ~^ > drivers/gpu/drm/amd/amdgpu/vi.c:1144:10: note: forward declaration of 'struct cpuinfo_x86' > struct cpuinfo_x86 *c = &cpu_data(0); > ^ > drivers/gpu/drm/amd/amdgpu/vi.c:1146:43: error: use of undeclared identifier 'INTEL_FAM6_ALDERLAKE' > return !(c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE); > ^ > 5 errors generated. > > 'struct cpuinfo_x86' is only defined for CONFIG_X86 so this section > needs to guarded with the preprocessor, which is how it was done in v2. > Please go back to that. Thanks, I will do that. Regards, Richard > > Cheers, > Nathan