Skip to content

Commit c3866f5

Browse files
icklejlahtine-intel
authored andcommitted
drm/i915/gt: Skip trying to unbind in restore_ggtt_mappings
Currently we first to try to unbind the VMA (and lazily rebind on next use) as an optimisation during restore_ggtt_mappings. Ideally, the only objects in the GGTT upon resume are the pinned kernel objects which can't be unbound and need to be restored. As the unbind interferes with the plan to mark those objects as active for error capture, forgo the optimisation. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 80e5351) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent ea38aa2 commit c3866f5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/gpu/drm/i915/i915_gem_gtt.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3304,7 +3304,7 @@ void i915_ggtt_disable_guc(struct i915_ggtt *ggtt)
33043304

33053305
static void ggtt_restore_mappings(struct i915_ggtt *ggtt)
33063306
{
3307-
struct i915_vma *vma, *vn;
3307+
struct i915_vma *vma;
33083308
bool flush = false;
33093309
int open;
33103310

@@ -3319,15 +3319,12 @@ static void ggtt_restore_mappings(struct i915_ggtt *ggtt)
33193319
open = atomic_xchg(&ggtt->vm.open, 0);
33203320

33213321
/* clflush objects bound into the GGTT and rebind them. */
3322-
list_for_each_entry_safe(vma, vn, &ggtt->vm.bound_list, vm_link) {
3322+
list_for_each_entry(vma, &ggtt->vm.bound_list, vm_link) {
33233323
struct drm_i915_gem_object *obj = vma->obj;
33243324

33253325
if (!i915_vma_is_bound(vma, I915_VMA_GLOBAL_BIND))
33263326
continue;
33273327

3328-
if (!__i915_vma_unbind(vma))
3329-
continue;
3330-
33313328
clear_bit(I915_VMA_GLOBAL_BIND_BIT, __i915_vma_flags(vma));
33323329
WARN_ON(i915_vma_bind(vma,
33333330
obj ? obj->cache_level : 0,

0 commit comments

Comments
 (0)