Commit Graph

687 Commits

Author SHA1 Message Date
Mateusz Jablonski 19c7162cf6 Add functions to create and fill VmBindExtSetPat and VmBindExtSyncFence
Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-15 14:04:57 +01:00
Mateusz Jablonski 12e2670b9a Add ioctl helper function to check vm bind availability
Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-15 12:43:50 +01:00
Mateusz Jablonski 964596e514 Add methods to prepare VM BIND structs
create VmBindExt
setup flags for VM BIND

Related-To: NEO-6591

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-15 09:25:07 +01:00
Mateusz Jablonski cf27583264 Move createDrmContextExt to drm_neo.cpp
add ioctl helper functions to create dedicated drm contexts

createContextWithAccessCounters
createCooperativeContext

Related-To: NEO-6591

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-15 09:16:36 +01:00
Mateusz Hoppe 33f02ee2eb Print debug message when GPU hang is detected
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-02-14 20:48:14 +01:00
Mateusz Jablonski 173c86d6f1 Move ioctl strings to ioctl helper
move ioctl helper prelim tests with drm to separated file

Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-14 10:47:31 +01:00
Compute-Runtime-Validation 5ec8c004ce Revert "Set cooperative flag for debuggable contexts during creation"
This reverts commit 5e0732f57e.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-02-13 04:43:35 +01:00
Compute-Runtime-Validation 6fe91498d8 Revert "Extend DRM memory manager"
This reverts commit dec634c2cd.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2022-02-12 23:41:31 +01:00
Mateusz Jablonski 3467bc0994 Extend waitForBind function
use waitUserFence to wait for fence value
move some tests to shared
- ioctl helper tests
- drm memory info tests
- drm cache info

Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-11 18:52:59 +01:00
Bartosz Dunajski 6a111e41ff Improve submission logging
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-11 17:36:14 +01:00
Daniel Chabrowski dec634c2cd Extend DRM memory manager
Signed-off-by: Daniel Chabrowski daniel.chabrowski@intel.com
Related-To: NEO-6591
2022-02-11 17:28:32 +01:00
Mateusz Hoppe 5e0732f57e Set cooperative flag for debuggable contexts during creation
Related-To: NEO-6668

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-02-11 14:58:57 +01:00
Mateusz Jablonski 2e32bcb2e1 Extend bindDrmContext function
move implementation to drm_neo.cpp
respect multiple CCS and BCS engines

Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-11 14:50:48 +01:00
Daniel Chabrowski 23999110ed Add prelim DRM page fault allocation check support
Signed-off-by: Daniel Chabrowski daniel.chabrowski@intel.com
Related-To: NEO-6591
2022-02-10 18:57:52 +01:00
Krzysztof Gibala ff7882bcbe Add PC before NP state commands
Add pipe control before state base address, state compute
mode and state sip commands on DG2 and PVC when CCS flow is used.

Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-02-10 12:06:41 +01:00
Bartosz Dunajski 71f48c89c8 CacheSettingsHelper - timestamp allocations
Related-To: NEO-6664

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-09 19:32:39 +01:00
Patryk Wrobel 18cafd3a52 Implement GPU hang detection on Windows
This change uses value of cpuAddress from monitored fence
to detect GPU hang.

Related-To: NEO-5313
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-02-09 17:22:52 +01:00
Daniel Chabrowski 85eb6d7403 [CP-1] Extend CLOS cache mechanism for DRM allocation
Signed-off-by: Daniel Chabrowski daniel.chabrowski@intel.com
Related-To: NEO-6591
2022-02-09 16:51:48 +01:00
Lukasz Jobczyk 538e0aea87 Add debug flag to bind at creation time
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-02-09 09:26:02 +01:00
Bartosz Dunajski a95198521e Initial implementation of CacheSettingsHelper
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-08 16:18:06 +01:00
Bartosz Dunajski c88fce0def Gmm construction cleanup
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-08 10:20:24 +01:00
Milczarek, Slawomir f02b6cd521 Dont print errno for BO binding result after success
Fixes incorrect errors reported for bind and unbind operations
in printfs activated with the debug key PrintBOBindingResult.

Related-To: NEO-5869

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-02-07 11:33:36 +01:00
Mateusz Jablonski 10e4e62600 Don't use DEFAULT_PLATFORM in unit tests
testing for default supported platform may be disabled

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-04 17:57:39 +01:00
Bartosz Dunajski 4b0d986876 Move AllocationType enum out of GraphicsAllocation class
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-04 17:49:09 +01:00
Daniel Chabrowski f2c4231a27 Extend DRM mock and queryTopology tests - part 1
Signed-off-by: Daniel Chabrowski daniel.chabrowski@intel.com
Related-To: NEO-6591
2022-02-04 12:02:49 +01:00
Kamil Diedrich 452de80d70 Add 2MB alignment for reserving address space for WSL
Fixes sporadic issues in configure address space for
some devices running in WSL mode

Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-02-04 11:18:58 +01:00
Mateusz Jablonski 1671e0a1a7 Add new debug flags for filtering devices to open
FilterBdfPath is used only on Linux as a filter for BDF
when opening from /dev/dri/by-path

FilterDeviceId is used on both OSes as a filter for device id

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-03 14:34:01 +01:00
Szymon Morek cfc9f385bc Add missing include
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-02-01 16:52:11 +01:00
Mateusz Hoppe 4d8d2412f9 Add subslice ID remapping for single slice configs
Related-To: NEO-6565

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-02-01 16:38:57 +01:00
Bartosz Dunajski db94f4b8e1 Clear Drm profiling variables and macros
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-01 15:51:47 +01: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
Michal Mrozek b2079c4565 Add missing include.
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2022-02-01 11:42:19 +01:00
Szymon Morek d9886f67ee Make IoctlHelper member of Drm
Related-To: NEO-6575

This is needed to fix accessing IoctlHelper
after driver detach.
This way we are also reducing accessing
sysfs file in Drm::getPrelimVersion

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-02-01 08:26:59 +01:00
Mateusz Jablonski f45fadf89b Add cmake flag to disable i915 prelim headers detection
Related-To: NEO-6625
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-01-31 16:48:30 +01:00
Patryk Wrobel 498cf5e871 Implement GPU hang detection
This change uses DRM_IOCTL_I915_GET_RESET_STATS to detect
GPU hangs. When such situation is encountered, then
zeCommandQueueSynchronize returns ZE_RESULT_ERROR_DEVICE_LOST.

Related-To: NEO-5313
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-01-31 13:48:17 +01:00
Bartosz Dunajski fef36e058d Remove VEBOX related ftr flags
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-01-28 15:50:59 +01:00
Spruit, Neil R ae77bd1bd2 Enable Device Memory to be shared in WSL-2 with L0
- Add getMemoryManagerType to check which memory manager has been init
to determine if Linux + WDDM memory manager is in use.
- Add isNTHandle to test and verify if a handle is an NT handle during
L0 Open IPC Handle.

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2022-01-27 23:14:29 +01:00
Bartosz Dunajski 90d85bee55 Remove ftrGT flags support
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-01-27 17:39:48 +01:00
Kamil Diedrich d2fbcc1960 Updating wsl compute helper tokens and enbaling local memory
Adding tokens needed for DG2 local mem enabling in WSL
Enabling local memory for DG2 for WSL

Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-01-27 14:26:24 +01:00
Bartosz Dunajski 72edadb265 Remove not used GT type info
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-01-26 18:06:38 +01:00
Michal Mrozek 592eb4607e [4/n] Improve indirect allocations handling.
Add memory manager interfaces to obtain the status.
Only support when VmBind is supported.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2022-01-26 15:24:32 +01:00
Lukasz Jobczyk 44596f6e4d Revert "Improve mmap logic in createAllocWithAlignment"
This reverts commit adb5c58292165f1d5a144548c5d5148021d2152e.

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-01-26 08:52:12 +01:00
Michal Mrozek 6df17f5a30 [3/n] Optimize indirect allocations handling.
Add new debug variable to trigger new mode.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2022-01-25 16:40:56 +01:00
Filip Hazubski 0424f30782 Improve mmap logic in createAllocWithAlignment
Group small allocations and reuse mapped memory in order to keep map
count small.

Related-To: NEO-6417

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-01-25 15:30:29 +01:00
Lukasz Jobczyk 9330f737d4 Revert "Check if direct submission available once"
This reverts commit 7ab6d2801a.

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2022-01-25 10:01:15 +01:00
Filip Hazubski 2dc54f6fd9 Update isLinuxCompletionFenceSupported value for XE HPG CORE
Related-To: NEO-6575

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-01-24 14:58:17 +01:00
Filip Hazubski 170fd00d24 Improve mmap logic in createAllocWithAlignment
Unmap trailing extra memory right away.

Related-To: NEO-6417

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-01-21 14:16:27 +01:00
Zbigniew Zdanowicz a7455b5767 Add tweaks and control flags to linux completion fence
Related-To: NEO-6575

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-01-21 13:41:23 +01:00
Ayush Pandey 715b9d31d2 Find sscanf alternative.
Used strtol() to write sscanfUtil to extraxt info of BDF pcipath.

Related-To: LOCI-1002

Signed-off-by: Ayush Pandey <ayush.pandey@intel.com>
2022-01-21 09:02:48 +01:00
Aravind Gopalakrishnan e29a85ebb3 Use ImmediateDispatch mode for L0 command queues
Related-To: LOCI-1988

Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
2022-01-21 00:23:04 +01:00