From 7caccf252df114151dbe493f961a74aa02a51e5c Mon Sep 17 00:00:00 2001 From: Lukasz Kalamarz Date: Wed, 9 Jan 2019 14:12:04 +0100 Subject: lib/ioctl_wrapper: use defines for get_param instead of param number In lib code there were few functions using param number instead of defines. We would like to use defines, since they are providing more information to user comparing to param number. v2: Rebased patch v4: Fixed commit message Signed-off-by: Lukasz Kalamarz Cc: Michal Winiarski Cc: Katarzyna Dec Cc: Daniele Ceraolo Spurio Cc: Chris Wilson Reviewed-by: Daniele Ceraolo Spurio --- lib/ioctl_wrappers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/ioctl_wrappers.c') diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index 9f255508..f71f0e32 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -708,12 +708,12 @@ bool gem_mmap__has_wc(int fd) has_wc = 0; memset(&gp, 0, sizeof(gp)); - gp.param = 40; /* MMAP_GTT_VERSION */ + gp.param = I915_PARAM_MMAP_GTT_VERSION; gp.value = >t_version; ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); memset(&gp, 0, sizeof(gp)); - gp.param = 30; /* MMAP_VERSION */ + gp.param = I915_PARAM_MMAP_VERSION; gp.value = &mmap_version; ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); @@ -964,7 +964,7 @@ static int gem_gtt_type(int fd) int val = 0; memset(&gp, 0, sizeof(gp)); - gp.param = 18; /* HAS_ALIASING_PPGTT */ + gp.param = I915_PARAM_HAS_ALIASING_PPGTT; gp.value = &val; if (ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp, sizeof(gp))) -- cgit v1.2.3