- Jan 28, 2025
-
-
Zbigniew Kempczyński authored
Tests which plays with module unload/load/reload must ensure scanned device list cache is up-to-date. Missing direct calling of device scan after module operations may lead to use stale data and use invalid device name if it was changed in the meantime. Lucas noticed device scanning overhead is minimal and we may drop caching logic and scan (get drm data from udev) unconditionally. >From igt_runner perspective where single subtest is a separate process device scan cost might likely be ignored. Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by:
Lucas De Marchi <lucas.demarchi@intel.com> Link: https://lore.kernel.org/r/20250123095208.72984-2-zbigniew.kempczynski@intel.com Signed-off-by:
Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
-
- Jan 10, 2025
-
-
Lucas De Marchi authored
There are 2 things happening here: one is converting time in nanoseconds to ticks by using the refclock, and another asserting a spin duration is not so close to the maximum duration since there needs to be room for context switch. Move the time conversion to xe_util.c and adjust it to maintain namespace and have better names. Places that do the time conversion to pass to xe_spin then use the xe_spin_nsec_to_ticks() wrapper to calculate the ticks. Reviewed-by:
Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://lore.kernel.org/r/20250107202615.1306306-4-lucas.demarchi@intel.com Signed-off-by:
Lucas De Marchi <lucas.demarchi@intel.com>
-
- Oct 01, 2024
-
-
Lucas De Marchi authored
In several places intel_register_access_init() is called with fd == -1 as argument, even if it's passing a certain pci_dev, as e.g. the one returned by intel_get_pci_device(). Those don't actually operate for the same device. The fd is used for taking the forcewake, however if fd == -1, then it always use <debugfs>/dri/0, which is not correct. intel_get_pci_device() may not be the right function to use, but this can be fixed later - for now it will at least use the same pci device for taking the forcewake. For intel_reg, Before: $ # with runtime pm already taken $ sudo ./build/tools/intel_reg read 0x2358 (0x00002358): 0x00000000 $ # without runtime pm $ sudo ./build/tools/intel_reg read 0x2358 (0x00002358): 0xffffffff After: $ sudo ./build/tools/intel_reg read 0x2358 (0x00002358): 0xc3945002 Reviewed-by:
Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://lore.kernel.org/r/20240926041651.412396-4-lucas.demarchi@intel.com Signed-off-by:
Lucas De Marchi <lucas.demarchi@intel.com>
-
- Jul 31, 2024
-
-
Added command line option (-l) to list physical engines. Signed-off-by:
Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Reviewed-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com>
-
This patch introduces a more flexible and detailed approach to specifying engines. The tool now dynamically generates a list of available physical engines by querying the device, moving away from a static enumeration of engine IDs. Engines are now identified using [class:instance:gt] tuples. This approach accommodates the specification of engine instances in the format `engine_class[<engine_instance>-<gt_id>]`, enhancing the granularity of engine selection, ex. First VCS engine may be specified as VCS, VCS1, and VCS1-0. The patch adds support for the compute engine class (CCS). To maintain compatibility with existing workload definitions, the patch ensures that 1-based engine instance IDs are preserved. v2: Correct unbalanced braces, indentation. Signed-off-by:
Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Acked-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com>
-
Renamed `request` to `request_idx` for consistency with `engine_idx`. The index references an element of device's physical engines array. Similar to engine_idx the field is initialized in workload's preparation phase. Field is used for throttling functionality, enabling control over the rate of requests on a given engine. v2: Avoid multiple assignments. Signed-off-by:
Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Acked-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com>
-
This patch introduces a new member, engine_idx, to the w_step structure. This index is populated during the workload preparation phase and is designed to reference an engine within the context's dynamic engine map or legacy/static engine list. The introduction of engine_idx significantly simplifies the engine selection process during the run phase of the benchmark. By directly associating each workload step with a specific engine index, the patch eliminates the need for engine identification and mapping logic that was previously required. This change not only streamlines the execution flow but also lays the groundwork for supporting dynamic engine lists in coming patches. v2: Correct indentation. Signed-off-by:
Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Acked-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com>
-
This change brings the handling of bonding information in line with other parts of the code that use structured approaches for similar data, enhancing overall consistency. Prepares code to use struct intel_engines as bond.mask. v2: Correct indentation. Signed-off-by:
Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Acked-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com>
-
Introduction of struct intel_engines, which encapsulates the number of engines (nr_engines) and a pointer to an array of engine IDs (engines). This structural refactor replaces the previous ad-hoc approach of managing engine maps across various structures (w_step, ctx, etc.) This change is part of a series of preparatory steps for upcoming patches. v2: Correct indentation. Signed-off-by:
Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Acked-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com>
-
- Jul 26, 2024
-
-
Marcin Bernatowicz authored
It appears that 'gem_mmap__wc' doesn't work for discrete graphics cards and 'I915_MMAP_OFFSET_FIXED' is needed instead. Adopt the mapping approach from 'lib/igt_dummyload'. v2: Correct brace balance (Kamil) Remove redundant 'ptr' variable Signed-off-by:
Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Reviewed-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com>
-
Marcin Bernatowicz authored
This commit adopts the approach present in lib/igt_dummyload to support generations that do not use relocations. The intel_allocator is leveraged to compute offsets on these generations. Apart of this change, the 'struct vm' is now shared by both i915 and Xe. It includes a 'vm_id' that the intel_allocator uses for address assignment. This modification enhances gem_wsim compatibility with newer platforms running i915. v2: Split mmap change to separate patch (Tvrtko) v3: Correct indentation (Kamil) Signed-off-by:
Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> Reviewed-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com>
-
- May 07, 2024
-
-
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>
-
- Apr 10, 2024
-
-
Mauro Carvalho Chehab authored
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>
-
- Mar 04, 2024
-
-
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>
-
- Feb 14, 2024
-
-
Bhanuprakash Modem authored
Add support for XE driver. Signed-off-by:
Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by:
Vandita Kulkarni <vandita.kulkarni@intel.com>
-
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: #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>
-
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>
-
- Jan 26, 2024
-
-
Matthew Auld authored
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>
-
- Dec 15, 2023
-
-
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>
-
- Dec 11, 2023
-
-
Marcin Bernatowicz authored
During the split of xe_sync types from flags introduced in commit ce4e53b0 ("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: ce4e53b0 ("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>
-
- Dec 05, 2023
-
-
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>
-
Francois Dugast authored
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>
-
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>
-
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>
-
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>
-
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>
-
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>
-
- Nov 27, 2023
-
-
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>
-
- Nov 17, 2023
-
-
Francois Dugast authored
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>
-
- Oct 17, 2023
-
-
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]
-
- Oct 10, 2023
-
-
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>
-
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>
-
__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>
-
Utility macro to easy traverse dependencies. Reviewed-by:
Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by:
Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
-
Group i915 specific fields. Reviewed-by:
Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by:
Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
-
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>
-
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>
-
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>
-
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>
-
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>
-