diff options
author | 2021-07-23 12:21:36 -0500 | |
---|---|---|
committer | 2021-07-26 16:37:31 +0100 | |
commit | 34c7ef0a375c7ccd56755b7c3c5e7874f8e49428 (patch) | |
tree | 47ba647d9f6b623ada037e3e3f778ee4a34469de /drivers/gpu/drm/i915/i915_request.c | |
parent | drm/i915/gem: Check object_can_migrate from object_migrate (diff) | |
download | wireguard-linux-34c7ef0a375c7ccd56755b7c3c5e7874f8e49428.tar.xz wireguard-linux-34c7ef0a375c7ccd56755b7c3c5e7874f8e49428.zip |
drm/i915/gem: Refactor placement setup for i915_gem_object_create* (v2)
Since we don't allow changing the set of regions after creation, we can
make ext_set_placements() build up the region set directly in the
create_ext and assign it to the object later. This is similar to what
we did for contexts with the proto-context only simpler because there's
no funny object shuffling. This will be used in the next patch to allow
us to de-duplicate a bunch of code. Also, since we know the maximum
number of regions up-front, we can use a fixed-size temporary array for
the regions. This simplifies memory management a bit for this new
delayed approach.
v2 (Matthew Auld):
- Get rid of MAX_N_PLACEMENTS
- Drop kfree(placements) from set_placements()
v3 (Matthew Auld):
- Properly set ext_data->n_placements
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210723172142.3273510-3-jason@jlekstrand.net
Diffstat (limited to 'drivers/gpu/drm/i915/i915_request.c')
0 files changed, 0 insertions, 0 deletions