Commit Graph

28 Commits

Author SHA1 Message Date
Maciej Bielski 6ecf5b373e feature: exit with warning if small bar detected on Linux
Return early and provide justification, otherwise SIGBUS error is
returned.

Related-To: NEO-14506
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2025-04-14 14:43:25 +02:00
Maciej Bielski 8ad6a7a86b feature: unify local memory size getter for i915 and xe
Previously i915 was using a sysfs node to query the amount of local
memory of a tile. For xe such sysfs node does not exist so the function
was useless.

Instead of a sysfs node, leverage the local memory size present in
MemoryInfo (queried at init-stage) so that the output is now the same
for both i915 and xe.

Related-To: NEO-11127
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2025-03-07 09:50:19 +01:00
Maciej Bielski 014720fc29 refactor: use DeviceBitfield where appropriate
Replace less type-safe uint32_t and reduce conversions between both
types.

Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-05-14 09:13:11 +02:00
Maciej Bielski ff494d5c50 feature: add tile-to-lmem-region map in MemoryInfo
Arguments names refreshed to be more explanatory.

Related-To: NEO-9754

Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-04-26 15:16:03 +02:00
Maciej Bielski c2b4699cb6 feature: Add mask of tiles to each memory region in Xe
* Derive that information from GT list
* Use it to compute local memory size given the mask of tiles to account
for
* Leverage IoctlHelper to dispatch execution (i915 vs Xe)

Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-04-16 14:22:40 +02:00
Yoon, Young Jin 9c7578f5f4 fix: change numa_library to read default policy
Changed NumaLibrary to read default policy instead of using
the address-based policy, and remove unnecessary argument.

Removed numaif.h from the repo as it is no longer required.

Related-To: NEO-8276
Signed-off-by: Yoon, Young Jin <young.jin.yoon@intel.com>
2024-01-19 08:31:41 +01:00
Young Jin Yoon 4ccae1dbb4 feature: support memory policy for GEM_CREATE
Modified ioctl_helper_prelim to support the extension of gem_create_ext,
i.e. prelim_drm_i915_gem_create_ext_mempolicy.

Added two debug variables to be used for the mempolicy extension.

Modified functions in memory_info and drm_memory_manager to support extension

Added numaif.h from https://github.com/numactl/numactl/tree/master,
v2.0.14

Related-To: NEO-8276
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2024-01-04 23:49:10 +01:00
Filip Hazubski 7ea22d0369 feature: Add pat index programming to gem create ext call
When upstream ioctl helper is created it will try to create small
allocation, adding I915_GEM_CREATE_EXT_SET_PAT extension. If it
succeeds, for all resources with valid pat index value it will then
explicitly program pat index value with gem create ext call.

PrintBOCreateDestroyResult value can be used to:
- print whether the set pat extension is supported by the kernel, when
  ioctl helper is created
- print whether set pat extension was added for a given gem create ext
  call and what pat index value was programmed

Note: introduced changes are disabled by defualt.
Toggle DisableGemCreateExtSetPat can be used to enable new functionality.

Related-To: NEO-7896

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2023-07-31 09:00:04 +02:00
Compute-Runtime-Validation 2d7505c01c Revert "feature: Add pat index programming to gem create ext call"
This reverts commit 6489379508.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-07-02 05:06:58 +02:00
Filip Hazubski 6489379508 feature: Add pat index programming to gem create ext call
When upstream ioctl helper is created it will try to create small
allocation, adding I915_GEM_CREATE_EXT_SET_PAT extension. If it
succeeds, for all resources with valid pat index value it will then
explicitly program pat index value with gem create ext call.

PrintBOCreateDestroyResult value can be used to:
- print whether the set pat extension is supported by the kernel, when
  ioctl helper is created
- print whether set pat extension was added for a given gem create ext
  call and what pat index value was programmed

Resolves: NEO-7896

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2023-06-29 08:51:00 +02:00
Jaime Arteaga 2efd6e547a feature: Add support for chunking in the UMD (1/N)
Read if support for chunking is available in the KMD.
If available, KMD will create a BO with 1 or more chunks,
depending on the chunk size selected.

