Skip to content

Commit 6be2ad4

Browse files
committed
drm/amdgpu: don't allow userspace to create a doorbell BO
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. Acked-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 80e28aa commit 6be2ad4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
289289
uint32_t handle, initial_domain;
290290
int r;
291291

292+
/* reject DOORBELLs until userspace code to use it is available */
293+
if (args->in.domains & AMDGPU_GEM_DOMAIN_DOORBELL)
294+
return -EINVAL;
295+
292296
/* reject invalid gem flags */
293297
if (flags & ~(AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
294298
AMDGPU_GEM_CREATE_NO_CPU_ACCESS |

0 commit comments

Comments
 (0)