Commit Graph

142 Commits

Author SHA1 Message Date
Maciej Plewka 9e52684f5b Change namespace from OCLRT to NEO
Change-Id: If965c79d70392db26597aea4c2f3b7ae2820fe96
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2019-03-26 15:48:19 +01:00
Jobczyk, Lukasz ee1854bfe8 Reverse logic of creating Memory Manager - part 4
-Remove a redundant parameter from WddmMemoryManager constructor

Change-Id: Ied9118d136e7d1f3e93b1bb6ce0e29d748bdbe01
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-03-25 16:14:51 +01:00
Jobczyk, Lukasz 9ecb3193af Reverse logic of creating Memory Manager - part 3
-Move a Device::getEnabled64kbPages method's logic
 to the Memory Manager constructor

Change-Id: Ide88898000e5817a79f9a6ad5dfc9d680bec0533
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-03-25 14:42:16 +01:00
Dunajski, Bartosz cbe4e06165 Improve waiting for MemObj completion
Change-Id: I62078224daa21ee1d6f58f1e6dc59e306ae420b6
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-03-25 10:51:32 +01:00
Mateusz Jablonski ee9eb8df83 Release all Gmms
Change-Id: I2227b6a1014fea59053893c9d6330f1c386bbcd2
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-22 12:19:44 +01:00
Mateusz Jablonski 6abc3f7d9b Add logic to create wddm allocation with many handles
Change-Id: I1eeffddf7108183ad867d2b05d313f0cf6941c01
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-21 11:28:55 +01:00
Mateusz Jablonski 5367440fab Refactor Wddm map gpu address method
Change-Id: I9d3d8675bf80af4079e25b84ba6e09b7883c9e28
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-20 08:40:47 +01:00
Mateusz Jablonski e5a40502aa Release memory when allocation created from shared handle fails on map call
Change-Id: Ic2745c32f54ea9a0418ebb4d29cc41f84deb247d
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-19 15:42:20 +01:00
Mateusz Jablonski 13f9f3a929 Prepare for refactor map methods of wddm
Change-Id: I33249d9a097d717ab2eb5801eaa17154f68ffdce
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-18 13:26:28 +01:00
Zbigniew Zdanowicz 8e743cc1bd Refactor Wddm interface of mapping GPU VA
Change-Id: Ic807dfb17fd0ab664af281db757e48b0cc424fcb
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2019-03-15 07:50:53 +01:00
Zbigniew Zdanowicz cdb52400c4 Add new functions reserving address range to Memory Manager
Change-Id: I947203c24495c9e5a206b95bb0c69440824586b6
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2019-03-14 15:06:11 +01:00
Mateusz Jablonski 395e79fee8 Add support for many GMMs in Graphics Allocation
Change-Id: I955b8dd50b502f91700c5529d0a0a291632aa157
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-13 15:44:45 +01:00
Piotr Fusik ec72787b98 Remove MemoryManager::allocateGraphicsMemoryForHostPtr.
Change-Id: I629f2299a183fc135135dbaff89216b966554a95
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-03-12 15:51:32 +01:00
Venevtsev, Igor 74f1896c03 Expose GfxPartition to shared MemoryManager
Change-Id: I039e463f90e88c0ed8e9505cc770c373420ff567
Signed-off-by: Venevtsev, Igor <igor.venevtsev@intel.com>
2019-03-12 09:25:50 +01:00
Maciej Dziuban 79d0878e64 Wait for resource not being used in freeGraphicsMemory
Change-Id: I201d914569fc0cf6f9eb616d456a670b0b8741ab
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2019-03-11 12:18:38 +01:00
Mateusz Jablonski 3f690e1758 Dont unlock/evict wddm allocations during releasing memory
Change-Id: Ib934867886a883a22fde2f0c03e16338dc215e65
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-11 10:20:09 +01:00
Mateusz Jablonski 5b22a50b28 Allow to create WddmAllocation with multiple handles
Change-Id: Iac9df91b08a6ce610b985586dfb6b5f63dc668cb
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-07 13:29:00 +01:00
Piotr Fusik a2c05a241d Set allocationType in constructors.
Change-Id: I66738be1239acdaf282f813aed46066bc5023112
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-03-06 16:07:28 +01:00
Mateusz Jablonski e721f7c08c Cleanup Wddm interface 3/3
don't pass the entire WddmAllocation when only handle is needed