Related-To: NEO-7695

Sync to
https://github.com/intel-gpu/drm-uapi-helper/releases/tag/v2.0-rc18

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-06-02 23:27:40 +02:00
Mateusz Jablonski 6f21d133cf fix: extend MemoryInfo class interface to expose single memory region
unify logic of OverrideDrmRegion debug flag

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-05-30 16:27:42 +02:00
Filip Hazubski 2ed2ac73d1 refactor: correct ioctl and related functions to return signed int
Change IoctlHelper::ioctl function to return int.
Change IoctlHelper::createGemExt function to return int.
Change IoctlHelper::queryDistances function to return int.
Change UuidRegisterResult::retVal type to int32_t.
Rename res to ret in debug_session.cpp for consistency.

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2023-01-19 22:04:27 +01:00
Kamil Kopryk 772dec81e4 Don't use global productHelper in isBankOverrideRequired function
Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2022-12-20 17:41:34 +01:00
Jaime Arteaga a3b3f3e86e Add support for PRELIM_I915_PARAM_SET_PAIR
This extension allows pairing two buffer objects so they can be
exported using a single dma-buf handle. When imported, a single
buffer object is created with a total size of the two buffer
objects.

Related-To: LOCI-3355

Sync to
https://github.com/intel-gpu/drm-uapi-helper/releases/tag/v2.0-rc15

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-09-29 23:41:39 +02:00
Mateusz Jablonski b49e2237c5 Pass drm to MemoryInfo ctor
Related-To: NEO-6999
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-07-25 15:44:10 +02:00
Milczarek, Slawomir 30071599df Create buffer object with multiple lmem regions for kmd-migrated buffers
This commit enables cross-tile kmd migration for buffers in local memory

Related-To: NEO-6977

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-06-29 13:47:58 +02:00
Naklicki, Mateusz 65ca31d817 Remove magic number from createGemExt method
Related-to: NEO-6730
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2022-05-31 17:10:50 +02:00
Naklicki, Mateusz 58ec879c46 Add support for gem create extension to create VM_PRIVATE BOs
Add support for PRELIM_I915_GEM_CREATE_EXT_VM_PRIVATE extension
to create VM_PRIVATE BOs.

Related-to: NEO-6730
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2022-05-31 15:18:33 +02:00
Milczarek, Slawomir 2be98a1e62 Create kmd migrated allocation with initial placement
Implements ZE_HOST_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT
for zeMemAllocShared with KMD migrated allocation.

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-02-01 15:42:10 +01:00
Szymon Morek 5be9d2d584 Add assignRegionsFromDistances logic
If prelim kernel is being used, use distances
logic to assign memory regions.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-30 17:48:16 +01:00
Szymon Morek d9f6757378 Change return type from unique_ptr to vector
In some of the drm functions there is a pattern
to store array in unique_ptr and pass it's length
as an argument. This commit simplifies this.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-28 10:33:53 +01:00
Szymon Morek 2647d563c7 Remove i915 structs from MemoryInfo
Use structs defined in ioctl_helper.h instead of
i915 dependent ones to avoid conflicts between
different kernels

Related-To: NEO-6149

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-22 12:46:59 +01:00
Szymon Morek 12777bd758 Move MemoryInfoImpl logic to MemoryInfo
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-11-29 13:13:11 +01:00
Szymon Morek 5c1c96fa94 Refactor gem creation with extensions
Related-To: NEO-6149

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-09-22 15:36:27 +02:00
Szymon Morek efd66a32c2 Add multitile arch. code in drm getLocalMemorySize
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-09-13 13:51:47 +02:00
Bartosz Dunajski 45b005161a Dont create VM IDs if not supported
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-04-14 10:51:56 +02:00
kamdiedrich e072275ae6 Reorganization directory structure [3/n]
Change-Id: If3dfa3f6007f8810a6a1ae1a4f0c7da38544648d
2020-02-23 23:48:28 +01:00