From: "Christian König" <christian.koenig@amd.com>
To: Shahyan Soltani <shahyan.soltani@amd.com>, amd-gfx@lists.freedesktop.org
Cc: alexander.deucher@amd.com, pierre-eric.pelloux-prayer@amd.com,
kevin.wang@amd.com
Subject: Re: [PATCH v2 1/8] drm/amdgpu: use pm_runtime_resume_and_get amdgpu_gem_create_ioctl
Date: Fri, 18 Sep 2026 09:58:21 +0200 [thread overview]
Message-ID: <03689403-93db-45fa-9b14-208bc9304845@amd.com> (raw)
In-Reply-To: <20260917195812.72917-2-shahyan.soltani@amd.com>
On 9/17/26 21:58, Shahyan Soltani wrote:
> From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
>
> This ioctl might trigger GPU work through ttm so make sure the GPU
> is awake.
>
> Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
> Co-developed-by: Shahyan Soltani <shahyan.soltani@amd.com>
> Signed-off-by: Shahyan Soltani <shahyan.soltani@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
That looks really nice now, good work.
Regards,
Christian.
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 0d579517c03c..4e4814caf61a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -33,6 +33,7 @@
> #include <linux/dma-buf.h>
> #include <linux/dma-fence-unwrap.h>
> #include <linux/uaccess.h>
> +#include <linux/pm_runtime.h>
>
> #include <drm/amdgpu_drm.h>
> #include <drm/drm_drv.h>
> @@ -442,6 +443,12 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
> uint32_t handle, initial_domain;
> int r;
>
> + PM_RUNTIME_ACQUIRE_IF_ENABLED_AUTOSUSPEND(dev->dev, lock);
> +
> + r = PM_RUNTIME_ACQUIRE_ERR(&lock);
> + if (r)
> + return r;
> +
> /* reject invalid gem flags */
> if (flags & ~AMDGPU_GEM_CREATE_SETTABLE_MASK)
> return -EINVAL;
next prev parent reply other threads:[~2026-09-18 7:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 19:58 [PATCH v2 0/8] rework runtime_pm for GPU ioctl access Shahyan Soltani
2026-09-17 19:58 ` [PATCH v2 1/8] drm/amdgpu: use pm_runtime_resume_and_get amdgpu_gem_create_ioctl Shahyan Soltani
2026-09-18 7:58 ` Christian König [this message]
2026-09-17 19:58 ` [PATCH v2 2/8] drm/amdgpu: use pm_runtime_resume_and_get for ctx ioctl Shahyan Soltani
2026-09-18 7:48 ` Christian König
2026-09-17 19:58 ` [PATCH v2 3/8] drm/amdgpu: rework runtime pm management for cs Shahyan Soltani
2026-09-18 7:54 ` Christian König
2026-09-17 19:58 ` [PATCH v2 4/8] drm/amdgpu: push down runtime pm handling in amdgpu_gem_create_ioctl Shahyan Soltani
2026-09-18 7:57 ` Christian König
2026-09-21 14:40 ` Shahyan Soltani
2026-09-21 14:50 ` Shahyan Soltani
2026-09-21 15:06 ` Christian König
2026-09-21 16:35 ` Shahyan Soltani
2026-09-17 19:58 ` [PATCH v2 5/8] drm/amdgpu: handle runtime pm in amdgpu_gem_userptr_ioctl Shahyan Soltani
2026-09-18 8:01 ` Christian König
2026-09-17 19:58 ` [PATCH v2 6/8] drm/amdgpu: prevent suspend in fault handler Shahyan Soltani
2026-09-18 8:03 ` Christian König
2026-09-17 19:58 ` [PATCH v2 7/8] drm/amdgpu: get rid of amdgpu_drm_ioctl Shahyan Soltani
2026-09-17 19:58 ` [PATCH v2 8/8] drm/amdgpu: defer GPU resume from open/close to first use Shahyan Soltani
2026-09-18 8:23 ` Christian König
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=03689403-93db-45fa-9b14-208bc9304845@amd.com \
--to=christian.koenig@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=kevin.wang@amd.com \
--cc=pierre-eric.pelloux-prayer@amd.com \
--cc=shahyan.soltani@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 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.