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
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
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
Zbigniew Zdanowicz
ec40b6562e
Add unit tests for completion fence
...
Related-To: NEO-6575
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-01-20 21:15:34 +01:00
Zbigniew Zdanowicz
d44f3009b8
Add interface for user fence extension
...
Related-To: NEO-6575
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-01-19 19:58:22 +01:00
Szymon Morek
4fc365acca
Create EngineInfo without MemoryInfo
...
Allow to create EngineInfo even if memoryInfo is
nullptr.
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-01-13 10:03:34 +01:00
Raiyan Latif
394c0e90e1
Return error when failing on submission
...
Signed-off-by: Raiyan Latif <raiyan.latif@intel.com>
2022-01-12 16:42:30 +01:00
Krystian Chmielewski
af7cb3ff35
Test closing GEM worker is blocking during cleanup
...
Added test checking if closing GEM worker during
DRM memory manager clean up is blocking.
Related-To: NEO-6213
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-01-12 12:48:05 +01:00
Filip Hazubski
429fa1fbdd
Delay releasing memory in createAllocWithAlignment
...
When padding memory is needed, store it and release only when
the related allocation is being released.
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-01-11 20:02:43 +01:00
Szymon Morek
26a24e8fde
Query engine info with distances
...
If prelim kernel is being used, query distances
and set correctly number of available engines
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-01-10 13:30:26 +01:00
Spruit, Neil R
02f075c541
Power Saving Hint Support for Level Zero in Windows
...
- Added Functionality to pass ze_power_saving_hint_type_t to zeContextCreate
included in the pNext extensions in ze_context_desc_t.
- Enables handling a hint value 0-100 with 0 being no power savings
and 100 being maximum power savings.
- ZE_RESULT_ERROR_INVALID_ENUMERATION is returned given an invalid hint.
Related-To: LOCI-2567
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2022-01-06 23:56:59 +01:00
Szymon Morek
ade43e29a5
Optimize vector usage
...
Don't reallocate memory.
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-01-04 15:51:32 +01:00
Szymon Morek
6258575e5e
Use queryEngineInfo with prelim ioctls
...
If prelim kernel is being used, query engines
with prelim ioctls.
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-01-04 12:15:04 +01:00
Jaime Arteaga
38ad58bce3
Dont print error on IOCTL entry after success
...
This to reduce verbosity and avoid confusions when reading logs.
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-12-31 09:49:08 +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
e07b27c0e2
Allow to query memory info with prelim ioctl
...
If prelims are supported, query memory info with
specific ioctl.
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-29 10:21:23 +01:00
Szymon Morek
3c6f5cd757
Fix createGemExt function
...
Use vector instead of array
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-28 14:48:31 +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
962d98a2d8
Enable MemoryInfo for platforms without local mem
...
Query for memory regions on all platforms.
Fix createPaddedAllocation when input allocation
was made by KMD
Resolves: NEO-6472
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-23 17:35:18 +01:00
Krystian Chmielewski
45810d9918
Make closing drm workers blocking
...
This change fixes segfault happening when driver is used in
parallel processes.
Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2021-12-22 15:42:45 +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
Jaime Arteaga
72d16c7cf2
Add rootDeviceIndex to BO
...
Related-To: LOCI-2502
This to be able to differentiate when a B0 comes from a shareable handle
and we need to know which device owns it. This is needed when inside
the same process we have more than one active P2P transaction.
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-12-20 23:33:04 +01:00
Szymon Morek
7a730200ee
Move appendDrmContextFlags to drm_neo.cpp
...
Use flag for direct submission when prelim kernel is used.
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-20 17:25:11 +01:00
Lukasz Jobczyk
bc58172075
Revert "Enable task count update from wait"
...
This reverts commit 8db36ddf28d0b85516e0adf77dbfc78000d22146.
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-12-20 16:53:16 +01:00
Zbigniew Zdanowicz
82096a5472
Add new KMD delay parameter for direct submission
...
Related-To: NEO-5845
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-12-17 21:09:37 +01:00
Lukasz Jobczyk
6e5bc0d5ee
Enable task count update from wait
...
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-12-17 15:21:51 +01:00
Mateusz Jablonski
7aebfc3293
Remove not needed arguments in init os interface functions
...
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-12-16 14:19:32 +01:00
Szymon Morek
242b08d72b
Add advise for atomic and preferred location
...
If supported, allow atomic and preferred location
advises. Hide this logic under IoctlHelper.
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-15 16:02:19 +01:00
Szymon Morek
601271c92e
Fix includes
...
Add <sys/ioctl.h> include in files with prelims
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-15 11:45:19 +01:00
Mateusz Hoppe
68dbbd7d43
Fix compilation errors
...
- add missing includes
- fix cast
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-12-14 19:38:25 +01:00
Szymon Morek
854a77d1cf
Move code from drm_query to drm_neo
...
Move methods to drm_neo.cpp and hide
kernel-specific implementations to IoctlHelper
Related-To: NEO-6510
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-14 19:28:16 +01:00
Milczarek, Slawomir
21f6e7e17c
Remove mock function to check for page fault support
...
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-12-14 12:50:12 +01:00
Filip Hazubski
64aec8dc4e
Rename functions
...
Rename getEngines to getAllEngines
Rename engines to allEngines
Rename getEngineGroups to getRegularEngineGroups
Rename engineGroups to regularEngineGroups
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2021-12-13 14:27:02 +01:00
Szymon Morek
98d7258a0b
Add prelim ioctls for clos
...
Add several prelim ioctls related to clos for IoctlHelper
Related-To: NEO-6510
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-10 16:50:29 +01:00
Szymon Morek
5a3fd1dc94
Check i915 version at runtime
...
Related-To: NEO-6510
Check which prelim version is being used.
Select proper IoctlHelper based on that version.
If no version found, switch to upstream instead.
Source of prelim headers:
https://github.com/intel-gpu/drm-uapi-helper
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-10 12:22:00 +01:00
Raiyan Latif
abb91a7dae
Return error in canAccessPeer when P2P appendMemoryCopy fails
...
Signed-off-by: Raiyan Latif <raiyan.latif@intel.com>
2021-12-10 10:19:53 +01:00
Joshua Santosh Ranjan
06be26fd1e
Add uuid support using inband information
...
Added chipset specific uuid retrieving functionality
This is used by zeDeviceGetProperties
Related-To: LOCI-2636
Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
2021-12-10 08:02:33 +01:00
Bartosz Dunajski
4dde9393ad
Extend engine checkers to support more engine types
...
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-09 13:41:25 +01:00
Bartosz Dunajski
d6b0771f6e
Add missing include
...
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-08 10:36:59 +01:00
Bartosz Dunajski
68aea5bf62
Rename compression flags and helpers
...
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-03 18:09:02 +01:00
Zbigniew Zdanowicz
3e1023fa1a
Unify memory layout for all multi tile post sync operations
...
Related-To: NEO-6262
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-12-02 18:00:40 +01:00