Commit Graph

290 Commits

Author SHA1 Message Date
Bartosz Dunajski c4fcd7ed9b Capability to set low scheduling priority for Wddm context
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-05-10 16:44:25 +02:00
Mateusz Jablonski 943ad0e1eb style: skip redundant unique_ptr::get function
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-05-10 13:22:40 +02:00
Krzysztof Gibala 4f1e01d279 Create getGmmHelper function in MemoryManager
Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-05-09 16:51:23 +02:00
Krzysztof Gibala 1c366d1ec0 Refactor: Change canonize method accessing point
Accessing canonize method as a member of GmmHelper class object

Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-05-09 14:16:31 +02:00
Jaime Arteaga 3f26f45c10 Add support for IPC handles with implicit scaling
When using implicit scaling, device allocations may have
more than one internal allocation created internally. In that case,
a separate dma-buf handle per internal allocation needs to be
exported.

So introduced two driver experimental extensions to export and
import more than one IPC handle:

- zexMemGetIpcHandles
- zexMemOpenIpcHandles

Related-To: LOCI-2919

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-05-09 00:38:17 +02:00
Mateusz Jablonski ac01f74924 style: fix gcc12 compilation errors
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-04-28 18:07:15 +02:00
Krzysztof Gibala 9b778863b4 Store GmmHelper in Gmm class
Store GmmHelper in Gmm class instead of GmmClientContext

Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-04-27 15:45:49 +02:00
Filip Hazubski 88193cc242 Minor fixes
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-03-31 20:02:11 +02:00
Joshua Santosh Ranjan 05a150f49f L0 Core Add Support For pci_speed_ext
This patch adds support for reading PCI bandwidth, generation
and linkwidth information from sysfs nodes for the linux
platform.

Related-To: LOCI-2969

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
2022-03-16 22:47:59 +01:00
Jaime Arteaga a010fb3634 Dont close shared handle on imported allocations
Related-To: LOCI-2272

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-03-06 04:35:47 +01:00
Baj, Tomasz 0d68c55198 Remove all TODOs
Related-To: NEO-6674

Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
2022-02-17 14:10:47 +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
Bartosz Dunajski 6a111e41ff Improve submission logging
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-11 17:36:14 +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
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
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
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
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
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
Kamil Diedrich 1b7949432f Add shareable allocation on windows dGPUs
Add default initialization for object members

Related-To: LOCI-2665

Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-01-19 19:03:18 +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
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
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
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
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 dfdd3c597a Remove redundant BUFFER_COMPRESSED allocation type
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-07 13:35:49 +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
Bartosz Dunajski 55959d4d1d Helper method to check if allocation is compressed
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-02 16:13:53 +01:00
Bartosz Dunajski 7b55d38e34 Refactor [1/n]: Make compression preference allocation property
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-02 15:24:35 +01:00
Kamil Diedrich 5bc98718b9 Add support for device allocation on Windows
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-12-02 12:26:47 +01:00
Kamil Diedrich 3218b784e8 Add override for gfxPartitionLayout in WSL DG1 path
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-12-01 10:29:27 +01:00
Bartosz Dunajski 995cb88bfa Improve ftr/wa flags packing
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-11-25 16:05:57 +01:00
Grzegorz Choinski 2e68f0abbd lint revision update
Related-To: NEO-6441
Signed-off-by: Grzegorz Choinski <grzegorz.choinski@intel.com>
2021-11-23 12:50:25 +01:00
Jaroslaw Chodor c4e802f01b WSL - fixing resource cleanup on process shutdown
Resolves issues with coexistance of NEO L0 and NEO OCL libraries
within a single process running in WSL and using WDDM GPU PV

Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-11-20 21:51:51 +01:00
Mateusz Jablonski 95610188af Fallback to cpu copy when filling work partition allocation
move some command stream receiver tests to shared

Related-To: NEO-6325
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-11-03 12:17:02 +01:00
Compute-Runtime-Validation 782a287b27 Revert "Fallback to cpu copy when filling work partition allocation"
This reverts commit 93e3d948f5.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-10-29 04:39:22 +02:00
Mateusz Jablonski 93e3d948f5 Fallback to cpu copy when filling work partition allocation
move some command stream receiver tests to shared

