From: Alex Deucher <alexdeucher@gmail.com>
To: "André Almeida" <andrealmeid@igalia.com>
Cc: "Tom St Denis" <tom.stdenis@amd.com>,
"Jack Xiao" <Jack.Xiao@amd.com>, "Tao Zhou" <tao.zhou1@amd.com>,
kernel-dev@igalia.com, "David Airlie" <airlied@linux.ie>,
"Felix Kuehling" <Felix.Kuehling@amd.com>,
"Pan Xinhui" <Xinhui.Pan@amd.com>,
"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
LKML <linux-kernel@vger.kernel.org>,
"amd-gfx list" <amd-gfx@lists.freedesktop.org>,
"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Hawking Zhang" <Hawking.Zhang@amd.com>
Subject: Re: [PATCH v2 2/2] Documentation/gpu: Add GFXOFF section
Date: Mon, 18 Jul 2022 15:26:42 -0400 [thread overview]
Message-ID: <CADnq5_MBa3ip2De7ztVpBAaupnynjAnO0sBcd2_io7Y2Pnkywg@mail.gmail.com> (raw)
In-Reply-To: <20220714191745.45512-2-andrealmeid@igalia.com>
Applied the series with some minor tweaks to the documentation.
Thanks!
Alex
On Thu, Jul 14, 2022 at 3:18 PM André Almeida <andrealmeid@igalia.com> wrote:
>
> Add a GFXOFF section at "GPU Power Controls" file, explaining what it is
> and how userspace can interact with it.
>
> Signed-off-by: André Almeida <andrealmeid@igalia.com>
> ---
> Changes from v1: file created
>
> Documentation/gpu/amdgpu/thermal.rst | 41 ++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/Documentation/gpu/amdgpu/thermal.rst b/Documentation/gpu/amdgpu/thermal.rst
> index 8aeb0186c9ef..14c0fb874cf6 100644
> --- a/Documentation/gpu/amdgpu/thermal.rst
> +++ b/Documentation/gpu/amdgpu/thermal.rst
> @@ -63,3 +63,44 @@ gpu_metrics
>
> .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
> :doc: gpu_metrics
> +
> +GFXOFF
> +======
> +
> +GFXOFF is a feature found in some mobile GPUs that saves power consumption. The
> +card's firmware uses RLC (RunList Controller) to power off the gfx engine
> +dynamically when there is no workload on gfx pipe and puts gfx into "idle"
> +state. GFXOFF is on by default on supported GPUs.
> +
> +Userspace can interact with GFXOFF through a debugfs interface:
> +
> +``amdgpu_gfxoff``
> +-----------------
> +
> +Use it to enable/disable GFXOFF, and to check if it's current enabled/disabled::
> +
> + $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff
> + 01
> +
> +- Write 0 to disable it, and 1 to enable it.
> +- Read 0 means it's disabled, 1 it's enabled.
> +
> +If it's enabled, that means that the GPU is free to enter into GFXOFF mode as
> +needed. Disabled means that it will never enter GFXOFF mode.
> +
> +``amdgpu_gfxoff_status``
> +------------------------
> +
> +Read it to check current GFXOFF's status of a GPU::
> +
> + $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff_status
> + 02
> +
> +- 0: GPU is in GFXOFF state, the gfx engine is powered down.
> +- 1: Transition out of GFXOFF state
> +- 2: Not in GFXOFF state
> +- 3: Transition into GFXOFF state
> +
> +If GFXOFF is enabled, the value will be transitioning around [0, 3], always
> +getting into 0 when possible. When it's disabled, it's always at 2. Returns
> +``-EINVAL`` if it's not supported.
> --
> 2.37.0
>
prev parent reply other threads:[~2022-07-18 19:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 19:17 [PATCH v2 1/2] drm/amd/debugfs: Expose GFXOFF state to userspace André Almeida
2022-07-14 19:17 ` [PATCH v2 2/2] Documentation/gpu: Add GFXOFF section André Almeida
2022-07-18 19:26 ` Alex Deucher [this message]
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=CADnq5_MBa3ip2De7ztVpBAaupnynjAnO0sBcd2_io7Y2Pnkywg@mail.gmail.com \
--to=alexdeucher@gmail.com \
--cc=Felix.Kuehling@amd.com \
--cc=Hawking.Zhang@amd.com \
--cc=Jack.Xiao@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=andrealmeid@igalia.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-dev@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tao.zhou1@amd.com \
--cc=tom.stdenis@amd.com \
/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;
as well as URLs for NNTP newsgroup(s).