Commit Graph

284 Commits

Author SHA1 Message Date
Mateusz Jablonski 0d74ab8ae8 Correct allocating event pool in device memory
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-13 17:36:46 +02:00
Mateusz Jablonski b1df167632 Move enable_product.inl to shared
extract api agnostic validators to shared
remove not needed opencl includes from neo shared


Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-12 22:02:16 +02:00
Milczarek, Slawomir 5aeae0cf99 Add mem advise control flags to drm alocation
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-10-12 11:39:06 +02:00
Michal Mrozek 06561a06b6 Restore 2MB size & alignment for CPU SVM.
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2021-10-11 23:16:42 +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
Lukasz Jobczyk 7392b5fb8d Add new colouring policy
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-10-07 23:33:26 +02:00
Mateusz Jablonski 48f01f28f5 Move core part of MemoryPropertiesHelpers to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-07 23:14:38 +02:00
Milczarek, Slawomir afa45bd9e7 Add support for mem advise to set cache policy in buffer object
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-10-07 22:16:58 +02:00
Jaroslaw Chodor f1c24ddcbb WDDM - guard against duplicated host ptr allocs
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-10-06 22:33:40 +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
Artur Harasimiuk a63b9b1273 move common files to shared/
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2021-09-27 11:10:20 +02:00
Mateusz Hoppe d4a4c35759 Zero-initialize debug surface
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-09-22 14:36:36 +02:00
Rafal Maziejuk dc8b92d8a6 Move heapInLocalMem function from HwHelper to HwInfoConfig
Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
Related-To: NEO-4541
2021-09-22 11:44:44 +02:00
Kacper Nowak abbe98be07 Fix allocating graphics memory for patterns in appendMemoryFill
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2021-09-16 16:20:10 +02:00
Jaime Arteaga 522d2550ee Add allocation ID to be retrieved by L0 getMemAllocProperties
zeMemGetAllocProperties() specifies an ID for the allocation can be
retrieved by the application. This can be used by applications to
identify the allocation throughout the application lifetime.

We were currently returning as id the same allocation address. This
patch fixes it to return a true unique identifier for the allocation.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-09-15 19:22:50 +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
Rafal Maziejuk bbfbf19a02 Move allowStatelessCompression from HwHelper to HwInfoConfig
Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
Related-To: NEO-4541
2021-09-09 11:37:47 +02:00
Mateusz Hoppe 8d3438a5fb Allocate single Isa instance when debugging enabled
- Related-To: NEO-6221

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-09-08 11:49:50 +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
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
Michal Mrozek bf1180753d Improve private memory allocation.
-allocate from single bank when only one sub device passed

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2021-08-26 07:46:23 +02:00
Compute-Runtime-Validation f1264c19dc Revert "Improve private allocation storage."
This reverts commit be3ca800bb.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-08-20 02:54:09 +02:00
Michal Mrozek be3ca800bb Improve private allocation storage.
- Do not allocate on multi tile if device limits scope.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2021-08-18 15:02:14 +02:00
Jaime Arteaga 5c236a62fd Changes to SW tags
Add SW tags to synchronization points
Add ID sequence numbers
Add new allocation type

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-08-18 01:51:37 +02:00
Lukasz Jobczyk 49cf6f79f5 Validate host ptr on VM it will be used
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-08-16 08:15:53 +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
Andrzej Koska 94c97fc14c Allowing the creation of overlapping buffers
Related-To: NEO-5871

Signed-off-by: Andrzej Koska <andrzej.koska@intel.com>
2021-08-10 10:59:29 +02:00
Bartosz Dunajski ab73b61b77 Fix multitile ISA placement
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-08-02 15:16:13 +02:00
Milczarek, Slawomir eb14d8458b Add helper function to enable stateless compression
Related-To: NEO-5107

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-08-02 14:34:33 +02:00
Lukasz Jobczyk d99f20d400 Move semaphore buffer to system memory
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-08-02 14:24:12 +02:00
Jaime Arteaga b057935c7c Associate shared-allocations with device in multi-device systems
When a shared-allocation is created in a multi-device system and
no device is passed during the call, then the allocation needs to be
associated with all the devices. For now, that means we default to
creating the shared-allocation in the host, with no device-backing
memory, so all devices can access it.

However, if a device is passed, then the shared-allocation is
expected to be accessed only by that device, and there is no need
to allocate it solely in the host.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-07-29 20:28:27 +02:00
Mateusz Jablonski 575445dbb5 Minor code cleanup
prevent nullptr dereference

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-07-22 19:25:23 +02:00
Lukasz Jobczyk f22251f68a Add remaining external allocation types for local bank selector
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-07-22 16:57:37 +02:00
Lukasz Jobczyk 890eec6105 Separate local memory usage tracking for internal and external
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-07-22 07:52:43 +02:00
Mateusz Jablonski 6f3c89decb Add mechanism to migrate multi root device memory
invalidate TLB cache if kernel requires migration


