summaryrefslogtreecommitdiff
path: root/tests/gem_ppgtt.c
diff options
context:
space:
mode:
authorMichał Winiarski <michal.winiarski@intel.com>2016-01-25 19:35:01 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-01-25 19:44:31 +0100
commit52b5d5016edfac14ca99c01fc7c2800eccbe11c0 (patch)
treef866f3e2338c777c18c5e055de4ddf11538806b5 /tests/gem_ppgtt.c
parent0e2071411a4d4e1488a821daf522dffde2809e03 (diff)
lib/ioctl_wrappers: Add gem_gtt_type exposing raw HAS_ALIASING_PPGTT param
No functional changes. While I'm here, let's also rename gem_uses_aliasing_ppgtt (since it's being used to indicate if we are using ANY kind of ppgtt) and introduce gem_uses_full_ppgtt to drop some unnecessary code from tests that were previously calling getparam directly instead of using ioctl wrapper. v2: drop gem_uses_full_48b_ppgtt since it's no longer used anywhere, s/48b/64b (Chris) v3: rebase Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_ppgtt.c')
-rw-r--r--tests/gem_ppgtt.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/tests/gem_ppgtt.c b/tests/gem_ppgtt.c
index 1cc69eda..78d5b48f 100644
--- a/tests/gem_ppgtt.c
+++ b/tests/gem_ppgtt.c
@@ -44,22 +44,6 @@
#define HEIGHT 512
#define SIZE (HEIGHT*STRIDE)
-static bool uses_full_ppgtt(int fd)
-{
- struct drm_i915_getparam gp;
- int val = 0;
-
- memset(&gp, 0, sizeof(gp));
- gp.param = 18; /* HAS_ALIASING_PPGTT */
- gp.value = &val;
-
- if (drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp))
- return 0;
-
- errno = 0;
- return val > 1;
-}
-
static drm_intel_bo *create_bo(drm_intel_bufmgr *bufmgr,
uint32_t pixel)
{
@@ -240,7 +224,7 @@ static void flink_and_close(void)
uint64_t offset, offset_new;
fd = drm_open_driver(DRIVER_INTEL);
- igt_require(uses_full_ppgtt(fd));
+ igt_require(gem_uses_full_ppgtt(fd));
bo = gem_create(fd, 4096);
name = gem_flink(fd, bo);
@@ -277,7 +261,7 @@ static void flink_and_exit(void)
const int retries = 50;
fd = drm_open_driver(DRIVER_INTEL);
- igt_require(uses_full_ppgtt(fd));
+ igt_require(gem_uses_full_ppgtt(fd));
bo = gem_create(fd, 4096);
name = gem_flink(fd, bo);