[PATCH 5/7] drm/i915: allocate context from LMEM
Matthew Auld
matthew.auld at intel.com
Mon Jan 25 18:07:01 UTC 2021
Based on a patch from Michel Thierry.
Signed-off-by: Matthew Auld <matthew.auld at intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
---
drivers/gpu/drm/i915/gt/intel_lrc.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 33b529dcb05f..fb9257fc0994 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -3,6 +3,8 @@
* Copyright © 2014 Intel Corporation
*/
+#include "gem/i915_gem_lmem.h"
+
#include "gen8_engine_cs.h"
#include "i915_drv.h"
#include "i915_perf.h"
@@ -808,7 +810,12 @@ __lrc_alloc_state(struct intel_context *ce, struct intel_engine_cs *engine)
context_size += PAGE_SIZE;
}
- obj = i915_gem_object_create_shmem(engine->i915, context_size);
+ if (HAS_LMEM(engine->i915)) {
+ obj = i915_gem_object_create_lmem(engine->i915,
+ context_size, 0);
+ } else {
+ obj = i915_gem_object_create_shmem(engine->i915, context_size);
+ }
if (IS_ERR(obj))
return ERR_CAST(obj);
--
2.26.2
More information about the Intel-gfx-trybot
mailing list