summaryrefslogtreecommitdiff
path: root/benchmarks
AgeCommit message (Collapse)AuthorFilesLines
2024-05-07benchmarks: use poll.h in includesReagan Bohan2-2/+2
sys/poll.h is non-standard and including it on musl produces a warning. Signed-off-by: Reagan Bohan <reagan@ourmail.work> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-04-10benchmarks: fix calloc calls with inverted argumentsMauro Carvalho Chehab2-4/+4
The new gcc version 14 now complains when calloc is called with inverted arguments: ../benchmarks/gem_exec_reloc.c:85:31: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 85 | target = calloc(sizeof(*target), num_relocs); | ^ ../benchmarks/gem_exec_reloc.c:85:31: note: earlier argument should specify number of elements, later size of each element Replace all occurrences of calloc that were warned on gcc 14 by placing the arguments at the right order. Logic fixed using this small python script, written specifically to catch gcc calloc warnings: #!/usr/bin/env python3 import re warnings = [ "lib/igt_kms.c:2781", "lib/igt_kms.c:2809", "lib/igt_kms.c:2858", "lib/igt_chamelium.c:156", "lib/igt_chamelium.c:1519", "tests/kms_atomic_transition.c:483", "tests/kms_atomic_transition.c:485", "tests/kms_atomic_transition.c:487", "tests/kms_flip.c:426", "tests/kms_flip.c:427", "tests/intel/gem_exec_alignment.c:204", "tests/intel/gem_exec_alignment.c:409", "tests/intel/gem_exec_fair.c:1121", "tests/intel/gem_exec_fair.c:1122", "tests/intel/gem_fence_thrash.c:153", "tests/intel/gem_fence_thrash.c:234", "tests/intel/gem_ppgtt.c:432", "tests/intel/gem_ppgtt.c:459", "tests/intel/gem_render_tiled_blits.c:152", "tests/intel/gem_userptr_blits.c:1433", "tests/chamelium/kms_chamelium_frames.c:943", "tests/amdgpu/amd_multidisplay_modeset.c:242", "benchmarks/gem_exec_reloc.c:83", "benchmarks/gem_exec_reloc.c:84", "benchmarks/gem_exec_reloc.c:85", "benchmarks/gem_latency.c:196", "assembler/main.c:400", "assembler/gram.y:219", "assembler/gram.y:231", "assembler/gram.y:242", ] split_file = re.compile(r"([^\:]+):(\d+)") calloc = re.compile(r"(calloc\s*\()(.*)\,\s*([\w\d\ \+\*\-\>]+)(\))") for f in warnings: match = split_file.match(f) if not match: continue fname = match.group(1) line_number = int(match.group(2)) new = "" with open(fname, 'r', encoding = 'utf8') as fp: for ln, line in enumerate(fp): if ln + 1 == line_number: new_line = calloc.sub(r"\1\3, \2\4", line) if new_line != line: line = new_line else: print(f"{fname}, line {line_number}: FAILED: {line.strip()}") new += line with open(fname, 'w', encoding = 'utf8') as fp: fp.write(new) Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-03-04igt: Remove duplicate igt_display_require() callsArthur Grillo1-2/+0
Now that we don't need call igt_display_require() twice, remove the duplicate calls, previously needed to expose the writeback output. Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-02-14benchmarks/kms_vblank: Add XE supportBhanuprakash Modem1-1/+1
Add support for XE driver. Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
2024-02-14benchmarks/gem_exec_tracer.c: Fix musl buildMohammed Anas1-0/+4
Original patch was added to void-linux: https://github.com/void-linux/void-packages/commit/111918317d06598fe1459dbe139923404f3f4b9d Fixes build error: ../benchmarks/gem_exec_tracer.c:274:1: error: conflicting types for ‘ioctl’; have ‘int(int, long unsigned int, ...)’ 274 | ioctl(int fd, unsigned long request, ...) Bug report with request to split the original patch into some functional changes: Link: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/138 Signed-off-by: Mohammed Anas <triallax@tutanota.com> Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-02-14benchmarks: Add KMS framebuffer stress benchmarkArthur Grillo2-0/+209
Create a benchmark for the VKMS driver. Use a KMS layout with deliberate odd sizes to try to avoid alignment accidents and run it for FRAME_COUNT frames flipping framebuffers in each plane. This benchmark was suggested by Pekka Paalanen to better analyse possible performance regression on the Virtual Kernel Modesetting(VKMS) driver. With this benchmark I was able to determine two performance regression: - 322d716a3e8a ("drm/vkms: isolate pixel conversion functionality") - cc4fd2934d41 ("drm/vkms: Isolate writeback pixel conversion functions") Link: https://lore.kernel.org/all/20240202214527.1d97c881@ferris.localdomain/ Suggested-by: Pekka Paalanen <pekka.paalanen@haloniitty.fi> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com> Acked-by: Maíra Canal <mcanal@igalia.com> Acked-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
2024-01-26benchmarks/gem_wsim: use xe_bb_size() helperMatthew Auld1-2/+1
No need to open code this anymore. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2023-12-15drm-uapi/xe: Remove sync bindsMatthew Brost1-2/+1
Align with commit ("drm/xe/uapi: Remove sync binds") v2: Fix exec_queue_reset_wait in xe_waitfence.c (Francois Dugast) Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2023-12-11benchmarks/gem_wsim: Fix array index issue in xe_sync object referencingMarcin Bernatowicz1-1/+1
During the split of xe_sync types from flags introduced in commit ce4e53b0faec ("drm-uapi/xe: Split xe_sync types from flags"), the array index of xe_sync objects was unnecessarily incremented in one of the lines. This caused the next line to reference the wrong xe_sync object. This patch fixes the array index issue, ensuring the correct xe_sync object is referenced. Fixes: ce4e53b0faec ("drm-uapi/xe: Split xe_sync types from flags") Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com>
2023-12-05tests/intel/xe: Adjust to KMD uAPI changes for long-running VMsThomas Hellström1-1/+1
Currently we're using "compute mode" for long running VMs using using preempt-fences for memory management, and "fault mode" for long running VMs using page faults. Change this to use the terminology "long-running" abbreviated as LR for long-running VMs. These VMs can then either be in preempt-fence mode or fault mode. The user can force fault mode at creation time, but otherwise the driver can choose whether to use or not use fault mode mode for long-running vms depending on the device capabilities. Cc: Matthew Brost <matthew.brost@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Francois Dugast <francois.dugast@intel.com> Cc: Oak Zeng <oak.zeng@intel.com> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Francois Dugast <francois.dugast@intel.com>
2023-12-05drm-uapi/xe: Split xe_sync types from flagsFrancois Dugast1-4/+5
Align with commit ("drm/xe/uapi: Split xe_sync types from flags") Signed-off-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2023-12-05drm-uapi/xe: Make DRM_XE_DEVICE_QUERY_ENGINES future proofRodrigo Vivi1-1/+1
Align with kernel commit ("drm/xe: Make DRM_XE_DEVICE_QUERY_ENGINES future proof") Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
2023-12-05xe: s/hw_engine/engineRodrigo Vivi1-4/+4
HW engine is redundant after exec_queue name was created. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2023-12-05drm-uapi/xe: Separate bo_create placement from flagsRodrigo Vivi1-1/+1
Align with kernel commit ("drm/xe/uapi: Separate bo_create placement from flags") Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2023-12-05xe_query: Kill visible_vram_if_possibleRodrigo Vivi1-1/+2
Let the caller set the flag and the xe_bo_query clear if not needed. Although the current helper makes the code cleaner, the goal is to split the flags into placement and flags as two different arguments on xe_bo_create. So, the flag decision cannot be hidden under the helper. v2: Fix one comment (Kamil Konieczny) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2023-12-05xe_ioctl: Rename *xe_bo_create_flags to simply xe_bo_createRodrigo Vivi1-2/+2
Now that we have only one variant we can unify to the simplest version. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2023-11-27benchmarks/gem_wsim: introduce bb_size fieldMarcin Bernatowicz1-14/+25
In certain scenarios (ATS-M when using LMEM), PAGE_SIZE=4096 is insufficient for Xe, necessitating alignment considerations. This change ensures that 'bb_size' aligns properly, preventing VM BIND failures in cases where the size is not aligned to the minimum page size of the region. Additionally, 'alloc_bo' for i915 has been updated to accommodate page-aligned allocated size. v2: Reverted to intel_allocator_alloc_with_strategy as not related to the change and for clarity due to its origin in a library rather than local definition. (Tvrtko) Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@intel.com> Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com>
2023-11-17drm-uapi/xe: Add _FLAG to uAPI constants usable for flagsFrancois Dugast1-6/+6
Align with commit ("drm/xe/uapi: Add _FLAG to uAPI constants usable for flags") Signed-off-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2023-10-17xe: Update to new VM bind uAPIMatthew Brost1-1/+1
Sync vs. async changes and new error handling. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Francois Dugast <francois.dugast@intel.com> [Rodrigo and Francois rebased and fixed conflicts]
2023-10-10benchmarks/gem_wsim: added basic xe supportMarcin Bernatowicz2-27/+491
Added basic xe support. Single binary handles both i915 and Xe devices. Some functionality is still missing: working sets, bonding. The tool is handy for scheduling tests, we find it useful to verify vGPU profiles defining different execution quantum/preemption timeout settings. There is also some rationale for the tool in following thread: https://lore.kernel.org/dri-devel/a443495f-5d1b-52e1-9b2f-80167deb6d57@linux.intel.com/ With this patch it should be possible to run following on xe device: gem_wsim -w benchmarks/wsim/media_load_balance_fhd26u7.wsim -c 36 -r 600 Best with drm debug logs disabled: echo 0 > /sys/module/drm/parameters/debug v2: minimizing divergence - same workload syntax for both drivers, so most existing examples should run on xe unmodified (Tvrtko) This version creates one common VM per workload. Explicit VM management, compute mode will come in next patchset. v3: - use calloc in parse_workload for struct workload, to allow cleanups in fini_workload - grouped xe specific fields (Tvrtko) - moved is_xe boolean next to fd (Tvrtko) - use xe_ prefix for Xe specific things (Tvrtko) - left throttling untouched (Tvrtko) - parse errors vs silent skips on not implemented steps (Tvrtko) - need to think on better engine handling in next version - add 'Xe and i915 differences' section to README (Tvrtko) for now no data dependency implemented, left -1 <=> f-1 to not modify examples (maybe too optimistic assumption?) v4: - corrected engines mappings for xe (Tvrtko) "M.1.VCS,B.1,1.DEFAULT.1000.0.1" should use VCS - verified engines selection works on MTL (Tvrtko) - prevent misuse combinations of fence and implicit data deps (Tvrtko) ex. "f,1.DEFAULT.1000.-1.0" should fail "f,1.DEFAULT.1000.f-1.0" is valid - corrected error messages (Tvrtko) - moved wsim_err up to be accessible from parse_dependencies - missing xe_device_put (Tvrtko) - left fini_workload cleanup for separate patch - README updates v5: - introduced xe_get_default_engine (Tvrtko) (move to function silences too many leading tabs warning) - drop gen11+ check for xe (Tvrtko) Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: for_each_w_step macroMarcin Bernatowicz1-38/+43
for_each_w_step macro to easy traverse workload steps. v2: - added comment on igt_unique in macro Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: for_each_ctx macroMarcin Bernatowicz1-20/+26
__for_each_ctx, for_each_ctx macros to easy traverse contexts. v2: - more readable macro name (Tvrtko) Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: for_each_dep macroMarcin Bernatowicz1-20/+25
Utility macro to easy traverse dependencies. Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: group i915 fieldsMarcin Bernatowicz1-48/+52
Group i915 specific fields. Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: extract prepare working sets code to new functionMarcin Bernatowicz1-48/+56
No functional changes. Extracted prepare_working_sets function from prepare_workload. v2: - return void (Tvrtko) Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: extract allocate and prepare contexts code to new functionsMarcin Bernatowicz1-11/+32
No functional changes. Extracted allocate_contexts and prepare_contexts functions from prepare_workload. v2: - propagate error code from prepare_contexts (Tvrtko) - don't mix unrelated changes (Tvrtko) Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: introduce w_step_sync functionMarcin Bernatowicz1-6/+11
Added w_step_sync function for workload step synchronization. Change will allow cleaner xe integration. v2: - correct indentation (Tvrtko) Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: allow comments in workload description filesMarcin Bernatowicz2-1/+23
Lines starting with '#' are skipped. If command line step separator (',') is encountered after '#' it is replaced with ';' to not break parsing. v2: - SKIP step type is not needed (Tvrtko) v3: - correct README comment (Tvrtko) - removed hunk for trailing comments after BATCH step, as some other steps do not support it either (Tvrtko) v4: - correct out of bound access if file ends with hash (Tvrtko) v5: - updated comment (Tvrtko) Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: use lib code to query enginesMarcin Bernatowicz1-136/+17
Use code in lib/i915/gem_engine_topology to query engines. v2: - keep i unsigned, restore igt_assert(count) in num_engines_in_class (Tvrtko) Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: reposition repeat_start variableMarcin Bernatowicz1-5/+3
No need for repeat_start in struct workload. It's now a variable in run_workload function scope. Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: cleanupsMarcin Bernatowicz1-21/+33
Cleaning checkpatch.pl reported warnings/errors. Removed unused fence_signal field from struct w_step. v2: - restored unnecessarily changed malloc (Tvrtko) Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: fix conflicting SSEU #define and enumMarcin Bernatowicz1-11/+11
One SSEU is in enum w_step and then as #define SSEU (1 << 3). Fix this. v2: - add FLAG_ prefix to all flags (Tvrtko) Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: extract duration parsing code to new functionMarcin Bernatowicz1-30/+40
Moved code from parse_workload to separate function. v2: - keep "field" parameter name (instead of "_desc") (Tvrtko) - emit error messages from parse_duration, caller returns NULL on parse_duration failure (Tvrtko) Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: fix duration range checkMarcin Bernatowicz1-2/+2
When scale duration (-f) command line option is provided, the max duration check does not take it into account, fix it. v2: - improve error message (Tvrtko) Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-10-10benchmarks/gem_wsim: reposition the unbound duration booleanMarcin Bernatowicz1-5/+5
All duration info is now in struct duration of w_step. v2: - rename unbound_duration to unbound (Tvrtko) Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
2023-03-08igt: Remove duplicated macrosZbigniew Kempczyński1-3/+3
Introducing intel_gpu_commands.h requires removing all conflicting macros definitions with altering the code (mostly command length). For all commands used in IGT but not in the kernel (yet) add intel_gpu_commands_staging.h which will keep all commands used here only. Next import of command macros might finish verbatim copy + removing from staging in one commit to compile cleanly. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Petri Latvala <adrinael@adrinael.net> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2022-12-19benchmarks/intel_upload_blit_*: Remove libdrm in upload blitsZbigniew Kempczyński5-230/+315
Few benchmarks still used libdrm so let's rewrite them to be libdrm free. I tried to mimic the libdrm behavior as much as possible but according how libdrm caches handles/mappings there may be some differences in performance execution. v2: Move benchmarks to scope without libdrm in meson.build Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2022-10-12Restrict sigev_notify_thread_id macro definition to LinuxJake Freeland1-2/+1
The `#define sigev_notify_thread_id _sigev_un._tid` macro differs on FreeBSD. This patch uses ifdefs to stop the compiler from overriding FreeBSD's existing definition. Signed-off-by: Jake Freeland <jfree@freebsd.org> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2022-10-11Include igt_freebsd.h in gem benchmarksJake Freeland2-0/+8
Allow benchmark compilation on a FreeBSD system using the drop-in igt_freebsd header. Signed-off-by: Jake Freeland <jfree@freebsd.org> Acked-by: Petri Latvala <petri.latvala@intel.com>
2022-10-11Ifdef out linux-specific headersJake Freeland1-0/+2
Use #ifdef __linux__ to limit all Linux-specific headers to Linux systems Signed-off-by: Jake Freeland <jfree@freebsd.org> Acked-by: Petri Latvala <petri.latvala@intel.com>
2022-06-15benchmarks/gem_blt: fix baseline estimationMauro Carvalho Chehab1-13/+5
This test is expected to run under a certain time defined by a command line parameter (by default, 2s). In order to achive the specified time, the baseline() function tries to estimate the value of a counter that will get the minimal amount of interaction to wait for > 0.1s. However, currently, the baseline estimation is broken, returning a too big number, as it is measuring the memcpy() time, instead of actually gem_execbuf(). Due to that, a default test without passing any command line parameter would take more than 1.5 years to output the first benchmark data! Fix it by using the same logic that it is inside run() at the baseline time estimation. Before this patch, baseline could return 399242693. After it, it now return 20. That means an interval of about 120 ms at the code which runs a gem_execbuf() loop, which should be good enough to ensure that the tests won't take too long, and will approximately match the time specified by the excecution parameter '-t'. Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-06-13lib/intel_reg: Add common MI_* macros to remove duplicatesZbigniew Kempczyński1-31/+0
In few tests we got some MI_* duplicates (MI_MATH for example). Add common definitions in intel_reg.h and remove local definitions in the tests. v2: Definitions MI_LOAD_REGISTER_MEM_GEN8 was removed so from now on user will need to encode length on it own. : Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2021-10-15benchmarks/gem_exec_fault: Add softpin mode to support gens with ppgttZbigniew Kempczyński1-4/+39
Alignment trick doesn't work properly for ppgtt gens - kernel is able to keep previous offset and doesn't call unbind/bind. With softpin on ppgtt we're able to enforce rebind and benchmark should behave correctly on such gens. To avoid inaccurate results kernel CONFIG_PROVE_LOCKING should be set to N, otherwise kernel can call unbind/bind for same offset more than one (backoff is not visible from userspace). v2: rename to gem_allows_obj_alignment() Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-10-15benchmarks/gem_exec_fault: Add timeout argumentZbigniew Kempczyński1-6/+18
Add timeout argument and change elapsed time to inner loop to be more precise in timeout processing. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-07-15benchmarks/gem_busy: nuke LOCAL_IOCTL_SYNCOBJ_WAITLucas De Marchi1-15/+3
This is DRM_IOCTL_SYNCOBJ_WAIT. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-07-15benchmarks/gem_busy: nuke LOCAL_IOCTL_SYNCOBJ_CREATELucas De Marchi1-5/+2
This is DRM_IOCTL_SYNCOBJ_CREATE. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-07-15benchmarks/gem_exec_tracer: nuke LOCAL_IOCTL_I915_GEM_EXECBUFFER2_WRLucas De Marchi1-4/+1
Use DRM_IOCTL_I915_GEM_EXECBUFFER2_WR from kernel header. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
2021-05-27lib/i915/gem_create: Add gem_create_extAndrzej Turko14-14/+14
Add a wrapper for gem_create_ext ioctl (a version of gem_create that accepts extensions). In preparation for the driver change implementing it, a local definition of its id and necessary structs have been added, which are to be erased as soon as those definitions appear in the i915_drm.h file. The new ioctl wrapper is added to a separate file. For consistency the wrapper of the old ioctl, gem_create is moved from ioctl_wrappers to gem_create. Signed-off-by: Andrzej Turko <andrzej.turko@linux.intel.com> Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Chris P Wilson <chris.p.wilson@intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2021-05-26benchmarks/gem_userptr_benchmark: Remove tests with unsynchronized flagZbigniew Kempczyński2-41/+13
As flag I915_USERPTR_UNSYNCHRONIZED is not supported by the i915 anymore remove tests which tries to use it in the benchmark. Remove benchmark from meson libdrm depending code as it is a little bit confusing. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin.com>
2021-04-23gitignore: Remove various .gitignore filesPetri Latvala1-23/+0
Now that autotools is gone and you always build to a dedicated build directory with meson, we can remove .gitignore files that only had the purpose of ignoring built binaries in the source directories. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arek@hiler.eu> Reviewed-by: Arkadiusz Hiler <arek@hiler.eu>