drm/i915/gt: Provide a utility to create a scratch buffer
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 19 Dec 2020 02:03:43 +0000 (02:03 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 21 Dec 2020 09:53:52 +0000 (09:53 +0000)
commita4d86249c7735b964ae812b803b828f2651b13b6
treed8b86ce60ac46dcc87d03b2fa5cefa679e957523
parenta0d3fdb628b83e3a24acbf6915ede9359a1ecc2b
drm/i915/gt: Provide a utility to create a scratch buffer

Primarily used by selftests, but also by runtime debugging of engine
w/a, is a routine to create a temporarily bound buffer for readback.
Almagamate the duplicated routines into one.

Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201219020343.22681-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_gtt.c
drivers/gpu/drm/i915/gt/intel_gtt.h
drivers/gpu/drm/i915/gt/intel_workarounds.c
drivers/gpu/drm/i915/gt/selftest_execlists.c
drivers/gpu/drm/i915/gt/selftest_lrc.c
drivers/gpu/drm/i915/gt/selftest_mocs.c
drivers/gpu/drm/i915/gt/selftest_workarounds.c