Change-Id: I208a64c81767589a2ac8aba0e717d54426209ecd
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-06 10:03:38 +01:00
Mateusz Jablonski 4605a48170 Cleanup Wddm interface 2/n
don't pass the entire WddmAllocation to createAllocation methods

Change-Id: Ibd4c684a362edbe3b2c520b73b71246fed5a9399
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-06 09:30:14 +01:00
Mateusz Jablonski 03527f496d Cleanup Wddm interface 1/n
pass const D3DKMT_HANDLE * to makeResident/evict/destroyAllocation calls
remove gpuPtr from WddmAllocation

Change-Id: Ia5ca162946a2d893d4f56c37f8027eab02af90b0
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-05 17:28:29 +01:00
Dunajski, Bartosz 86dabbf6d5 Improve OsContext construction
Change-Id: Ibf9293344cc5c0ae1b2cc011e87d9e3626f3a066
2019-03-01 08:35:38 +01:00
Piotr Fusik 426a7b6efe Pass by const reference.
Change-Id: I68dc9d2a77da8cc7f81759c4e72d32e2e7f71a1d
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-02-28 14:12:13 +01:00
Mateusz Jablonski 6fb28dd828 Refactor GraphicsAllocation class
move most of members to protected section
merge related members into structs

Change-Id: Ief2e092aa5e61ca6f13308f9d9b1937ea6c913b4
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-02-28 14:09:11 +01:00
Piotr Fusik e11b7675d5 WddmAllocation constructor accepts allocationType.
Change-Id: I1e561b11e78dd942e04f3b029739921d0929ceed
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-02-28 11:59:16 +01:00
Filip Hazubski 8b57d28116 clang-format: enable sorting includes
Include files are now grouped and sorted in following order:
1. Header file of the class the current file implements
2. Project files
3. Third party files
4. Standard library

Change-Id: If31af05652184169f7fee1d7ad08f1b2ed602cf0
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2019-02-27 11:50:07 +01:00
Piotr Fusik 378bd28bab Change the signature of MemoryManager::createGraphicsAllocation.
Change-Id: Ia82235ff2831fd5b3436d488a5946bb49d63ce91
2019-02-25 16:08:35 +01:00
Piotr Fusik 4ec5be0c99 Simplify code by removing AllocationOrigin.
Change-Id: Ie73cefc1ae1ee846fb9a5ef1054af01cd1867a4d
2019-02-21 16:29:05 +01:00
Piotr Fusik 75edea81bb Virtual address space partitioning on Linux [2/n]
Move selectHeap from Wddm to MemoryManager.
Set DrmAllocation::origin.

Change-Id: I5d412e35d524d1f31174893b9ce1d3b1e98eee96
2019-02-20 14:43:08 +01:00
Dunajski, Bartosz 64fbfb21bf Improve iterating over existing CommandStreamReceivers
Change-Id: I12a10852d43c625ec5521ae91918fcb12e1a6aec
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-02-19 11:48:56 +01:00
Jablonski, Mateusz 05d02a6fe7 Change DevicesBitfield type to struct
Change-Id: I7a005b07737cdd21efc174a2ee2be0f6b7f9068d
Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
2019-02-18 13:57:50 +01:00
Jablonski, Mateusz e74b31691c Remove redundant parameter of createWddmAllocation method
Change-Id: I1c1014eacbdee4ab6b83ea7d7b5257f25f2b46dd
Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
2019-02-14 07:33:45 +01:00
Dunajski, Bartosz 12da1b0616 Remove osContextCount parameter from GraphicsAllocation
Change-Id: I23b650e97f107008b1122a1ecea48722fe129863
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-02-11 15:44:37 +01:00
Jablonski, Mateusz e095ac834d Windows: use HEAP_INTERNAL in 32bit scenarios
Change-Id: I652727303eec45cd3547bd98bec42f276000d9b4
Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
2019-02-05 19:04:06 +01:00
Mateusz Jablonski fff8be32f4 Dont force system memory for internal allocations
use HEAP_INTERNAL_DEVICE_MEMORY for internal allocations

