From: Simon Horman <horms@kernel.org>
To: Evan Quan <evan.quan@amd.com>
Cc: rafael@kernel.org, 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,
Mario.Limonciello@amd.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, andrew@lunn.ch, 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
Subject: Re: [PATCH V8 2/9] drivers core: add ACPI based WBRF mechanism introduced by AMD
Date: Fri, 11 Aug 2023 11:37:38 +0200 [thread overview]
Message-ID: <ZNYBYuUSaio66vLN@vergenet.net> (raw)
In-Reply-To: <20230810073803.1643451-3-evan.quan@amd.com>
On Thu, Aug 10, 2023 at 03:37:56PM +0800, Evan Quan wrote:
> AMD has introduced an ACPI based mechanism to support WBRF for some
> platforms with AMD dGPU + WLAN. This needs support from BIOS equipped
> with necessary AML implementations and dGPU firmwares.
>
> For those systems without the ACPI mechanism and developing solutions,
> user can use/fall-back the generic WBRF solution for diagnosing potential
> interference issues.
>
> And for the platform which does not equip with the necessary AMD ACPI
> implementations but with CONFIG_WBRF_AMD_ACPI built as 'y', it will
> fall back to generic WBRF solution if the `wbrf` is set as "on".
>
> Co-developed-by: Mario Limonciello <mario.limonciello@amd.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> Co-developed-by: Evan Quan <evan.quan@amd.com>
> Signed-off-by: Evan Quan <evan.quan@amd.com>
...
> diff --git a/drivers/acpi/amd_wbrf.c b/drivers/acpi/amd_wbrf.c
...
> +static bool check_acpi_wbrf(acpi_handle handle, u64 rev, u64 funcs)
> +{
> + int i;
> + u64 mask = 0;
> + union acpi_object *obj;
> +
> + if (funcs == 0)
> + return false;
> +
> + obj = acpi_evaluate_wbrf(handle, rev, 0);
> + if (!obj)
> + return false;
> +
> + if (obj->type != ACPI_TYPE_BUFFER)
> + return false;
> +
> + /*
> + * Bit vector providing supported functions information.
> + * Each bit marks support for one specific function of the WBRF method.
> + */
> + for (i = 0; i < obj->buffer.length && i < 8; i++)
> + mask |= (((u64)obj->buffer.pointer[i]) << (i * 8));
> +
> + ACPI_FREE(obj);
> +
> + if ((mask & BIT(WBRF_ENABLED)) &&
> + (mask & funcs) == funcs)
Hi Evan,
a minor nit from my side: the indentation of the line above seems odd.
if ((mask & BIT(WBRF_ENABLED)) &&
(mask & funcs) == funcs)
> + return true;
> +
> + return false;
> +}
...
next prev parent reply other threads:[~2023-08-11 9:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 7:37 [PATCH V8 0/9] Enable Wifi RFI interference mitigation feature support Evan Quan
2023-08-10 7:37 ` [PATCH V8 1/9] drivers core: Add support for Wifi band RF mitigations Evan Quan
2023-08-10 15:41 ` Randy Dunlap
2023-08-14 8:03 ` Quan, Evan
2023-08-10 7:37 ` [PATCH V8 2/9] drivers core: add ACPI based WBRF mechanism introduced by AMD Evan Quan
2023-08-11 9:37 ` Simon Horman [this message]
2023-08-14 7:46 ` Quan, Evan
2023-08-10 7:37 ` [PATCH V8 3/9] cfg80211: expose nl80211_chan_width_to_mhz for wide sharing Evan Quan
2023-08-10 14:05 ` Jeff Johnson
2023-08-14 8:04 ` Quan, Evan
2023-08-10 7:37 ` [PATCH V8 4/9] wifi: mac80211: Add support for WBRF features Evan Quan
2023-08-10 7:37 ` [PATCH V8 5/9] drm/amd/pm: update driver_if and ppsmc headers for coming wbrf feature Evan Quan
2023-08-10 7:38 ` [PATCH V8 6/9] drm/amd/pm: setup the framework to support Wifi RFI mitigation feature Evan Quan
2023-08-11 9:34 ` Simon Horman
2023-08-14 7:47 ` Quan, Evan
2023-08-10 7:38 ` [PATCH V8 7/9] drm/amd/pm: add flood detection for wbrf events Evan Quan
2023-08-10 7:38 ` [PATCH V8 8/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.0 Evan Quan
2023-08-10 7:38 ` [PATCH V8 9/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.7 Evan Quan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZNYBYuUSaio66vLN@vergenet.net \
--to=horms@kernel.org \
--cc=Alexander.Deucher@amd.com \
--cc=Christian.Koenig@amd.com \
--cc=Lijo.Lazar@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=andrealmeid@igalia.com \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=bellosilicio@gmail.com \
--cc=daniel@ffwll.ch \
--cc=davem@davemloft.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=edumazet@google.com \
--cc=evan.quan@amd.com \
--cc=hdegoede@redhat.com \
--cc=jim.cromie@gmail.com \
--cc=jingyuwang_vip@163.com \
--cc=johannes@sipsolutions.net \
--cc=jsg@jsg.id.au \
--cc=kuba@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mdaenzer@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
--cc=trix@redhat.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox