Skip to content

Commit

Permalink
drm/i915/selftests: Prepare hangcheck for obj->mm.lock removal
Browse files Browse the repository at this point in the history
Convert a few calls to use the unlocked versions.

Signed-off-by: Maarten Lankhorst <[email protected]>
Reviewed-by: Thomas Hellström <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
mlankhorst authored and danvet committed Mar 24, 2021
1 parent d3ad295 commit 17b7ab9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/i915/gt/selftest_hangcheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ static int hang_init(struct hang *h, struct intel_gt *gt)
}

i915_gem_object_set_cache_coherency(h->hws, I915_CACHE_LLC);
vaddr = i915_gem_object_pin_map(h->hws, I915_MAP_WB);
vaddr = i915_gem_object_pin_map_unlocked(h->hws, I915_MAP_WB);
if (IS_ERR(vaddr)) {
err = PTR_ERR(vaddr);
goto err_obj;
}
h->seqno = memset(vaddr, 0xff, PAGE_SIZE);

vaddr = i915_gem_object_pin_map(h->obj,
i915_coherent_map_type(gt->i915));
vaddr = i915_gem_object_pin_map_unlocked(h->obj,
i915_coherent_map_type(gt->i915));
if (IS_ERR(vaddr)) {
err = PTR_ERR(vaddr);
goto err_unpin_hws;
Expand Down Expand Up @@ -149,7 +149,7 @@ hang_create_request(struct hang *h, struct intel_engine_cs *engine)
return ERR_CAST(obj);
}

vaddr = i915_gem_object_pin_map(obj, i915_coherent_map_type(gt->i915));
vaddr = i915_gem_object_pin_map_unlocked(obj, i915_coherent_map_type(gt->i915));
if (IS_ERR(vaddr)) {
i915_gem_object_put(obj);
i915_vm_put(vm);
Expand Down

0 comments on commit 17b7ab9

Please sign in to comment.