]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/xe: Use vmalloc for array of bind allocation in bind IOCTL
authorMatthew Brost <matthew.brost@intel.com>
Mon, 26 Feb 2024 15:55:54 +0000 (07:55 -0800)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Thu, 29 Feb 2024 09:39:02 +0000 (10:39 +0100)
commita41f6b0db58fe3cc2686e4065db48ebf44effa36
treeaf31a9bb3119719d31219985d98a0b976dbead09
parentccff0b21ebe0cbe3f402edb27b0b1fd22a9d08aa
drm/xe: Use vmalloc for array of bind allocation in bind IOCTL

Use vmalloc in effort to allow a user pass in a large number of binds in
an IOCTL (mesa use case). Also use array allocations rather open coding
the size calculation.

v2: Use __GFP_ACCOUNT for allocations (Thomas)

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240226155554.103384-1-matthew.brost@intel.com
(cherry picked from commit 35ed1d2bfff7b1969e7f99f3641a83ea54f037e2)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drivers/gpu/drm/xe/xe_vm.c