All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v4 1/3] lib/ioctl_wrapper: use defines for get_param instead of param number
@ 2019-01-15 13:44 Lukasz Kalamarz
  2019-01-15 13:44 ` [igt-dev] [PATCH i-g-t v4 2/3] lib/igt_dummyload: use gem_mmap__cpu and gem_mmap__wc when applicable Lukasz Kalamarz
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Lukasz Kalamarz @ 2019-01-15 13:44 UTC (permalink / raw)
  To: igt-dev

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 <lukasz.kalamarz@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/ioctl_wrappers.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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 = &gtt_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)))
-- 
2.17.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-01-15 23:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15 13:44 [igt-dev] [PATCH i-g-t v4 1/3] lib/ioctl_wrapper: use defines for get_param instead of param number Lukasz Kalamarz
2019-01-15 13:44 ` [igt-dev] [PATCH i-g-t v4 2/3] lib/igt_dummyload: use gem_mmap__cpu and gem_mmap__wc when applicable Lukasz Kalamarz
2019-01-15 13:44 ` [igt-dev] [PATCH i-g-t v4 3/3] lib/ioctl_wrapper: Implement __gem_mmap Lukasz Kalamarz
2019-01-15 14:02   ` Chris Wilson
2019-01-15 14:12 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v4,1/3] lib/ioctl_wrapper: use defines for get_param instead of param number Patchwork
2019-01-15 18:34 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-01-15 23:20 ` [igt-dev] [PATCH i-g-t v4 1/3] " Daniele Ceraolo Spurio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.