Related-To: NEO-6325
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-28 14:30:00 +02:00
Jaroslaw Chodor 4b7811d061 WSL - fixing alignment for 32bit path
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-10-26 21:04:55 +02:00
Filip Hazubski 28b37aea72 Correct handling unique_ptr in functions
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2021-10-21 18:17:14 +02:00
Kamil Diedrich 465bec3d76 Add NTHandle sharing
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-10-19 14:17:25 +02:00
Jitendra Sharma f8c89fe984 Refactor memory manager so as to support device reset
Move out neoDevice dependent pieces of memory manager code into
separate methods. Those methods could be used for recreating a neoDevice
after a device reset is performed.

Related-To: LOCI-2615

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-10-19 07:16:29 +02:00
Michal Mrozek c8e79b7447 Change shared allocations required alignment to 64KB.
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2021-10-08 13:08:11 +02:00
Jaroslaw Chodor 45de13233a WSL validate reserve_gpu_va args in ULTs
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-10-07 22:05:21 +02:00
Mateusz Jablonski 973317e473 Move kmd notify properties to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-07 18:12:19 +02:00
Mateusz Jablonski b14da0aeb2 Move metrics library to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-06 21:46:22 +02:00
Zbigniew Zdanowicz 279181a384 Remove not needed include header
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-10-06 21:32:40 +02:00
Kamil Kopryk cfc673b77c Add compilerHwInfoConfig
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6237
2021-10-06 21:27:34 +02:00
Bartosz Dunajski cd702af3a1 Fix windows wrappers
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-10-06 09:01:36 +02:00
Katarzyna Cencelewska 30b3f5cdb0 Move PageTableManager from rootDeviceEnvironment to CommandStreamReceiver
Also add init of pageTable registers to blitter path

Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2021-09-30 12:59:11 +02:00
Jaroslaw Chodor 996dd18b76 WSL - partition layout for 48-bit limited addressing
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-09-28 18:09:46 +02:00
Mateusz Jablonski 69390c7eca Move performance counters to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-09-24 11:59:55 +02:00
Zbigniew Zdanowicz 3b35ba504f Adapt command stream receiver to multiple active partitions
Related-To: NEO-6244

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-09-23 14:32:20 +02:00
Mateusz Jablonski 8b36473a9a Move command stream receiver files to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-09-23 12:47:21 +02:00
Rafal Maziejuk 7c473d0a11 Move setCapabilityCoherencyFlag function from HwHelper to HwInfoConfig
Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
Related-To: NEO-4541
2021-09-23 11:45:34 +02:00
Kamil Kopryk 9ccf43e441 Correct branch_dir_suffix in cmake
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-6245
2021-09-14 16:00:20 +02:00
Maciej Plewka 03ee6bc2dd Allways take cpu time from OSTime on WSL
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2021-09-10 11:56:23 +02:00
Kamil Kopryk ae88789bce Move isMidThreadPreemptionSupported helper to hwHelper
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2021-09-07 20:28:55 +02:00
Kamil Kopryk 9794bafd91 Add isMidThreadPreemptionSupported helper
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2021-09-07 10:35:27 +02:00
Kamil Kopryk a203cd2863 Add sip kernel as hexadecimal array header
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-5777
2021-09-03 17:16:58 +02:00
Mateusz Hoppe f2eb7f3aea Fix DirectSubmission residency handling
- allocations should be resident within OsContext

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-09-03 16:57:42 +02:00
Jaroslaw Chodor 37af6a64c1 WDDM Linux - allocate 32bit through KMD
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-09-01 00:06:30 +02:00
Kamil Diedrich 4390590831 Add shareable allocation for Windows
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-08-26 13:43:55 +02:00
Mateusz Hoppe ac30102309 GPU Allocation created by KMD not mapped to cpuPtr
- do not map to locked cpuPtr on limited address space
platforms

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-08-24 15:18:31 +02:00
Jaroslaw Chodor 766d56e300 WSL - fixing allocation alignment
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-08-20 08:28:27 +02:00
Dominik Dabek 65e00abea6 Enable new DriverProtection interface for MapGpuVa
Related-To: NEO-6096

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2021-08-17 18:02:26 +02:00
Bartosz Dunajski fb996a3d5b Add EngineDescriptor helper
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-08-12 15:19:46 +02:00
Dominik Dabek 2a7757651a Change percent of global memory returned
Related-To: NEO-5796

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2021-08-11 13:33:16 +02:00
Kamil Diedrich 2d5d071e66 Extended import device memory functionality
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-08-10 13:24:56 +02:00
Jaroslaw Chodor 2a4fa055b1 Fixing memleak during wddm init
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-08-05 19:35:58 +02:00
Jaroslaw Chodor cfd3945b7e WSL - fixing missing GPU VA reservation
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-08-03 20:30:49 +02:00
Kamil Diedrich 2afb785bba Add AIL functionality
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-08-02 15:31:58 +02:00
Szymon Morek 74e6c74071 Disable shareable allocs with huge size
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-07-28 15:52:27 +02:00
Bartosz Dunajski 3c88492229 Revert "Extended import device memory"
This reverts commit ea6555e788c98314160a11898212c2d664999705.

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-07-16 09:56:52 +02:00
Jaroslaw Chodor 78499ca48d Mitigation for WDDM_LINUX allocation size limits
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-07-16 03:36:19 +02:00
Jaime Arteaga 058c30c9a8 Refactor ZE_ENABLE_PCI_ID_DEVICE_ORDER
- Make it avaialble also to OpenCL
- Use it before parsing affinity mask, so devices are masked also
following PCI order.


Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-07-16 01:27:49 +02:00
Jaroslaw Chodor fad4ee7e24 Enabling WDDM_LINUX by default
Based on libdxg headers, we're able
to support WDDM_LINUX (WSL2) in our
default build configuration

Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-07-14 12:42:29 +02:00
Krzysztof Gibala 0a41c42854 Add debug key for aub file generation per process id
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2021-07-14 08:59:26 +02:00
Kamil Diedrich d5fdb949eb Extended import device memory
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-07-07 16:12:36 +02:00
Mateusz Jablonski 294045071b Improve driverstore compatibility checker
make checker case-insensitive
handle HostDriverStore scenarios

