Commit Graph

142 Commits

Author SHA1 Message Date
Compute-Runtime-Validation 94cc48f81b Revert "fix: don't use fake userptr flag in ioctl helper xe"
This reverts commit d3ab256f55.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-03-15 03:08:01 +01:00
Mateusz Jablonski d3ab256f55 fix: don't use fake userptr flag in ioctl helper xe
Related-To: NEO-10496
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-03-14 18:41:17 +01:00
Neil R. Spruit b5f8a38f19 feature: Enable Per IP euStall Functionality
Related-To: NEO-10220

Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
2024-03-14 16:49:52 +01:00
Young Jin Yoon 7b81c4e08f feature: abort when unexpected GPU page fault detected
If ResetStats from i915 is from the GPU page fault, abort
the entire process instead of disabling engines.
Added a fallback mechanism when prelim_drm_i915_reset_stats
fails.

Related-To: GSD-5673
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2024-03-14 08:14:59 +01:00
Compute-Runtime-Validation 9cce1183cd Revert "feature: use prelim reset_stats for detailed statisics"
This reverts commit 835dc8b594.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-03-13 14:31:57 +01:00
Young Jin Yoon 835dc8b594 feature: use prelim reset_stats for detailed statisics
Added getResetStats() in ioctl_helper.h to support extended header for
prelim_drm_i915_reset_stats.
Added new data structure to capture the fault data structure for prelim.

Related-To: GSD-5673
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2024-03-13 11:37:04 +01:00
Brandon Yates 7a0d2df2fe fix: Handle Pat Index Ext not supported on Xe
Xe does not support VmBindPatIndexExtension. This patch
fixes the handling of this case and prevents corrupting
other extensions

Related-to: NEO-9674

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-03-06 11:18:31 +01:00
Brandon Yates fa4b737326 feature: Implement metadata attaching for vm_bind in xe
Related-to: NEO-9674

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-02-28 01:36:20 +01:00
Brandon Yates 76de854a69 feature: Set Debug Attach Available for Xe
Related-to: NEO-8402

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-01-24 09:04:11 +01:00
Brandon Yates ba0db2488a refactor: Implement Xe Resoure Registration (2/x)
Refactor drm_debug.cpp into IoctlHelper

Related-to: NEO-9161

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-01-11 08:26:29 +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
Mateusz Jablonski d8f6551b6b refactor: move i915 ioctl helper to dedicated file
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-28 12:01:18 +01:00
Mateusz Jablonski 72a999599f refactor: remove i915 dependency from xe ioctl helper
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-28 09:29:27 +01:00
Naklicki, Mateusz 08f7e7be18 fix: align NEO to new Xe KMD header
Align to the new PAT and cache coherency support

There is an issue with coherency=non_coh, which
is default option for some platforms.
Add temporary W/A until this issue is resolved.

xe_drm.h header is generated from the series
"PAT and cache coherency support"
from https://patchwork.freedesktop.org/series/123027/

Related-To: NEO-9421, NEO-8324
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2023-12-22 16:44:26 +01:00
Compute-Runtime-Validation 570b4d3d39 Revert "fix: align NEO to new Xe KMD header"
This reverts commit f68b8a2c97.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-12-14 10:23:31 +01:00
Naklicki, Mateusz f68b8a2c97 fix: align NEO to new Xe KMD header
Align to the new PAT and cache coherency support

xe_drm.h header is generated from the series
"PAT and cache coherency support"
from https://patchwork.freedesktop.org/series/123027/

Related-To: NEO-9421, NEO-8324
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2023-12-13 14:14:35 +01:00
Young Jin Yoon 3782b4bd0e feature: add functions to get/set VA space
Added an extension version of zeContextGetVirtualAddressSpaceIpcHandle
and zeContextPutVirtualAddressSpaceIpcHandle, which return
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE for now.

Related-To: NEO-8259

Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2023-11-06 20:08:45 +01:00
Compute-Runtime-Validation bcc5a8502b Revert "feature: add functions to get/set VA space"
This reverts commit 0550c80d4f.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-11-03 02:06:36 +01:00
Young Jin Yoon 0550c80d4f feature: add functions to get/set VA space
Added an extension version of zeContextGetVirtualAddressSpaceIpcHandle
and zeContextPutVirtualAddressSpaceIpcHandle, which return
ZE_RESULT_ERROR_UNSUPPORTED_FEATURE for now.

Related-To: NEO-8259

Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2023-11-02 18:42:27 +01:00
Naklicki, Mateusz 1352bde5c8 fix: use pointer instead of std::function
MSVC Compiler found an issue that there could be an attempt to
reference a deleted function when using std::function.
As the functionality of ioctlHelper::getGpuTime is very straightforward,
simple function pointer should be sufficient to make the job and
it mitigates overhead of std::function.

Related-To: NEO-8324
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2023-10-25 06:23:43 +02:00
Francois Dugast 1fd9d29f54 feature: update Xe KMD header
xe_drm.h header is generated from the series "uAPI Alignment - take 1 v4"
from https://patchwork.freedesktop.org/series/124387/

Related-To: NEO-8324
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Signed-off-by: Kamil, Kopryk <kamil.kopryk@intel.com>
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2023-10-24 12:03:45 +02:00
Mateusz Jablonski 85eafc9e61 fix: query drm info to aligned storages
xe topology info to byte aligned storage
xe engine info to 2 byte aligned storage
system info to 4 byte aligned storage

all other info to 8 byte aligned storage

