Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2122234rdb; Mon, 20 Nov 2023 02:36:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IEpm9lLayTWX4F+rpBdWhELRIWbKLy/044lK3s1bwr1yQ6042ez3K7d0S8pXpOEdJsMCQ2g X-Received: by 2002:a17:902:6bcb:b0:1cf:64c0:6384 with SMTP id m11-20020a1709026bcb00b001cf64c06384mr1031784plt.69.1700476577167; Mon, 20 Nov 2023 02:36:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700476577; cv=none; d=google.com; s=arc-20160816; b=Zkaqo8vfudbjqtSX5AmGuSymYSQIW7IvA2fgsqxDVQxPyjt3pAEXFVIMuLOcAlUi9S alotKdEEllgu0kSLqctZ97mXSq6jsfWH0u5hAnJCUC0bI4d4Ag9KFzTyreyOQooe6ns8 DRpHwmttCJ8ynmSjgfSwC1hM8EkC9il0FNeuIVSv21lf5iyRNLcw3kUA4QL9h8GtFMnZ 6f+Oj4+Zxhviqo66DKi3rxTnpAbuWzEozOklWHs3srNY1xowT+TdYBUqt7FKrYWt+r5j RpPEz5P4Gjv14VsYCrX8vrk4DNhD4DehfB2Yf7kQE9TVqWe/dXOzUcq80gvnA9BBe/R2 4qOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=WDa5Zifa699JA7DgA6NqBUl602nqWvF/0Qs0z1ItO6s=; fh=ICmcD5HEWHwOjTEso+CCkQv4i1uEQElBegymdsKV13A=; b=bKR6l8IEmBsfpbESzWX8WVo4o1RcwfbtN5gPeCF9/Z1/sUQ2PEP9yg3yQ6lJJ4G8fw UcoMiHjH2NUMlaJs1F3q1kGmMbFZUf46IxuBU+XkT0zD5SxkJB8/jXvCL2Yt3i4Ix/21 55Zbf+mJHiABywn+RfzsPfqNVswx6LKqkIC/7N8FecyO0e/7q1Vl1asYcFUBG4Epr04Y m/Q1QRgFnSatGBRYFlZsbbB3UlPBE0A4n8dvTVkGXvNfp9ZXmWf6Rd45uVWwgnmhC6U0 BXI4F4d9m6XOamYhXN1JgRoqgbtNPQIwdUNEiOBS5D3yS3ZQwYyT9MkdIq4b3E8OLZmO Rt4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XSX1aJAV; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id l12-20020a170903120c00b001c9af7debbasi8110444plh.520.2023.11.20.02.36.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 02:36:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XSX1aJAV; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5442A8090E97; Mon, 20 Nov 2023 02:35:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233076AbjKTKfS (ORCPT + 54 others); Mon, 20 Nov 2023 05:35:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232849AbjKTKfP (ORCPT ); Mon, 20 Nov 2023 05:35:15 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46C85F2 for ; Mon, 20 Nov 2023 02:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700476511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WDa5Zifa699JA7DgA6NqBUl602nqWvF/0Qs0z1ItO6s=; b=XSX1aJAVxBnOE2QsM2OlWcbguDnWIqcnzEwk4C6NS2+mS729v+8oKcOCLdy1Juu1GZQQNc KxatyVcpqvAGDK8EfbhR7yZp8tCmMBkZKQDVyK/DFpwo/E7DQEzxvxFO1Mt65zQxxSaZGZ E5holZuu05dxMyNK0CdKu6eLLPrL+vc= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-340-hJpcSBxlObWHzmTANMAyeQ-1; Mon, 20 Nov 2023 05:35:09 -0500 X-MC-Unique: hJpcSBxlObWHzmTANMAyeQ-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-9d30a6a67abso304559266b.2 for ; Mon, 20 Nov 2023 02:35:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700476508; x=1701081308; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WDa5Zifa699JA7DgA6NqBUl602nqWvF/0Qs0z1ItO6s=; b=NVPAocpX8JovBNYBlEJO5rzm+00TKfQBaPj2bV0OfxLOiLRWMjVpMi4sT+tb4LzbSE rznB7dSpiv10AHyMYFf4eIAHTW068TzJaCAdjaj2/HrhvB/dR6qokeWQwVXmh57djlTt n66dSuK+z4dbR4RUf0toIr4HDMZ2UgHhhQh5zTsd3mAOMSsGeqCifuBKZPyrUl7TBmpN lCS8A2Nw1TbMcm3E4Z1DG+XQQk+FfQv/e/OrkJkBMWcz9dIBXm63/ohaMbMlj9cXe7gX v70E7FLtSEqu2hL4digbK9hg8fPlnOAqaBB6/jr0yp2pFTKWYrOiWgVXNiOX+ZGlBsCx NoYA== X-Gm-Message-State: AOJu0YwnjBQLokSFOQ3NEH+MchMQudiKLgKwFID+cJv7UU9JJSsIDcVw IDeplarI0RpjxsRiVjS97z82pVNfkcfjyDpIv6CnCOZuH1T2knjZUOwCEDLvoC+eUsSY3bJh6uB L4A2QXHGB97jzfOrnyNjv3WadRmo= X-Received: by 2002:a17:907:c24b:b0:9ae:6ad0:f6db with SMTP id tj11-20020a170907c24b00b009ae6ad0f6dbmr6930268ejc.71.1700476508608; Mon, 20 Nov 2023 02:35:08 -0800 (PST) X-Received: by 2002:a17:907:c24b:b0:9ae:6ad0:f6db with SMTP id tj11-20020a170907c24b00b009ae6ad0f6dbmr6930238ejc.71.1700476507968; Mon, 20 Nov 2023 02:35:07 -0800 (PST) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id p27-20020a1709060ddb00b009fc50ebb062sm1745968eji.4.2023.11.20.02.35.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Nov 2023 02:35:07 -0800 (PST) Message-ID: Date: Mon, 20 Nov 2023 11:35:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v12 1/9] Documentation/driver-api: Add document about WBRF mechanism Content-Language: en-US, nl To: Ma Jun , amd-gfx@lists.freedesktop.org, lenb@kernel.org, johannes@sipsolutions.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, alexander.deucher@amd.com, Lijo.Lazar@amd.com, mario.limonciello@amd.com Cc: majun@amd.com, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, platform-driver-x86@vger.kernel.org References: <20231017025358.1773598-1-Jun.Ma2@amd.com> <20231017025358.1773598-2-Jun.Ma2@amd.com> From: Hans de Goede In-Reply-To: <20231017025358.1773598-2-Jun.Ma2@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 20 Nov 2023 02:35:23 -0800 (PST) Hi, On 10/17/23 04:53, Ma Jun wrote: > Add documentation about AMD's Wifi band RFI mitigation (WBRF) mechanism > explaining the theory and how it is used. > > Signed-off-by: Ma Jun > --- > Documentation/driver-api/wbrf.rst | 73 +++++++++++++++++++++++++++++++ > 1 file changed, 73 insertions(+) > create mode 100644 Documentation/driver-api/wbrf.rst > > diff --git a/Documentation/driver-api/wbrf.rst b/Documentation/driver-api/wbrf.rst > new file mode 100644 > index 000000000000..8561840263b3 > --- /dev/null > +++ b/Documentation/driver-api/wbrf.rst > @@ -0,0 +1,73 @@ > +.. SPDX-License-Identifier: GPL-2.0-or-later > + > +================================= > +WBRF - Wifi Band RFI Mitigations > +================================= > +Due to electrical and mechanical constraints in certain platform designs > +there may be likely interference of relatively high-powered harmonics of > +the GPU memory clocks with local radio module frequency bands used by > +certain Wifi bands. > + > +To mitigate possible RFI interference producers can advertise the > +frequencies in use and consumers can use this information to avoid using > +these frequencies for sensitive features. > + > +When a platform is known to have this issue with any contained devices, > +the platform designer will advertise the availability of this feature via > +ACPI devices with a device specific method (_DSM). > +* Producers with this _DSM will be able to advertise the frequencies in use. > +* Consumers with this _DSM will be able to register for notifications of > +frequencies in use. > + > +Some general terms > +================== > +Producer: such component who can produce high-powered radio frequency > +Consumer: such component who can adjust its in-use frequency in > + response to the radio frequencies of other components to > + mitigate the possible RFI. > + > +To make the mechanism function, those producers should notify active use > +of their particular frequencies so that other consumers can make relative > +internal adjustments as necessary to avoid this resonance. > + > +ACPI interface > +============== > +Although initially used by for wifi + dGPU use cases, the ACPI interface > +can be scaled to any type of device that a platform designer discovers > +can cause interference. > + > +The GUID used for the _DSM is 7B7656CF-DC3D-4C1C-83E9-66E721DE3070. > + > +3 functions are available in this _DSM: > + > +* 0: discover # of functions available > +* 1: record RF bands in use > +* 2: retrieve RF bands in use > + > +Driver programming interface > +============================ > +.. kernel-doc:: drivers/platform/x86/amd/wbrf.c > + > +Sample Usage > +============= > +The expected flow for the producers: > +1) During probe, call `acpi_amd_wbrf_supported_producer` to check if WBRF > +can be enabled for the device. > +2) On using some frequency band, call `acpi_amd_wbrf_add_remove` with 'add' > +param to get other consumers properly notified. > +3) Or on stopping using some frequency band, call > +`acpi_amd_wbrf_add_remove` with 'remove' param to get other consumers notified. > + > +The expected flow for the consumers: > +1) During probe, call `acpi_amd_wbrf_supported_consumer` to check if WBRF > +can be enabled for the device. > +2) Call `amd_wbrf_register_notifier` to register for notification > +of frequency band change(add or remove) from other producers. > +3) Call the `amd_wbrf_retrieve_freq_band` intentionally to retrieve > +current active frequency bands considering some producers may broadcast > +such information before the consumer is up. "intentionally" in this sentence should be "initially" (I presume). With that fixed and Ilpo's review comments addressed you may add my: Reviewed-by: Hans de Goede to this patch. Regards, Hans > +4) On receiving a notification for frequency band change, run > +`amd_wbrf_retrieve_freq_band` again to retrieve the latest > +active frequency bands. > +5) During driver cleanup, call `amd_wbrf_unregister_notifier` to > +unregister the notifier.