From: Felix Kuehling <felix.kuehling@amd.com>
To: Alex Deucher <alexander.deucher@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: don't allow userspace to create a doorbell BO
Date: Fri, 11 Aug 2023 10:02:32 -0400 [thread overview]
Message-ID: <00930769-fb36-40c7-9fe7-c12062c3ea9e@amd.com> (raw)
In-Reply-To: <20230809190956.435068-1-alexander.deucher@amd.com>
Am 2023-08-09 um 15:09 schrieb Alex Deucher:
> We need the domains in amdgpu_drm.h for the kernel driver to manage
> the pool, but we don't want userspace using it until the code
> is ready. So reject for now.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 693b1fd1191a..ca4d2d430e28 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -289,6 +289,10 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
> uint32_t handle, initial_domain;
> int r;
>
> + /* reject DOORBELLs until userspace code to use it is available */
> + if (args->in.domains & AMDGPU_GEM_DOMAIN_DOORBELL)
> + return -EINVAL;
> +
> /* reject invalid gem flags */
> if (flags & ~(AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
> AMDGPU_GEM_CREATE_NO_CPU_ACCESS |
prev parent reply other threads:[~2023-08-11 14:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 19:09 [PATCH] drm/amdgpu: don't allow userspace to create a doorbell BO Alex Deucher
2023-08-09 19:09 ` [PATCH] Revert "drm/amd/pm: resolve reboot exception for si oland" Alex Deucher
2023-08-10 15:20 ` [PATCH] drm/amdgpu: don't allow userspace to create a doorbell BO Alex Deucher
2023-08-11 13:46 ` Alex Deucher
2023-08-11 14:02 ` Felix Kuehling [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=00930769-fb36-40c7-9fe7-c12062c3ea9e@amd.com \
--to=felix.kuehling@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox