Commit Graph

137 Commits

Author SHA1 Message Date
Naklicki, Mateusz 8f4472a26c fix: unblock xekmd recoverable pagefaults vmbind
Related-To: HSD-13011898606
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2024-07-23 12:00:25 +02:00
Brandon Yates 4513e42ddb build: Update to latest eudebug xe uapi
Remove implementation of some unused and removed
uapis

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-07-22 10:01:44 +02:00
Brandon Yates 3c51cea04a test: Add test for xe debug user fence wait
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-07-17 07:40:35 +02:00
Maciej Bielski 005b273b1e test: stop abusing ctors in DrmMockCustom and derived types
Calling virtual functions from within constructors is incorrect, the
virtualization mechanism does not work until a constructor completes.
So, instead of performing many operations in constructors, make them
small and use static `create()` methods to construct the object properly
and only then perform additional setup.

Mocks are a prominent example how such practice degrades the code.
A function called from a constructor is basically unmockable. Despite
being overriden by derived type (to alter the execution path as per
needs of a given test-case) the parent versions are always called.

This was making test development more and more painful as at some point
there is no hack to compensate for the lack of standard mechanism.

Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-07-10 08:34:09 +02:00
Mateusz Hoppe c660784df2 fix: fallback path while creating drm context
- if create VM ioctl fails, fallback to query VM from created context
- in fallback path context's VM will not have flags applied

Related-To: NEO-7813

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2024-07-09 14:10:51 +02:00
Bartosz Dunajski bb21d25ed0 feature: initial support for creating media context
Related-To: NEO-11386

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2024-07-03 12:23:31 +02:00
Maciej Bielski f99846a108 feature: add Drm-specific memoryBanks computation logic
Related-To: NEO-9754

Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-07-03 10:01:39 +02:00
Brandon Yates a432bdecc1 refactor: Reorganize xe debugger includes
Related-to: NEO-11365

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-07-02 12:28:11 +02:00
Compute-Runtime-Validation 2800282bdb Revert "fix: unblock xekmd recoverable pagefaults vmbind"
This reverts commit 5e144dae16.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-06-25 18:09:25 +02:00
Naklicki, Mateusz 5e144dae16 fix: unblock xekmd recoverable pagefaults vmbind
Related-To: HSD-13011898606
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2024-06-25 13:23:48 +02:00
Compute-Runtime-Validation d19f58019f Revert "feature: add Drm-specific memoryBanks computation logic"
This reverts commit 11f7166c5a.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-06-25 12:31:26 +02:00
Maciej Bielski 11f7166c5a feature: add Drm-specific memoryBanks computation logic
Related-To: NEO-9754

Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-06-24 11:22:41 +02:00
Bartosz Dunajski 64af8dd956 feature: allocating interrupt support
Related-To: NEO-8179

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2024-06-03 18:35:24 +02:00
Maciej Bielski d79c952d2b fix: set single localMemBanksCount when no MemoryInfo
Support legacy case.

Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
2024-05-20 12:22:16 +02:00
Bartosz Dunajski e5882e0d31 feature: pass GraphicsAllocation to fence wait
Related-To: NEO-8179

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2024-05-07 17:59:28 +02:00
Szymon Morek 83e8ae4a20 performance: Reuse GPU timestamp instead of KMD escape
This can be enabled only if related
debug flag will be set.

Related-To: NEO-10615

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2024-05-06 14:46:30 +02:00
Bartosz Dunajski 806da85ec6 refactor: prework to pass interrupt hint
Related-To: NEO-8179

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2024-04-29 11:14:53 +02:00
Bartosz Dunajski 8e5f9e72c8 refactor: simplify waiting for fence logic
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2024-04-25 22:36:19 +02:00
Compute-Runtime-Validation da9df9f0e7 Revert "performance: Reuse GPU timestamp instead of KMD escape"
This reverts commit 9ca2091725.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-04-18 10:25:15 +02:00
Morek, Szymon 9ca2091725 performance: Reuse GPU timestamp instead of KMD escape
Resolves: NEO-10615

Signed-off-by: Morek, Szymon <szymon.morek@intel.com>
2024-04-17 09:39:29 +02:00
Jaroslaw Warchulski ca70bb99b2 refactor: reduce the number of DrmAllocation constructors
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
2024-04-16 15:37:09 +02:00
Mateusz Jablonski ff4a919004 fix: correct gt id in context param engines in xe path
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-04-15 12:07:48 +02:00
Mateusz Jablonski 420e1391b2 fix: handle not aligned gtt size reported by i915
when i915 reports gtt size between 47 and 48 bits we consider
it as 48 bit VA space

Related-To: GSD-8215
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-03-29 07:51:06 +01:00
Mateusz Jablonski bcaa62bed3 build: refactor linux kernel headers
Add cmake flags to provide path to headers to drm / i915 /i915 prelim / xe

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-03-28 14:48:09 +01:00
Mateusz Jablonski 1e343053ba refactor: remove redundant recreating vector of engines in xe kmd path
make ContextParamEngine structure more generic and populate engines
by drm specific methods

Related-To: NEO-10496
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-03-21 17:55:39 +01:00
Mateusz Jablonski 0270cd6a5b fix: respect gt id when getting engines for drm context under xe kmd
Related-To: NEO-10496
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-03-15 16:02:47 +01:00
Young Jin Yoon 82728ff394 feature: add logic to iterate for all contexts to check GPU pagefault
Implemented to go through entire contexts in the process and then query
reset status to check the unexpected GPU segfault.

Added a new debug variable GpuFaultCheckThreshold to change the checking
frequency for each hang check for performance analysis.

Related-To: GSD-5673
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
2024-03-15 07:48:39 +01:00
Mateusz Jablonski 833fa6bce1 fix: correct querying engines from xe kmd
we get drm_xe_query_engines, not array of drm_xe_engine_class_instance

Related-To: NEO-10496
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-03-14 12:06:25 +01:00
Bartosz Dunajski fcd57f94cf refactor: capability to print mmap and munmap calls
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2024-03-06 14:29:01 +01:00
Dunajski, Bartosz 6cdd2d5dca fix: add missing gt_id when creating XE context
Related-To: GSD-8046

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2024-02-23 16:50:32 +01:00
Brandon Yates 0fa730e524 build: Update debugger uapi headers to latest
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-02-22 16:07:06 +01:00
Dominik Dabek 0120d8a58d performance: program pat index on mtl linux
Enable programming pat indexes on mtl linux for device buffers.

Change DrmMemoryManager::allocateMemoryByKMD to use gemCreateExt.

Set mmap flags based on coherency.
Map as write back on legacy and coherent.
On non-coherent map as write combined.

Changes currently disabled, to enable use debug keys:
DisableGemCreateExtSetPat=0
UseGemCreateExtInAllocateMemoryByKMD=1

Reorder BufferObject to decrease padding.

Related-To: NEO-7896

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2024-02-16 17:33:07 +01:00
Jitendra Sharma ff604bda1b feature: Implement thread control for debugger in XE
Related-To: NEO-9668
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2024-02-12 19:46:28 +01:00
Brandon Yates 27c089d60d feature: Register ELF for xe debugger
Related-to:  NEO-9674

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-02-02 09:19:19 +01:00
Maciej Plewka 564e0f0319 performance: Align host mem to 2MB when range is not limited
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>

Related-To: NEO-10217
2024-01-30 14:43:13 +01:00
Maciej Plewka 7728123907 fix: Do not use 2mb alignment for host ptr allocs
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>

Related-To: NEO-9945
2024-01-29 11:01:00 +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
Katarzyna Cencelewska 7bbe57c671 feature: add debug info for logging pat indexes
Related-To: HSD-18031172224
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2024-01-23 13:34:35 +01:00
Jitendra Sharma aa191b6f88 feature: Set runalone mode for contexts with online debugging
Related-To: NEO-9139

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2024-01-17 09:01:30 +01:00
Mateusz Jablonski 7b40b01f54 feature: add debug key for toggling bit in 57bit GPU VA for specific allocations
Related-To: NEO-9419
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-01-15 19:37:00 +01:00
Brandon Yates d3baab00db feature: Register resources for Xe at vm creation (1/x)
Add interfaces to IoctlHelperXe for registering resources.
Introduce new debug key EnableXeResourceRegistration to attach
resources to vm_create ioctl.

Related-to: NEO-9161
Signed-off-by: Brandon Yatse <brandon.yates@intel.com>
2024-01-11 08:15:50 +01:00
Compute-Runtime-Validation 46d860b2bf Revert "feature: Register resources for Xe at vm creation (1/x)"
This reverts commit e1fefd1974.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2024-01-09 11:36:00 +01:00
Brandon Yates e1fefd1974 feature: Register resources for Xe at vm creation (1/x)
Add interfaces to IoctlHelperXe for registering resources.
Introduce new debug key EnableXeResourceRegistration to attach
resources to vm_create ioctl.

Related-to: NEO-9161

Signed-off-by: Brandon Yates <brandon.yates@intel.com>
2024-01-08 13:36:24 +01:00
Mateusz Jablonski a4888b39c6 build: add clang-tidy restriction for Enum case
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-21 08:58:51 +01:00
Mateusz Jablonski 2eba5b35e4 refactor: correct naming of DrmParam enum values
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-13 15:43:46 +01:00
Mateusz Jablonski 739d181026 refactor: correct naming of enum class constants 6/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-13 14:48:52 +01:00
Mateusz Jablonski b182917d9d refactor: correct naming of allocation types
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-11 16:23:37 +01:00
Mateusz Jablonski da957d1a37 refactor: correct naming of enum class constants 1/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-05 14:26:42 +01:00
Mateusz Jablonski 6849d33326 refactor: remove redundant definitions KB/MB/GB
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2023-12-05 08:55:18 +01: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