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>
This commit is contained in:
Michał Winiarski
2016-01-25 19:35:01 +01:00
committed by Daniel Vetter
parent 0e2071411a
commit 52b5d5016e
12 changed files with 52 additions and 62 deletions
+2 -18
View File
@@ -117,22 +117,6 @@ static void *thread(void *bufmgr)
return NULL;
}
static int uses_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;
}
static void
processes(void)
{
@@ -150,7 +134,7 @@ processes(void)
devid = intel_get_drm_devid(fd);
aperture = gem_aperture_size(fd);
ppgtt_mode = uses_ppgtt(fd);
ppgtt_mode = gem_gtt_type(fd);
igt_require(ppgtt_mode);
render_copy = igt_get_render_copyfunc(devid);
@@ -252,7 +236,7 @@ threads(void)
devid = intel_get_drm_devid(fd);
aperture = gem_aperture_size(fd);
ppgtt_mode = uses_ppgtt(fd);
ppgtt_mode = gem_gtt_type(fd);
igt_require(ppgtt_mode);
render_copy = igt_get_render_copyfunc(devid);