Related-To: NEO-9038
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-10-06 16:11:40 +02:00
Compute-Runtime-Validation d5f90ae155 Revert "fix: query drm info to 8 byte aligned storage"
This reverts commit 9b344280d6.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-10-05 06:07:27 +02:00
Mateusz Jablonski 9b344280d6 fix: query drm info to 8 byte aligned storage
Related-To: NEO-9038
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-10-03 18:43:53 +02:00
Compute-Runtime-Validation 8fa0b90f35 Revert "fix: query drm info to 8 byte aligned storage"
This reverts commit d0e615820c.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2023-10-03 15:41:11 +02:00
Mateusz Jablonski d0e615820c fix: query drm info to 8 byte aligned storage
Related-To: NEO-9038
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-10-03 11:13:38 +02:00
John Falkowski 56f05303c9 feature: add support for zeMemGet/SetAtomicAccessAttributeExp
Resolves: NEO-8219

Signed-off-by: John Falkowski <john.falkowski@intel.com>
2023-10-02 15:59:17 +02:00
Mateusz Jablonski 3ceafa2259 fix: remove setting debug flags for ioctl helper xe
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-09-26 15:42:52 +02:00
Kamil Kopryk 1ab0467301 fix: Add bind info for allocation from ipc handle in xe
Related-To: NEO-7996
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-09-13 12:34:10 +02:00
Cencelewska, Katarzyna a6ea67bd09 fix: add empty functions to set and get gemTiling in xeIoctlHelper
it is needed until there is no support in xe kmd for image tiling

Related-To: NEO-8325
Signed-off-by: Cencelewska, Katarzyna <katarzyna.cencelewska@intel.com>
2023-09-12 16:11:37 +02:00
Cencelewska, Katarzyna 98dae70415 fix: add helper to proper call GemCreate on xe kmd
Related-To: NEO-8325
Signed-off-by: Cencelewska, Katarzyna <katarzyna.cencelewska@intel.com>
2023-09-08 12:27:11 +02:00
Bari, Pratik 3f083360a2 feature(sysman): Added sysfs filenames for the memory module
- The sysfs filenames have been added in the sysfsNameToFileMap of the
SysmanKmdInterface classes.
- The functions returning the sysfs filenames have been removed from the
shared directory.
- The ULTs have been added to return the sysfs filenames.

Related-To: LOCI-4699

Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
2023-08-03 22:36:17 +02: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
Kamil Kopryk 082d33bb7c fix: correct query topology on xe
Related-To: NEO-7996
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-06-22 13:24:52 +02:00
Bari, Pratik a15e8a9679 feature: Added changes for Porting Memory API with XE driver
The Memory Info object is used in the getState function for memory.
Some of the ULTS in the memory modules has been modified.
A function to return the sysfs nodes for the Memory address range has
been added in the IoctlHelper class corresponding to the XE and i915
driver.

Related-To: LOCI-4397

Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
2023-06-20 21:38:17 +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
Kamil Kopryk 915495ce28 refactor: remove not needed forward declaration
Related-To: NEO-7786
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-05-23 16:06:16 +02:00
Kamil Kopryk 4be9b7e609 fix: setup ipVersion in linux paths
Get ipVersion from productHelper function on xe and upstream.
On prelim first try to query ipVersion from kmd,
if it fails, get ipVersion from productHelper function.

Related-To: NEO-7786
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2023-05-23 09:27:15 +02:00
Mateusz Jablonski 87aab0bf6e fix: don't create fake memory regions in xe ioctl helper
populate memory info based on mem usage and gts info
propagate error from xeWaitUserFence function

Related-To: NEO-7931

Co-authored-by: Francois Dugast <francois.dugast@intel.com>
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-05-04 13:51:37 +02:00
Mateusz Jablonski 26a2a2829e fix: don't create fake distance info in xe ioctl helper
populate multi tile engine info based on gt_id from xe engine info

Related-To: NEO-7931
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-05-04 08:21:28 +02:00
Mateusz Jablonski 88c352c580 refactor: move query engine / memory info logic to ioctl helper
Related-To: NEO-7931
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-05-02 10:05:26 +02:00
Milczarek, Slawomir bf778be99e [fix] zeCommandListAppendMemAdvise to clear preferred location correctly
The memadvise with preferred location for kmd-migrated shared allocation
is set to device associated with cmd list by default to migrate data
to lmem on non-atomic gpu page fault as well (for performance reasons).

Related-To: NEO-7252

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-04-24 14:51:49 +02:00
Lukasz Jobczyk 853a65aae9 Add PCI barrier implementation
Resolves: NEO-7850

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2023-04-24 10:33:03 +02:00
Milczarek, Slawomir 0ff46562db [perf] Improve placement of KMD shared allocation in scenario with subdevice 1
Improves performance for benchmarks with KMD-migrated shared allocation
in scenarios with ZE_AFFINITY_MASK=0.1.

Related-To: NEO-7881

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-04-13 17:55:50 +02:00
Milczarek, Slawomir 4e6995bc4c Set VM advise with preferred location to device by default
Apply the KMD advise with preferred device location for KMD-migrated
shared allocation to migrate to lmem on every GPU page fault
(default KMD migration policy).

Related-To: NEO-7851

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2023-03-30 17:04:23 +02:00
Mateusz Jablonski 415d2cb121 fix xe: add missing wait on fence before unbind
Related-To: NEO-7306
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-03-21 15:37:44 +01:00
Aravind Gopalakrishnan d75c4d3ec7 fix: Skip adding device to list if context creation fails
Propogate error codes from ioctl failure properly up the layers
so that we skip exposing bad root devices.

Related-To: NEO-7709

Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
2023-02-16 11:40:54 +01: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