projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91e3215
)
drm/i915: Assert all sg are initialised in fake_dma_object for selftests
author
Chris Wilson
<
[email protected]
>
Sat, 25 Feb 2017 18:11:19 +0000
(18:11 +0000)
committer
Chris Wilson
<
[email protected]
>
Sat, 25 Feb 2017 18:54:36 +0000
(18:54 +0000)
Double check that we allocated the right amount of scatterlist elements
for our obj->size.
Signed-off-by: Chris Wilson <
[email protected]
>
Cc: Matthew Auld <
[email protected]
>
Reviewed-by: Matthew Auld <
[email protected]
>
Link:
http://patchwork.freedesktop.org/patch/msgid/
[email protected]
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index 6bac267914dfe2c418984a659fe65cb5999caf54..0f3fa34377c67a6bfb1e8bfac205aad91802175c 100644
(file)
--- a/
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@
-62,12
+62,14
@@
fake_get_pages(struct drm_i915_gem_object *obj)
for (sg = pages->sgl; sg; sg = sg_next(sg)) {
unsigned long len = min_t(typeof(rem), rem, BIT(31));
+ GEM_BUG_ON(!len);
sg_set_page(sg, pfn_to_page(PFN_BIAS), len, 0);
sg_dma_address(sg) = page_to_phys(sg_page(sg));
sg_dma_len(sg) = len;
rem -= len;
}
+ GEM_BUG_ON(rem);
obj->mm.madv = I915_MADV_DONTNEED;
return pages;