diff options
author | Matthew Auld <matthew.auld@intel.com> | 2022-02-25 15:54:58 +0100 |
---|---|---|
committer | Matthew Auld <matthew.auld@intel.com> | 2022-02-28 09:47:34 +0100 |
commit | 30b9d1b3ef374403652fc10fa36b9a5f32cc274d (patch) | |
tree | f1f3ca4f008cb8cd0b9c1aff5d5b26441c4f736f /drivers/gpu/drm/i915/selftests/mock_region.c | |
parent | drm/i915/ttm: require mappable by default (diff) | |
download | linux-30b9d1b3ef374403652fc10fa36b9a5f32cc274d.tar.xz linux-30b9d1b3ef374403652fc10fa36b9a5f32cc274d.zip |
drm/i915: add I915_BO_ALLOC_GPU_ONLY
If the user doesn't require CPU access for the buffer, then
ALLOC_GPU_ONLY should be used, in order to prioritise allocating in the
non-mappable portion of LMEM, on devices with small BAR.
v2(Thomas):
- The BO_ALLOC_TOPDOWN naming here is poor, since this is pure lies on
systems that don't even have small BAR. A better name is GPU_ONLY,
which is accurate regardless of the configuration.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Acked-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220225145502.331818-3-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/mock_region.c')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/mock_region.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/selftests/mock_region.c b/drivers/gpu/drm/i915/selftests/mock_region.c index 467eeae6d5f0..f64325491f35 100644 --- a/drivers/gpu/drm/i915/selftests/mock_region.c +++ b/drivers/gpu/drm/i915/selftests/mock_region.c @@ -22,17 +22,12 @@ static void mock_region_put_pages(struct drm_i915_gem_object *obj, static int mock_region_get_pages(struct drm_i915_gem_object *obj) { - unsigned int flags; struct sg_table *pages; int err; - flags = 0; - if (obj->flags & I915_BO_ALLOC_CONTIGUOUS) - flags |= TTM_PL_FLAG_CONTIGUOUS; - obj->mm.res = intel_region_ttm_resource_alloc(obj->mm.region, obj->base.size, - flags); + obj->flags); if (IS_ERR(obj->mm.res)) return PTR_ERR(obj->mm.res); |