Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12730159rwd; Fri, 23 Jun 2023 09:51:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ECL0yHxKsLSRZiHMjl/nYfFb1Wy94+FMTf2EL8lC6MBDkOmUFWJ7E+/8Mp/THCiN/+ZvZ X-Received: by 2002:a05:6a20:3d89:b0:125:7c45:ad6 with SMTP id s9-20020a056a203d8900b001257c450ad6mr4324905pzi.15.1687539111965; Fri, 23 Jun 2023 09:51:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687539111; cv=pass; d=google.com; s=arc-20160816; b=vNS5jizDkCbVqtYV9dIZH7QxarD34/VH/rlGnI6eZiS0orn5XlNopG+SAzi0bYYqYJ DjszdrSza7c5t+U+Iab4RPGrSiR5gxJnJ+M4ZeO+PxYYuACIqrFBMjo0x88sd4whRMLV oEyXYyxQaKb4melXUmuZAyg5sMz96nVX6RbUP13GIPDgiitH3LE9UT5rdYvp95aT3mHM x6Cumvhcs9BPsSj0tQZ/trvY+yCysKnP5J4SinfVaByFgM6vLtJWf39eI9LC6/di8qTJ cgrRsAxoQxPb6+LDbdCW6a3T8D6LQzQfVs3H6gf2tYTjUGzOcXa9/20uKSl6Sx67OHD4 ihLQ== 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=l6XQ0U8iZdBfMciciO92IvQbgCD98QPwchDhmike6s0=; b=NC6gdznMFfr2owcJwFCxJHpqmitVRs6Uby7zkvL1Rx9nxXQnoVV5eLBHo26arq/mB7 Bj1XeH00REDnSmk3BIuCfWqjOKTc1sEEVT+kY/1UG3tevlYfxCKJYNiALLotgZw+zDHO LVk1phFS/sQaNhFEdE6TcooCl5xQS06QpGGfNiHGVmRbm14KDYFU9QjqockLVu5wcEoG AmJySK7sObMIwRzdhKnW2eb5Y6Cv5bBPj5rvLa0XF+7oBlLUL3OFI+pj1v22CFVlVbUD O8bp78KzTDTdkJ5iEm5lPK84hIPD16YaUM8fKJAMzzQ8OQJuWgDTBvr8+utQfiq15h2E T75g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=uau83O7Y; 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-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-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 p188-20020a625bc5000000b0066957b1c0a0si7883167pfb.288.2023.06.23.09.51.44; Fri, 23 Jun 2023 09:51:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=uau83O7Y; 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-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-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 S232412AbjFWQuS (ORCPT + 59 others); Fri, 23 Jun 2023 12:50:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232589AbjFWQtX (ORCPT ); Fri, 23 Jun 2023 12:49:23 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2054.outbound.protection.outlook.com [40.107.244.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F37A30CF; Fri, 23 Jun 2023 09:48:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gyxz6psqXfKGtt2NghUKwJ6aeWdU/Knn0ljih5q1FQuKWWX8NNuf8tnUtIBAnP+L5VOWOCyO7iaRdNopujvccNMHlazlqot5uyS4LJoEdMQF1DxQAlc4KPSBsxEmRDi9x+xaBzruBvLh8DLwJujCaJgCuW6EIcn9UDVZyS/ecZp3fLVhvHhxVHDMJkn/z4Lfoyi9gciGbjtmCIB29xLYYYe0KYHFT4ml7S8htwvzOFLlxbKuiP1tR7zbyRc9nf+pn90TXPlW3wXdmR9Y5Fi4GbAr6Wn5e40TmxBzQe4orSHer+IMpG5OS+noPQSceg6rME3517DJbnFkXl77Gn6KYw== 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=l6XQ0U8iZdBfMciciO92IvQbgCD98QPwchDhmike6s0=; b=T2QAQP6L4hv0cUJZdmev2yDvmvzl3Aq2/gkZWrFvWEDUDIX6JBk0Ydh009BIrpydvURLkceKC5RGIbCcOKzbx/csN/XHgmChTc3OUWZ/vCxCmTwyqhuVmroOsTf+LPmBbIFLn+i0NlIO1WR8ILdPNiQ0oJwEBT50HvAjvi9dG6ZCDPeblq/UXxk5TGrOMOfpen21xu+bUipgA7gaibXk6onF1E/a6r/0rGvvf0NNeKWaGm3GDxDdsrfW0b8YnDz9ps3JbdGCx0htL+wEPiB5ouGUmoewcaoRHa62Vll5avBo3q8LmHklYPd4wnGtwq/Ecl6MqFbSs9u5aVk7le4VlQ== 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=l6XQ0U8iZdBfMciciO92IvQbgCD98QPwchDhmike6s0=; b=uau83O7Yt0cqxYgooEfyj5u+WBvq9EFz2e+CMayIO0TR7DRy+u8kOCO+RKa3Am8CQCvNGkcRjd3+Bt5hAOi6Xrn6SuYJR5bV+4LuOIVztqPDcrIwljXivH+WbK1SUL//l8SBVHJmkgBHZzqA/Smf0ByScHRjUtf0qcPH3jvM5/c= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) by SA0PR12MB4496.namprd12.prod.outlook.com (2603:10b6:806:9b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Fri, 23 Jun 2023 16:48:33 +0000 Received: from MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::dfcf:f53c:c778:6f70]) by MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::dfcf:f53c:c778:6f70%5]) with mapi id 15.20.6521.026; Fri, 23 Jun 2023 16:48:33 +0000 Message-ID: <5d6f6a89-1c7f-3763-8616-b80fdc301603@amd.com> Date: Fri, 23 Jun 2023 11:48:29 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH V4 1/8] drivers/acpi: Add support for Wifi band RF mitigations Content-Language: en-US To: "Rafael J. Wysocki" Cc: Evan Quan , lenb@kernel.org, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, johannes@sipsolutions.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mdaenzer@redhat.com, maarten.lankhorst@linux.intel.com, tzimmermann@suse.de, hdegoede@redhat.com, jingyuwang_vip@163.com, lijo.lazar@amd.com, jim.cromie@gmail.com, bellosilicio@gmail.com, andrealmeid@igalia.com, trix@redhat.com, jsg@jsg.id.au, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org References: <20230621054603.1262299-1-evan.quan@amd.com> <20230621054603.1262299-2-evan.quan@amd.com> From: "Limonciello, Mario" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DS7PR03CA0174.namprd03.prod.outlook.com (2603:10b6:5:3b2::29) To MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN0PR12MB6101:EE_|SA0PR12MB4496:EE_ X-MS-Office365-Filtering-Correlation-Id: 38db0673-7828-4fee-8d21-08db7409ae70 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iZEJTaOLhQbjHTdZyoF0Y9mTVwZGX/UU78VbsnB2AnCWS16O9pEdR9uZiUzCLVikkawtABG4Bq7l3h8Wky64r5me+XnhZ0QsSQ1x4czHoWrrIedD/PA6sbp5PZrg+ZGK9TWOAp7reRD6/NeEzYvp0aHkrY4x5S8AL3FQzCzZaseglBY92GMadW3HWDD+6bIuU8FzRaeJuJtUQRuyafhFVij4waGdTKcaJnVIyNwVuqcIYecwZEKIXHXtXdr3gwW1l6pNL624G3vB1P6BE/97TPPizc59sBojONX0crM+3EVr49VkZiO94dCQtLd6UfEqw4+g25OhbmKNqKdrvYm8QL/naVeO+rs80T+aNAM18KGfRw3qJxFxERKv5UJATuqYz91jfD6TTSORxKkyb7fQryDMsRQQJMcErwsIWFhs9IgANAPS7WZ3C4ODemxpuZxSX5qAxKi3wkgB7siZRycKPYq9pvWaENRZknaolZkeWJy2KyclLUxIW1R31n0uEsphN/1teV4J6qxZ8FbDfsGkqr0ldqG5i7esNZnq3OQ4E4Cer3QhQ582FYn9jWlOU41KnU3WPCuStCqcRcD9vutlH5qEngXfU4HFd1BxoNVMpIdhVQfZ4EURIzbfuFHucwtXBvlYFX6sP+ObkBEovEQFwQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR12MB6101.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(366004)(346002)(39860400002)(396003)(376002)(451199021)(8936002)(186003)(8676002)(41300700001)(53546011)(6506007)(2906002)(26005)(6512007)(36756003)(66946007)(66476007)(86362001)(66556008)(6916009)(4326008)(316002)(31696002)(6486002)(6666004)(478600001)(38100700002)(83380400001)(2616005)(31686004)(5660300002)(7416002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VVlNMm5GemdWczZ4SHVuMU0yUkNIdUtmTU5FMktoNmpKUXFvZ3UrZ01DQU5w?= =?utf-8?B?bTJiUlFBeGtEZFYzT1NOMWVXUVhKZjB5K29sbnNwQ2k2UXhod29BZmRMcStO?= =?utf-8?B?V0hQRms4ZG1vVmQwck01RHlyeHhSYkRUR2JrbXVjWXJZVlFrclRFZElUeUt5?= =?utf-8?B?eXZ5OGpnSVRkeDR6TWQ1VXQ1TzJMcFNLY1AwWjlOcUdTQkl1NURaT1p5VGdl?= =?utf-8?B?Z2JVY2dUZktMNXo0ZEJtU1NqdHg1TjBxQ25NMWgzL0cveWZ6RGd3bWNTdkdD?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d1dXU05MVjVmWmU3TFRjZXNu?= =?utf-8?Q?jP8XmM2Yqd041TV+5R8L9UUXl?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 38db0673-7828-4fee-8d21-08db7409ae70 X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2023 16:48:33.4817 (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: MnayWXdH6U2haJb4WfGjJyU0/BA6jYA1ut19O4opyq8goW8ybxa6MLjT/ueesgY04dStfMmkkMhRrUNld9vmLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4496 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-wireless@vger.kernel.org On 6/23/2023 11:28 AM, Rafael J. Wysocki wrote: > On Fri, Jun 23, 2023 at 5:57 PM Limonciello, Mario > wrote: >> >> On 6/23/2023 9:52 AM, Rafael J. Wysocki wrote: >>> On Wed, Jun 21, 2023 at 7:47 AM Evan Quan wrote: >>>> From: Mario Limonciello >>>> >>>> Due to electrical and mechanical constraints in certain platform designs >>>> there may be likely interference of relatively high-powered harmonics of >>>> the (G-)DDR memory clocks with local radio module frequency bands used >>>> by Wifi 6/6e/7. >>>> >>>> To mitigate this, AMD has introduced an ACPI based mechanism that >>>> devices can use to notify active use of particular frequencies so >>>> that devices can make relative internal adjustments as necessary >>>> to avoid this resonance. >>>> >>>> In order for a device to support this, the expected flow for device >>>> driver or subsystems: >>>> >>>> Drivers/subsystems contributing frequencies: >>>> >>>> 1) During probe, check `wbrf_supported_producer` to see if WBRF supported >>> The prefix should be acpi_wbrf_ or acpi_amd_wbrf_ even, so it is clear >>> that this uses ACPI and is AMD-specific. >> I guess if we end up with an intermediary library approach >> wbrf_supported_producer makes sense and that could call acpi_wbrf_*. >> >> But with no intermediate library your suggestion makes sense. >> >> I would prefer not to make it acpi_amd as there is no reason that >> this exact same problem couldn't happen on an >> Wifi 6e + Intel SOC + AMD dGPU design too and OEMs could use the >> same mitigation mechanism as Wifi6e + AMD SOC + AMD dGPU too. > The mitigation mechanism might be the same, but the AML interface very > well may be different. Right.  I suppose right now we should keep it prefixed as "amd", and if it later is promoted as a standard it can be renamed. > > My point is that this particular interface is AMD-specific ATM and I'm > not aware of any plans to make it "standard" in some way. Yeah; this implementation is currently AMD specific AML, but I expect the exact same AML would be delivered to OEMs using the dGPUs. > > Also if the given interface is specified somewhere, it would be good > to have a pointer to that place. It's a code first implementation.  I'm discussing with the owners when they will release it. > >>> Whether or not there needs to be an intermediate library wrapped >>> around this is a different matter. > IMO individual drivers should not be expected to use this interface > directly, as that would add to boilerplate code and overall bloat. The thing is the ACPI method is not a platform method.  It's a function of the device (_DSM). The reason for having acpi_wbrf.c in the first place is to avoid the boilerplate of the _DSM implementation across multiple drivers. > > Also whoever uses it, would first need to check if the device in > question has an ACPI companion. Which comes back to Andrew's point. Either we: Have a generic wbrf_ helper that takes struct *device and internally checks if there is an ACPI companion and support. or Do the check for support in mac80211 + applicable drivers and only call the AMD WBRF ACPI method in those drivers in those cases.