Related-To: NEO-3691

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-07-19 19:49:22 +02:00
Bartosz Dunajski e939e97384 Dont replicate GPU_TIMESTAMP_DEVICE_BUFFER
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-07-16 15:23:50 +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 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
Kamil Diedrich d5fdb949eb Extended import device memory
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-07-07 16:12:36 +02:00
Bartosz Dunajski 9166f9223a Device pool allocation in OsAgnosticMemoryManager
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-07-07 13:09:12 +02:00
Lukasz Jobczyk 449c0dc856 Do not register allocation on fail
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-07-05 19:23:58 +02:00
Bartosz Dunajski c7a936d1f4 Add memory banks to Simulated CSR
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-07-05 12:19:58 +02:00
Lukasz Jobczyk 850b38781d Move RING_BUFFER to system memory
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-06-29 16:24:43 +02:00
Lukasz Jobczyk 73b0df3211 Disable gem close worker in CSR constructor
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-06-29 15:22:51 +02:00
Bartosz Dunajski 96d14967ac Partial support for XE_HP_SDV
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-06-24 18:35:54 +02:00
Zbigniew Zdanowicz ea214dd26b Select lowest subdevice when USM memory is allocated in not multicontext
Related-To: NEO-5498

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-06-21 18:45:11 +02:00
Mateusz Hoppe 48feca4f44 Check Isa placement for every root device
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-06-21 11:53:19 +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
Bartosz Dunajski 8667f3eafa Remove incorrect check for Shared USM creation
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-06-07 14:48:33 +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
Jaroslaw Chodor 9dbffa8d93 Refactoring createMemoryManager
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-05-25 16:58:21 +02:00
Mateusz Hoppe 0f32231fc8 Use correct INTERNAL heap base address for ISA in system memory
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-05-25 10:22:28 +02:00
Maciej Dziuban 33e8f73775 Enable custom allocation alignments on Linux
Related-To: NEO-5750
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2021-05-24 12:56:51 +02:00
Igor Venevtsev 21690dcea5 Fix debugSurface initialization
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2021-05-24 12:28:23 +02:00
Mateusz Jablonski ed31aaedb8 Make BUFFER allocation lockable on DG1
Related-To: NEO-5733
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-05-21 17:05:51 +02:00
Andrzej Koska c59f44ecdf Collision avoidance on 36 bit address space
Signed-off-by: Andrzej Koska <andrzej.koska@intel.com>

Related-To: NEO-5356
2021-05-21 11:20:35 +02:00
Mateusz Jablonski b50a6bec82 Correct isBlitCopyRequiredForLocalMemory
detect not lockable allocation based on gmm flag
Related-To: NEO-5733

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-05-20 13:17:49 +02:00
Jaroslaw Chodor abf0649a5b Improving cpp compliance
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-05-20 00:10:06 +02:00
Dominik Dabek a5d38170ad Move some shared tests to shared
Tests that are not specific to openCL or level zero

Related-To: NEO-5161

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2021-05-18 13:51:18 +02:00
lgotszal 3bd4bca911 Copyright header update
Dates corrected in copyright headers to reflect original publication date
(2018 for OpenCL, 2020 for Level Zero).

Signed-off-by: lgotszal <lukasz.gotszald@intel.com>
2021-05-17 20:38:19 +02:00
Mateusz Jablonski a304e609fe Respect forceSystemMemory flag at the end of getAllocationData method
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-05-14 10:58:23 +02:00
Mateusz Jablonski b7c7bc0a24 Correct createMultiGraphicsAllocationInSystemMemoryPool method
force system memory placement
skip duplicated root device indices

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-05-13 12:11:49 +02:00
Mateusz Jablonski fcbf1dcf32 Mark SVM_GPU allocation as not lockable
require blitter usage if allocation is not lockable and in local memory

Related-To: NEO-5733
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-05-12 17:47:15 +02:00
Mateusz Jablonski 296634f5b8 Fallback to CPU copy when blit copy fails
Related-To: NEO-5733
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-05-12 15:38:24 +02:00
Mateusz Jablonski a552d1fd65 Revert "Mark SVM_GPU allocation as not lockable"
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-05-12 12:24:02 +02:00
Mateusz Jablonski a79f7b678b Mark SVM_GPU allocation as not lockable
require blitter usage if allocation is not lockable and in local memory

Related-To: NEO-5733
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-05-12 09:49:35 +02:00
Bartosz Dunajski cffac84a3b Simplify creating EventPool allocation
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-05-11 18:26:54 +02:00
Zbigniew Zdanowicz 544890c066 Change default placement of preemption allocation
Related-To: NEO-5800

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-05-11 15:26:24 +02:00
Lukasz Jobczyk 8e1e213bcf Disable GEM_WAIT when new residency model available
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-05-10 14:59:21 +02:00
Konstanty Misiak c4502ccf66 Fix OCL MOCS index with UNCACHED flag
Related-To: NEO-5742

