From: Mario Limonciello <mario.limonciello@amd.com>
To: Alex Deucher <alexander.deucher@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/amdgpu/sdma: add begin_use/end_use helpers
Date: Fri, 8 Dec 2023 16:25:23 -0600 [thread overview]
Message-ID: <b1cda1f5-e0f0-400f-820a-e757cc3b15bd@amd.com> (raw)
In-Reply-To: <20231208221928.5679-1-alexander.deucher@amd.com>
On 12/8/2023 16:19, Alex Deucher wrote:
> Add helper functions to disallow GFXOFF while SDMA has work.
> This should avoid corner cases where GFXOFF is erroneously
> entered when SDMA is still active. For now just allow/disallow
> GFXOFF in the begin and end helpers until we root cause the
> issue. This should not impact power as SDMA usage is pretty
> minimal and GFXOSS should not be active when SDMA is active
> anyway, this just makes it explicit.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
For the series:
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2220
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Tested-by: Mario Limonciello <mario.limonciello@amd.com>
> drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 14 ++++++++++++++
> drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h | 3 +++
> 2 files changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
> index 1d9d187de6ee..d4b08d03970c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
> @@ -326,3 +326,17 @@ int amdgpu_sdma_ras_sw_init(struct amdgpu_device *adev)
>
> return 0;
> }
> +
> +void amdgpu_sdma_ring_begin_use(struct amdgpu_ring *ring)
> +{
> + struct amdgpu_device *adev = ring->adev;
> +
> + amdgpu_gfx_off_ctrl(adev, false);
> +}
> +
> +void amdgpu_sdma_ring_end_use(struct amdgpu_ring *ring)
> +{
> + struct amdgpu_device *adev = ring->adev;
> +
> + amdgpu_gfx_off_ctrl(adev, true);
> +}
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
> index 173a2a308078..b52d16829204 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
> @@ -171,4 +171,7 @@ void amdgpu_sdma_destroy_inst_ctx(struct amdgpu_device *adev,
> bool duplicate);
> int amdgpu_sdma_ras_sw_init(struct amdgpu_device *adev);
>
> +void amdgpu_sdma_ring_begin_use(struct amdgpu_ring *ring);
> +void amdgpu_sdma_ring_end_use(struct amdgpu_ring *ring);
> +
> #endif
next prev parent reply other threads:[~2023-12-08 22:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 22:19 [PATCH 1/3] drm/amdgpu/sdma: add begin_use/end_use helpers Alex Deucher
2023-12-08 22:19 ` [PATCH 2/3] drm/amdgpu/sdma5.0: add begin/end_use ring callbacks Alex Deucher
2023-12-08 22:38 ` Deucher, Alexander
2023-12-08 22:19 ` [PATCH 3/3] drm/amdgpu/sdma5.2: " Alex Deucher
2023-12-08 22:25 ` Mario Limonciello [this message]
2023-12-08 22:52 ` [PATCH 1/3] drm/amdgpu/sdma: add begin_use/end_use helpers Alex Deucher
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=b1cda1f5-e0f0-400f-820a-e757cc3b15bd@amd.com \
--to=mario.limonciello@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.