Skip to content

Commit bc6b027

Browse files
Dr. David Alan GilbertAndi Shyti
authored andcommitted
drm/i915: Remove deadcode
i915_active_acquire_for_context() was added in 2020 by commit 5d93413 ("drm/i915: Export a preallocate variant of i915_active_acquire()") but has never been used. The last use of __i915_gem_object_is_lmem() was removed in 2021 by commit ff20afc ("drm/i915: Update error capture code to avoid using the current vma state") Remove them. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Tvrtko Ursulin <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 835443d commit bc6b027

File tree

4 files changed

+0
-44
lines changed

4 files changed

+0
-44
lines changed

drivers/gpu/drm/i915/gem/i915_gem_lmem.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,6 @@ bool i915_gem_object_is_lmem(struct drm_i915_gem_object *obj)
5252
mr->type == INTEL_MEMORY_STOLEN_LOCAL);
5353
}
5454

55-
/**
56-
* __i915_gem_object_is_lmem - Whether the object is resident in
57-
* lmem while in the fence signaling critical path.
58-
* @obj: The object to check.
59-
*
60-
* This function is intended to be called from within the fence signaling
61-
* path where the fence, or a pin, keeps the object from being migrated. For
62-
* example during gpu reset or similar.
63-
*
64-
* Return: Whether the object is resident in lmem.
65-
*/
66-
bool __i915_gem_object_is_lmem(struct drm_i915_gem_object *obj)
67-
{
68-
struct intel_memory_region *mr = READ_ONCE(obj->mm.region);
69-
70-
#ifdef CONFIG_LOCKDEP
71-
GEM_WARN_ON(dma_resv_test_signaled(obj->base.resv, DMA_RESV_USAGE_BOOKKEEP) &&
72-
i915_gem_object_evictable(obj));
73-
#endif
74-
return mr && (mr->type == INTEL_MEMORY_LOCAL ||
75-
mr->type == INTEL_MEMORY_STOLEN_LOCAL);
76-
}
77-
7855
/**
7956
* __i915_gem_object_create_lmem_with_ps - Create lmem object and force the
8057
* minimum page size for the backing pages.

drivers/gpu/drm/i915/gem/i915_gem_lmem.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ i915_gem_object_lmem_io_map(struct drm_i915_gem_object *obj,
1919

2020
bool i915_gem_object_is_lmem(struct drm_i915_gem_object *obj);
2121

22-
bool __i915_gem_object_is_lmem(struct drm_i915_gem_object *obj);
23-
2422
struct drm_i915_gem_object *
2523
i915_gem_object_create_lmem_from_data(struct drm_i915_private *i915,
2624
const void *data, size_t size);

drivers/gpu/drm/i915/i915_active.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -527,24 +527,6 @@ int i915_active_acquire(struct i915_active *ref)
527527
return err;
528528
}
529529

530-
int i915_active_acquire_for_context(struct i915_active *ref, u64 idx)
531-
{
532-
struct i915_active_fence *active;
533-
int err;
534-
535-
err = i915_active_acquire(ref);
536-
if (err)
537-
return err;
538-
539-
active = active_instance(ref, idx);
540-
if (!active) {
541-
i915_active_release(ref);
542-
return -ENOMEM;
543-
}
544-
545-
return 0; /* return with active ref */
546-
}
547-
548530
void i915_active_release(struct i915_active *ref)
549531
{
550532
debug_active_assert(ref);

drivers/gpu/drm/i915/i915_active.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ int i915_request_await_active(struct i915_request *rq,
186186
#define I915_ACTIVE_AWAIT_BARRIER BIT(2)
187187

188188
int i915_active_acquire(struct i915_active *ref);
189-
int i915_active_acquire_for_context(struct i915_active *ref, u64 idx);
190189
bool i915_active_acquire_if_busy(struct i915_active *ref);
191190

192191
void i915_active_release(struct i915_active *ref);

0 commit comments

Comments
 (0)