Signed-off-by: Konstanty Misiak <konstanty.misiak@intel.com>
2021-05-04 10:01:44 +02:00
Compute-Runtime-Validation c453e7fe8b Revert "Mark SVM_GPU allocation as not lockable"
This reverts commit 5341d0663c.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-04-29 18:06:38 +02:00
Mateusz Jablonski 5341d0663c Mark SVM_GPU allocation as not lockable
use blitter if available and allocation is not lockable

Related-To: NEO-5733

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-04-29 15:55:13 +02:00
Mateusz Jablonski de116aac5c Make buffer allocations not lockable
Related-To: NEO-5733
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-04-29 11:27:44 +02:00
Dominik Dabek bb9d902899 Add padding for ISA allocations
Related-To: NEO-5771
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2021-04-27 11:03:58 +02:00
Zbigniew Zdanowicz 902cce597a Add new functionality to load SIP from file
Related-To: NEO-5718

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-04-23 13:48:26 +02:00
Maciej Dziuban 495841812f Free allocations in 2MB heaps
Related-To: NEO-5750
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2021-04-23 09:07:37 +02:00
Mateusz Jablonski 9a22d06efe Store default engine index per root device
Resolves: NEO-5768
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-04-20 14:55:13 +02:00
Jaime Arteaga 128cd8a31c Add support for non-IPC P2P access to L0
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-04-20 01:05:40 +02:00
Mateusz Jablonski 2b956651a7 Mark Shared resource copy allocations as lockable
Related-To: NEO-5733
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-04-19 11:16:34 +02:00
Jaime Arteaga c540af8e5f Fix multidevice support for events
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-04-15 22:12:07 +02:00
Mateusz Jablonski 9026362b76 Add GraphicsAllocation::isLockable method
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-04-15 12:14:03 +02:00
Compute-Runtime-Validation c9b5de0f1d Revert "Add GraphicsAllocation::isLockable method"
This reverts commit 48d40ad850.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-04-15 07:58:35 +02:00
Mateusz Jablonski 48d40ad850 Add GraphicsAllocation::isLockable method
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-04-14 16:12:51 +02:00
Maciej Dziuban fd9fb3e46b Remove isInitialized() method from OsContext
We can fail early, instead of constructing an invalid object

Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2021-04-13 14:12:20 +02:00
Maciej Dziuban 5f9dbef401 Pass alignment to Gmm
Related-To: NEO-5750

Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2021-04-13 13:40:43 +02:00
Jaime Arteaga ddca333045 Improve support for L0 uncached device allocations
Make sure UNCACHED flags are translated into setting the MOCS index
for uncaching L3.

Related-To: NEO-5500

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-04-08 13:00:03 +02:00
Bartosz Dunajski f8f8b53d95 Improve OsHandle struct
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-04-02 18:42:16 +02:00
Milczarek, Slawomir cd9a35d2b4 Align gfx partition with standard heaps to max heaps granularity
Related-To: NEO-5507

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-04-02 09:20:21 +02:00
Milczarek, Slawomir 75f3b416ae Gfx partition with 64KB and 2MB heap granularities
Related-To: NEO-5507

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-04-01 14:54:55 +02:00
Krzysztof Gibala 7bfe26a08d Remove ensureMemoryOnDevice function
Remove:
- ensureMemoryOnDevice
- lastUsedRootDeviceIndex
- requiredRootDeviceIndex
- getMigrateableMultiGraphicsAllocation

Related-To: NEO-4589
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2021-03-29 11:41:07 +02:00
Krzysztof Gibala 0b7d2da162 Create image allocations in system memory pool
Create image allocations in multi device setup in system memory pool

Related-To: NEO-5508

Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2021-03-26 15:35:05 +01:00
Mateusz Hoppe 86a234ead6 Allocate debug area together with isa
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-03-26 09:31:44 +01:00
Jaime Arteaga 0dc73ad686 Isolate host allocations with respect to context
Related-To: LOCI-1996

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-03-25 06:15:59 +01:00
Mateusz Jablonski d6bbe48175 Handle SVM allocations from multi root device contexts
Related-To: NEO-5001, NEO-3691
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-03-24 11:14:39 +01:00
Krzysztof Gibala bdf8cf5e23 Add crossRootDeviceAccess flag
Add flag to AllocationProperties for setup system memory allocation path
for buffers

Related-To: NEO-5508
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2021-03-23 14:56:19 +01:00
Slawomir Milczarek 693f2ff384 Ensure shared handle be closed once on Linux
Related-To: NEO-5644

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2021-03-18 18:38:01 +01:00
Lukasz Jobczyk 129357410c Update task count while waiting
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-03-17 15:09:25 +01:00
Krzysztof Gibala 274d2ff4b4 Correct createMultiGraphicsAllocationInSystemMemoryPool logic
isUSMHostAllocation flag will be set according to limited range product setup

Related-To: NEO-5508
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2021-03-16 16:22:33 +01:00