Change-Id: Id70caa30cd1e9c79df60773227d72b09541e4b77
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-02-01 16:31:34 +01:00
Mateusz Jablonski c04ba163a0 Simplify selecting heap in Wddm::mapGpuVirtualAddressImpl method
Change-Id: Id6eb5b0df1c705b5fadde62d20513fe15edf1e27
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-30 16:38:46 +01:00
Mateusz Jablonski f157943610 Allocate internal allocations through preferred pool
Change-Id: Ib17431ceefc1eb72f86625e0998f679baaa7cb0d
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-30 11:18:15 +01:00
Pawel Wilma d56daf1726 Pass devicesBitField to gmm
Change-Id: Icad8a95d37d487fb7d01410c606baad67f681651
2019-01-28 14:51:09 +01:00
Mateusz Jablonski 128bf4552f Remove debug flag ForceResourceLockOnTransferCalls
Unlock locked resoures in freeGraphicsMemory method

Change-Id: I2baae7b7f9d8260f19a4b083849c5bf0d1a764f3
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-25 14:03:29 +01:00
Hoppe, Mateusz d7ce6ef8d1 Allocate images through preferred pool call
Change-Id: I79c9c1a0a95a8a3e26ed690530b71ef504cc7ff8
2019-01-25 09:05:25 +01:00
Mateusz Jablonski f332bf369e Set allocation's lock state only in lockResource and unlockResource methods
Change-Id: I60f35801287166f5bdb0dfcd31ff0118c56ec22a
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-24 15:15:27 +01:00
Mateusz Jablonski ad3bfd84cb Add functionality to make resident before locking resource
Change-Id: I0963c1edcb43f409e9dd62cb46a0da1f2b05667b
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-22 08:28:12 +01:00
Zdunowski, Piotr 75a635fdc5 [1/n] Log allocation placement.
Change-Id: I9ab61e10dcb0fcbbaf859c077a64ce7a4f2c213c
2019-01-16 16:46:50 +01:00
Piotr Fusik 30dd15144c Add debug variable to disable host ptr tracking.
Change-Id: Ifc866e06a4519e7590d40d8ad136147ecc80225d
2019-01-11 12:06:52 +01:00
Mateusz Jablonski aee69779fa Minor renaming in a scope of multi os context allocations:
shareable -> multiOsContextCapable
resetTaskCount -> releaseUsageInOsContext
resetResidencyTaskCount -> releaseResidencyInOsContext
isUsedByContext -> isUsedByOsContext

Change-Id: If824246a0e393b962bd12f8c63d429a0fcfcda25
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-07 11:42:43 +01:00
Mateusz Jablonski 1e011f9a08 Allow to allocate shareable graphics allocation
Change-Id: I284b03b001e5b67c344d46f34048803ef9a57314
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-20 20:14:57 +01:00
Mateusz Jablonski c9e667d601 Simplify Memory Manager API [4/4]
- fill AllocationData in one place
- remove allocateGraphicsMemoryForSVM function
- refactor SVM manager tests

Change-Id: I6f4ecd70503da8031cced50ea98a54162fd8e5d3
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-20 09:01:33 +01:00
Hoppe, Mateusz f6790c42cf Refactor Graphics Allocation paths for Images
Change-Id: Ifa3084b18cac95289bbceeaf3669dd31567fbd3e
2018-12-19 13:49:53 +01:00
Mateusz Jablonski 8ec072d39c Simplify Memory Manager API [3/4]
- remove method allocateGraphicsMemory(size_t size)
- pass allocation type in allocation properties
- set allocation type in allocateGraphicsMemoryInPreferredPool

Change-Id: Ia9296d0ab2f711b7d78aff615cb56b3a246b60ec
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-17 10:42:16 +01:00
Mateusz Jablonski a6be6533ea Simplify Memory Manager API [2/n]
- make AllocationData a protected structure
- use AllocationProperties instead of AllocationFlags
- refactor methods: allocateGraphicsMemory64kb, allocateGraphicsMemoryForSVM
- call AllocateGraphicsMemoryInPreferredPool in AllocateGraphicsMemory
  where there is no host ptr

Change-Id: Ie9ca47b1bccacd00f8486e7d1bf6fb3985e5cb12
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-11 13:12:00 +01:00