[PATCH 2/7] drm/i915/gem: Refactor placement setup for i915_gem_object_create* (v2)

Matthew Auld matthew.william.auld at gmail.com
Fri Jul 16 19:18:11 UTC 2021


On Fri, 16 Jul 2021 at 15:14, Jason Ekstrand <jason at jlekstrand.net> wrote:
>
> 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()
>
> Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
> Cc: Matthew Auld <matthew.auld at intel.com>

If CI is happy,
Reviewed-by: Matthew Auld <matthew.auld at intel.com>


More information about the dri-devel mailing list