[PATCH] drm/amdgpu: don't allow userspace to create a doorbell BO
Alex Deucher
alexdeucher at gmail.com
Fri Aug 11 13:46:00 UTC 2023
Ping?
On Thu, Aug 10, 2023 at 11:20 AM Alex Deucher <alexdeucher at gmail.com> wrote:
>
> Ping?
>
> On Wed, Aug 9, 2023 at 3:10 PM Alex Deucher <alexander.deucher at amd.com> wrote:
> >
> > 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 at 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 |
> > --
> > 2.41.0
> >
More information about the amd-gfx
mailing list