OSDN Git Service

drm/i915/gem: Split eb_vma into its own allocation
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 30 Mar 2020 13:37:10 +0000 (14:37 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 30 Mar 2020 19:08:13 +0000 (20:08 +0100)
commit0f1dd02295f35dcdcbaafcbcbbec0753884ab974
tree96213812c940c0a0141ad6052eddb7b7490571d1
parentd7d50f801d445f9f17221573c2eda9f7b23fb891
drm/i915/gem: Split eb_vma into its own allocation

Use a separate array allocation for the execbuf vma, so that we can
track their lifetime independently from the copy of the user arguments.
With luck, this has a secondary benefit of splitting the malloc size to
within reason and avoid vmalloc. The downside is that we might require
two separate vmallocs -- but much less likely.

In the process, this prevents a memory leak on the ww_mutex error
unwind.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1390
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200330133710.14385-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c