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

drm/i915/gtt: Reduce a pair of runtime asserts

We can stop asserting using WARN_ON as given sufficient CI coverage, we
can rely on using GEM_BUG_ON() to catch problems before merging.
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>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Reviewed-by: NMatthew Auld <matthew.william.auld@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180614184218.1606-2-chris@chris-wilson.co.uk
上级 986dbac4
...@@ -2792,7 +2792,7 @@ int i915_gem_init_aliasing_ppgtt(struct drm_i915_private *i915) ...@@ -2792,7 +2792,7 @@ int i915_gem_init_aliasing_ppgtt(struct drm_i915_private *i915)
if (IS_ERR(ppgtt)) if (IS_ERR(ppgtt))
return PTR_ERR(ppgtt); return PTR_ERR(ppgtt);
if (WARN_ON(ppgtt->vm.total < ggtt->vm.total)) { if (GEM_WARN_ON(ppgtt->vm.total < ggtt->vm.total)) {
err = -ENODEV; err = -ENODEV;
goto err_ppgtt; goto err_ppgtt;
} }
......
...@@ -464,8 +464,8 @@ static inline u32 i915_pte_count(u64 addr, u64 length, unsigned int pde_shift) ...@@ -464,8 +464,8 @@ static inline u32 i915_pte_count(u64 addr, u64 length, unsigned int pde_shift)
const u64 mask = ~((1ULL << pde_shift) - 1); const u64 mask = ~((1ULL << pde_shift) - 1);
u64 end; u64 end;
WARN_ON(length == 0); GEM_BUG_ON(length == 0);
WARN_ON(offset_in_page(addr|length)); GEM_BUG_ON(offset_in_page(addr | length));
end = addr + length; end = addr + length;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册