]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/pool: constrain pool objects by mapping type
authorMatthew Auld <matthew.auld@intel.com>
Tue, 19 Jan 2021 13:31:06 +0000 (13:31 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 19 Jan 2021 20:36:28 +0000 (20:36 +0000)
commitbc0d9fa5c672eb69ea3c7c4793eaaf41552c0899
tree8fa7d63f0a5b5edcc29fd2fb1e0ec7f7054b5769
parentb07d882f2e4614e0863cac963c11edcb3bd33327
drm/i915/pool: constrain pool objects by mapping type

In a few places we always end up mapping the pool object with the FORCE
constraint(to prevent hitting -EBUSY) which will destroy the cached
mapping if it has a different type. As a simple first step, make the
mapping type part of the pool interface, where the behaviour is to only
give out pool objects which match the requested mapping type.

Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20210119133106.66294-4-matthew.auld@intel.com
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c
drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c
drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.h
drivers/gpu/drm/i915/gt/intel_gt_buffer_pool_types.h
drivers/gpu/drm/i915/i915_cmd_parser.c