]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: validate user queue size constraints
authorJesse.Zhang <Jesse.Zhang@amd.com>
Wed, 28 Jan 2026 03:35:57 +0000 (11:35 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Jan 2026 17:26:15 +0000 (12:26 -0500)
commit8079b87c02e531cc91601f72ea8336dd2262fdf1
tree3039a56907bcb728b001f57218b7fe53bb8574a4
parentba205ac3d6e83f56c4f824f23f1b4522cb844ff3
drm/amdgpu: validate user queue size constraints

Add validation to ensure user queue sizes meet hardware requirements:
- Size must be a power of two for efficient ring buffer wrapping
- Size must be at least AMDGPU_GPU_PAGE_SIZE to prevent undersized allocations

This prevents invalid configurations that could lead to GPU faults or
unexpected behavior.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jesse Zhang <jesse.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c