提交 c29ccb9f 编写于 作者: C Chris Wilson

drm/i915/selftests: Take rpm wakeref around GGTT lowlevel tests

The vma routines are responsible for acquiring the device rpm wakeref
before they poke the HW. However, some of the selftests bypass the
higher level vma routines in order to poke directly at the lowlevel GGTT
functions; these are then responsible for managing rpm themselves.
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107114051.10583-1-chris@chris-wilson.co.ukReviewed-by: NMatthew Auld <matthew.auld@intel.com>
上级 f6d03042
...@@ -267,7 +267,9 @@ static int lowlevel_hole(struct drm_i915_private *i915, ...@@ -267,7 +267,9 @@ static int lowlevel_hole(struct drm_i915_private *i915,
mock_vma.node.size = BIT_ULL(size); mock_vma.node.size = BIT_ULL(size);
mock_vma.node.start = addr; mock_vma.node.start = addr;
intel_runtime_pm_get(i915);
vm->insert_entries(vm, &mock_vma, I915_CACHE_NONE, 0); vm->insert_entries(vm, &mock_vma, I915_CACHE_NONE, 0);
intel_runtime_pm_put(i915);
} }
count = n; count = n;
...@@ -1047,6 +1049,7 @@ static int igt_ggtt_page(void *arg) ...@@ -1047,6 +1049,7 @@ static int igt_ggtt_page(void *arg)
goto out_remove; goto out_remove;
} }
intel_runtime_pm_get(i915);
for (n = 0; n < count; n++) { for (n = 0; n < count; n++) {
u64 offset = tmp.start + order[n] * PAGE_SIZE; u64 offset = tmp.start + order[n] * PAGE_SIZE;
u32 __iomem *vaddr; u32 __iomem *vaddr;
...@@ -1086,6 +1089,7 @@ static int igt_ggtt_page(void *arg) ...@@ -1086,6 +1089,7 @@ static int igt_ggtt_page(void *arg)
break; break;
} }
} }
intel_runtime_pm_put(i915);
kfree(order); kfree(order);
out_remove: out_remove:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册