Related-To: NEO-5182, NEO-6025
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-07-02 12:52:13 +02:00
Jaroslaw Chodor 1fa74b9b3c Changing sysmem allocation logic for WSL
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-06-29 16:03:28 +02:00
Bartosz Dunajski 1a042af9c6 GmmClientContext cleanup
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-06-29 12:01:07 +02:00
Bartosz Dunajski fefd2d2429 Add CCS1-3 to EngineNodeHelper
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-06-28 11:48:21 +02:00
Mateusz Jablonski 7828a8ee6a Correct adapter detection
don't break when first adapter is incompatible

Related-To: NEO-3691
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-06-18 05:50:25 +02:00
Jaroslaw Chodor d7cea99868 Changing source group for windows_inc.cpp
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-06-15 15:12:19 +02:00
Mateusz Jablonski 67216047db Fix clang-tidy issues
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-06-11 09:33:11 +02:00
Szymon Morek 3ed0f074af Add method to set compression flag
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-06-10 12:27:24 +02:00
Kamil Kopryk fdb67afded Correct hwInfo initializations in negative case
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2021-06-09 17:03:13 +02:00
Mateusz Jablonski c2dfba5926 Add missing maybe_unused keywords
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-06-09 16:07:21 +02:00
Jaroslaw Chodor 53ce391eb8 Fixing gcc warnig in DECLARE_COMMAND_BUFFER
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-06-09 15:51:51 +02:00
Jaroslaw Chodor d1af8706c0 Changing default for WDDM_LINUX support
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-06-09 03:13:32 +02:00
Jaime Arteaga 5e29dccddc Add IPC events support
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-06-08 08:11:15 +02:00
Jaroslaw Chodor b80a51e5bf Adding wsl_compute_helper
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-06-07 14:36:21 +02:00
Zbigniew Zdanowicz 2829226937 Improve query PCI info
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-06-01 19:26:22 +02:00
Maciej Dziuban 13b2c326fe Add AlignmentSelector helper
Related-To: NEO-5750
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2021-06-01 11:44:04 +02:00