summaryrefslogtreecommitdiff
path: root/tests/gem_linear_blits.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gem_linear_blits.c')
-rw-r--r--tests/gem_linear_blits.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/gem_linear_blits.c b/tests/gem_linear_blits.c
index eccfbcdd..8297416c 100644
--- a/tests/gem_linear_blits.c
+++ b/tests/gem_linear_blits.c
@@ -215,6 +215,8 @@ static void run_test(int fd, int count)
free(handle);
}
+#define MAX_32b ((1ull << 32) - 4096)
+
int main(int argc, char **argv)
{
int fd = 0;
@@ -230,20 +232,28 @@ int main(int argc, char **argv)
run_test(fd, 2);
igt_subtest("normal") {
- int count;
+ uint64_t count;
- count = 3 * gem_aperture_size(fd) / (1024*1024) / 2;
+ count = gem_aperture_size(fd);
+ if (count >> 32)
+ count = MAX_32b;
+ count = 3 * count / (1024*1024) / 2;
igt_require(count > 1);
intel_require_memory(count, sizeof(linear), CHECK_RAM);
+
run_test(fd, count);
}
igt_subtest("interruptible") {
- int count;
+ uint64_t count;
- count = 3 * gem_aperture_size(fd) / (1024*1024) / 2;
+ count = gem_aperture_size(fd);
+ if (count >> 32)
+ count = MAX_32b;
+ count = 3 * count / (1024*1024) / 2;
igt_require(count > 1);
intel_require_memory(count, sizeof(linear), CHECK_RAM);
+
igt_fork_signal_helper();
run_test(fd, count);
igt_stop_signal_helper();