Message ID | 20190314083818.10945-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [i-g-t] i915/gem_create: Always try to create an object of at least one page | expand |
On Thu, 14 Mar 2019 at 08:38, Chris Wilson <chris@chris-wilson.co.uk> wrote: > > 0-byte objects are not allowed. > > References: https://bugs.freedesktop.org/show_bug.cgi?id=110106 > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c index 605b7f9d9..2a861ca8a 100644 --- a/tests/i915/gem_create.c +++ b/tests/i915/gem_create.c @@ -149,7 +149,7 @@ static uint64_t get_npages(uint64_t *global, uint64_t npages) max = *global; do { old = max; - try = npages % (max / 2); + try = 1 + npages % (max / 2); max -= try; } while ((max = __sync_val_compare_and_swap(global, old, max)) != old);
0-byte objects are not allowed. References: https://bugs.freedesktop.org/show_bug.cgi?id=110106 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/i915/gem_create.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)