Commit de53202a authored by Chris Wilson's avatar Chris Wilson

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=110106Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
parent 1e057f43
Pipeline #24138 passed with stages
in 9 minutes and 58 seconds
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment