OSDN Git Service

drm/i915/selftests: Try to recycle context allocations
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 27 Aug 2019 16:17:26 +0000 (17:17 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 28 Aug 2019 07:32:02 +0000 (08:32 +0100)
commitc4e6488120e9ef1ceced8fb0caf134c5242ddaf4
tree96949f995c37aaeb6f7a48fe0297cb29c1af2ff6
parentf2085c8e950d536c7982182b0c9c015804011dd2
drm/i915/selftests: Try to recycle context allocations

igt_ctx_exec allocates a new context for each iteration, keeping them
all allocated until the end. Instead, release the local ctx reference at
the end of each iteration, allowing ourselves to reap those if under
mempressure.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190827161726.3640-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c