summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
diff options
context:
space:
mode:
authorThomas Hellström <thomas.hellstrom@linux.intel.com>2021-06-29 17:12:03 +0200
committerMatthew Auld <matthew.auld@intel.com>2021-06-30 11:32:53 +0100
commite11b7b6e574d57b99952213b5388db66445b18f2 (patch)
treea1918ab986b6d01212710b87abd321e11f6dc8d6 /drivers/gpu/drm/i915/gem/i915_gem_lmem.c
parentbf74a18ca8569ff1ac89501026a8218753f757f7 (diff)
drm/i915/display: Migrate objects to LMEM if possible for display
Objects intended to be used as display framebuffers must reside in LMEM for discrete. If they happen to not do that, migrate them to LMEM before pinning. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210629151203.209465-4-thomas.hellstrom@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gem/i915_gem_lmem.c')
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_lmem.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_lmem.c b/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
index 41d5182cd367..be1d122574af 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
@@ -24,27 +24,6 @@ i915_gem_object_lmem_io_map(struct drm_i915_gem_object *obj,
}
/**
- * i915_gem_object_validates_to_lmem - Whether the object is resident in
- * lmem when pages are present.
- * @obj: The object to check.
- *
- * Migratable objects residency may change from under us if the object is
- * not pinned or locked. This function is intended to be used to check whether
- * the object can only reside in lmem when pages are present.
- *
- * Return: Whether the object is always resident in lmem when pages are
- * present.
- */
-bool i915_gem_object_validates_to_lmem(struct drm_i915_gem_object *obj)
-{
- struct intel_memory_region *mr = READ_ONCE(obj->mm.region);
-
- return !i915_gem_object_migratable(obj) &&
- mr && (mr->type == INTEL_MEMORY_LOCAL ||
- mr->type == INTEL_MEMORY_STOLEN_LOCAL);
-}
-
-/**
* i915_gem_object_is_lmem - Whether the object is resident in
* lmem
* @obj: The object to check.