From aa97faa3828488478d97c1fce51650591681bdc9 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 10 Nov 2017 12:49:14 -0800 Subject: lib: Use drm-uapi/i915_drm.h instead of local defines. The MMAP_V2 is replaced by just using MMAP, since the official header has the updated struct. The gem_create_v2 and gem_get_aperture are left as is, because they seem to not be reflected in the UABI header! Signed-off-by: Eric Anholt Acked-by: Petri Latvala Acked-by: Daniel Vetter --- benchmarks/Makefile.am | 6 +++++- benchmarks/gem_wsim.c | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'benchmarks') diff --git a/benchmarks/Makefile.am b/benchmarks/Makefile.am index d066112a..9f2671be 100644 --- a/benchmarks/Makefile.am +++ b/benchmarks/Makefile.am @@ -8,7 +8,11 @@ if HAVE_LIBDRM_INTEL benchmarks_PROGRAMS += $(LIBDRM_INTEL_BENCHMARKS) endif -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib +AM_CPPFLAGS = \ + -I$(top_srcdir) \ + -I$(top_srcdir)/include/drm-uapi \ + -I$(top_srcdir)/lib + AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS) \ $(WERROR_CFLAGS) -D_GNU_SOURCE LDADD = $(top_builddir)/lib/libintel_tools.la diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c index 82fe6ba9..063f3ca3 100644 --- a/benchmarks/gem_wsim.c +++ b/benchmarks/gem_wsim.c @@ -893,9 +893,9 @@ prepare_workload(unsigned int id, struct workload *wrk, unsigned int flags) } if (wrk->prio) { - struct local_i915_gem_context_param param = { - .context = arg.ctx_id, - .param = 0x6, + struct drm_i915_gem_context_param param = { + .ctx_id = arg.ctx_id, + .param = I915_CONTEXT_PARAM_PRIORITY, .value = wrk->prio, }; gem_context_set_param(fd, ¶m); -- cgit v1.2.3