igt/gem_userptr_blits: Correct the number of objects required

Since we allocate 2 times count number of objects, that is the number of
objects we should be using when checking for sufficient RAM to use for
the test.

References: https://bugs.freedesktop.org/show_bug.cgi?id=92799
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2015-11-03 16:43:48 +00:00
parent ce65232cf5
commit f40a984413

View File

@ -897,8 +897,8 @@ static int test_coherency(int fd, int count)
uint32_t start = 0; uint32_t start = 0;
int i, ret; int i, ret;
intel_require_memory(count, sizeof(linear), CHECK_RAM);
igt_info("Using 2x%d 1MiB buffers\n", count); igt_info("Using 2x%d 1MiB buffers\n", count);
intel_require_memory(2*count, sizeof(linear), CHECK_RAM);
ret = posix_memalign((void **)&memory, PAGE_SIZE, count*sizeof(linear)); ret = posix_memalign((void **)&memory, PAGE_SIZE, count*sizeof(linear));
igt_assert(ret == 0 && memory); igt_assert(ret == 0 && memory);