Commit Graph

55 Commits

Author SHA1 Message Date
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
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
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
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
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 e368e6c20b Move free function to DrmMemoryManager
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-11-30 14:55:18 +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
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
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
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
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
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
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
Kamil Diedrich d5fdb949eb Extended import device memory
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-07-07 16:12:36 +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
Jaime Arteaga ddf75b8d23 Add IPC events support (2/N)
Fix shared allocation on multi DG1 systems

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-06-09 20:55:34 +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 3b4ec5b3fa Refactor of global factories
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-05-28 19:09:24 +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
Igor Venevtsev a2a3daeb50 Introduce DrmMemoryManager::createMultiHostAllocation() method
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2021-05-14 16:01:19 +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
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
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
Slawomir Milczarek bca7b54728 Allocation shareable to use standard64KB heap
Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2021-03-10 11:39:16 +01:00
Lukasz Jobczyk 8fa97ed4a8 Fix shared buffer object size
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-03-02 14:08:47 +01:00
Slawomir Milczarek 049166688c Introduced standard heap with 2MB alignment on Linux
Related-To: NEO-5507

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2021-03-02 14:03:37 +01:00
Lukasz Jobczyk 049e77b235 Check if KMD migration is supported
Related-To: NEO-3312

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-02-04 11:49:46 +01:00
Slawomir Milczarek b4444c7660 Move close shared handle to the upper layer on Linux
Related-To: NEO-5274

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2020-11-23 11:45:05 +01:00
Lukasz Jobczyk 045632f355 Add new unified shared memory model
Related-To: NEO-3312

Change-Id: I640fb8d120729fa8bb2a23ff65c74c41ef27260d
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-11-02 19:23:40 +01:00
Bartosz Dunajski d35806fdd8 Improve returning global and max alloc memory size
Change-Id: I2f22481412184f01652b7e49bc30a57c56e6204b
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2020-10-30 15:58:42 +01:00
Lukasz Jobczyk 5205d34894 Create multi graphics allocations with bo mmap
Change-Id: I97e3e3ddc8ae0f5a8ad9246befc9b2abc9c8c0f8
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-10-21 17:30:32 +02:00
Lukasz Jobczyk d7df1ee5dd Rename createAllocWithAlignment parameter
Change-Id: If1b43f3fada0f85323d67ff6b43a6165d5b578ca
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-10-13 15:47:58 +02:00
Mateusz Hoppe 0e935b0e10 Add allowCapture flag to BufferObject
Related-To: NEO-5026

Change-Id: I69a9f270272a13fccdd1d8dd8b13ad03ef93cb79
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-10-09 17:04:43 +02:00
Lukasz Jobczyk a939c89d91 Create internal BOs with map offset
Resolves: NEO-5097

Change-Id: I842f3d482420373cc630d5bfc034e229fa2cb30c
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-10-09 16:38:03 +02:00
Bartosz Dunajski fb0651521d Linker: Fix incremental patching for local memory allocations
Change-Id: Ib85e4a2abc8a62477003853aa0c35f8107444f4e
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2020-10-09 09:13:42 +02:00
Igor Venevtsev bd9695a19a Get rid of UNRECOVERABLE_IF in MemoryManager constructor
Related-To: NEO-5053

Change-Id: Ibf955c760e61e34c4d38cbb5071ef712bae1c518
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2020-10-07 11:18:56 +02:00
Lukasz Jobczyk d1a9174204 Enable early pin on direct submission
Resolves: NEO-5112

Change-Id: I79398dda9de3584d327e9448dd57e9a3ed37b377
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-10-01 10:42:13 +02:00
Mateusz Hoppe eb287d87d7 Register Allocations
Related-To: NEO-4964

Change-Id: I792dd7f7d6d594f51701ec7a40b2c0d36531b02b
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-09-18 10:34:02 +02:00
Lukasz Jobczyk a528908cbd Unbind unused resources when running out of memory
Resolves: NEO-5052

Change-Id: I3a07221b800317c79e65396443933d13d334a274
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-09-17 12:59:45 +02:00
Jaime Arteaga 5c1e60208e Share USM host pointers among devices (2)
Dont pin and instantiate buffer objects associated with a USM
allocation for device >0 at allocation time, but instead, just
do a USERPTR ioctl, as with the allocation associated with
device 0.

Change-Id: Ib37f379df177d14e9d2781a3ed6335cd9550cc87
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-09-04 12:10:06 +02:00
Jaime Arteaga 401dcf8c2a Enable local memory bank in DG1 (2)
Add ULT

Change-Id: I58cd200fd8e35b4afde935c7bd46cf4bfcf1bf0c
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-09-02 00:40:02 -07:00
Lukasz Jobczyk 73217c6154 Add debug flag to force userptr allocations alignment
Change-Id: Iaa7769d09e297042bf298f699dc63809d60a3571
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-08-28 09:34:53 +02:00
Lukasz Jobczyk e297cdb74b Disable gem close worker and force pin in direct submission
Related-To: NEO-4338

Change-Id: I1959d69cf3aebf817493e155dad91ff8830ed5b4
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2020-07-31 13:23:48 +02:00
Mateusz Hoppe fea4472553 Allocate per-context memory with specific GPU VA
Related-To: NEO-4829

Change-Id: I821f6709bfa98df3b51a1c966b7a953752d85f74
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-07-07 09:14:10 +02:00
Bartosz Dunajski 6dd07bd3bc Use correct Heap32 index for local memory allocations
Change-Id: I068f712ab2b05ee3d5a9716b21de685a7fee3a02
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2020-07-01 17:31:43 +02:00
Slawomir Milczarek b156393615 Add mmap mock to DRM memory manager
Change-Id: I0799a909659842e6bba1f5ec5de8f6310ba1b329
Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2020-06-02 22:08:35 +02:00