diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-03-14 08:37:03 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-03-14 14:41:25 +0000 |
commit | de53202ae4b5747b86ccda22986dbeb47f65d732 (patch) | |
tree | 88386330e2e9c1fc3334c92546fd68520d48a1dc /tests/i915 | |
parent | 1e057f43cd30ab6acfd40794673843942521c0c5 (diff) |
i915/gem_create: Always try to create an object of at least one page
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>
Diffstat (limited to 'tests/i915')
-rw-r--r-- | tests/i915/gem_create.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c index 605b7f9d..2a861ca8 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); |