Commit Graph

35 Commits

Author SHA1 Message Date
Piotr Fusik ca26cb7044 Refactor duplicate Linux code.
Related-To: NEO-3008

Change-Id: Ia920fc9e4b948fb73fe6c6abc7d2c35f1814dc85
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-07-17 15:38:14 +02:00
Venevtsev, Igor 4403796f58 Use GfxPartition for GPU address range allocations
[4/n] - Remove allocator32Bit

Related-To: NEO-2877

Change-Id: I0772a7fe1fda19daa12699c546587bd3cdd84f2c
Signed-off-by: Venevtsev, Igor <igor.venevtsev@intel.com>
2019-07-08 12:09:07 +02:00
Igor Venevtsev 10799ea0ed Use GfxPartition for GPU address range allocations
[3/n] - DrmMemoryManager

Related-To: NEO-2877

Change-Id: If7aa5f7e0d774f0c8b1c01cf6b14ee22374987d3
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2019-07-04 12:14:00 +02:00
Mrozek, Michal 840d81c9fc Do not initiate limited range allocator if range above max64 bit address.
Change-Id: If7b0a83c5e5326f2b16d32533d8631ff6ff877cc
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
2019-06-26 11:43:24 +02:00
Jobczyk, Lukasz 007982b51f Add the supportsMultiStorageResources flag
Related-To: NEO-3182

Change-Id: I618b734b37c5fb983be55b50d89a965eaedc78fe
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-06-10 17:57:49 +02:00
Pawel Wilma b64210d3db Add local memory usage selector in memory manager
Related-To: NEO-2906

Change-Id: I3172e9551b8d06437c273b122dc6e9d529155b5c
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
2019-05-23 11:05:36 +02:00
Mateusz Jablonski cadc461712 Create storage info while getting allocation data
Related-To: NEO-3127

Change-Id: I716a1d5624cf34d74bafd8c9ab3f5cc5ded43275
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-05-07 14:17:34 +02:00
Venevtsev, Igor 188c0797b6 Revert "[2/n] Use GfxPartition for 32-bit allocations - DrmMemoryManager"
This reverts commit 1ce2f9564a.

Related-To: NEO-2877

Change-Id: Id17e0bce560ed1d934412067f9e41d39c529018f
Signed-off-by: Venevtsev, Igor <igor.venevtsev@intel.com>
2019-04-25 10:34:32 +02:00
Venevtsev, Igor 1ce2f9564a [2/n] Use GfxPartition for 32-bit allocations - DrmMemoryManager
Related-To: NEO-2877

Change-Id: Ic57d1e2cfb2629f50c6fd16e71861e8ee47f2b10
Signed-off-by: Venevtsev, Igor <igor.venevtsev@intel.com>
2019-04-23 14:05:17 +02:00
Venevtsev, Igor f77cd94cd5 [1/n] Use GfxPartition for 32-bit allocations - WddmMemoryManager
Related-To: NEO-2877

Change-Id: Ie3d94f68d5c9958b0b7bade600b964b778aeb4cf
Signed-off-by: Venevtsev, Igor <igor.venevtsev@intel.com>
2019-04-18 16:41:38 +02:00
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 e42e952d21 Reverse logic of creating Memory Manager - part 5
-Remove a Drm* parameter from the DrmMemoryManager constructor

Change-Id: Idb6faccdbb512691a8b14f86cdd935d1a8374a23
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-03-26 10:47:03 +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
Mateusz Hoppe 16e1a05375 Test for DrmMemoryManager allocateGraphicsMemoryInDevicePool
Change-Id: If04321fc1045d01c0001e27eed8b2a128b830f25
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2019-03-14 19:25:15 +01:00
Mateusz Hoppe 573d2e0eec Add enableLocalMemory param to DrmMemoryManager ctor
- add linux dll tests for createMemoryManager()

Change-Id: I6e111e7a480d895a8520507af6b6a699f9dca160
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2019-03-12 22:22:37 +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
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
Mateusz Hoppe d5d177dd58 Override AllocateGraphicsMemoryInDevicePool in DrmMemoryManager
Change-Id: I54da682ecb055e71af0968872ddb0ec7726c3adc
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2019-02-27 10:05:46 +01:00
Piotr Fusik 378bd28bab Change the signature of MemoryManager::createGraphicsAllocation.
Change-Id: Ia82235ff2831fd5b3436d488a5946bb49d63ce91
2019-02-25 16:08:35 +01:00
dongwonk 56972935ad graphic memory allocation with alignment in limited Range heap
Change-Id: Iccfb0fdc2f161e30bfdd26154110185277f176f5
Signed-off-by: dongwonk <dongwon.kim@intel.com>
2019-02-21 10:10:47 -08:00
Piotr Fusik 4ec5be0c99 Simplify code by removing AllocationOrigin.
Change-Id: Ie73cefc1ae1ee846fb9a5ef1054af01cd1867a4d
2019-02-21 16:29:05 +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
dongwonk fb993d6107 limited range and internal 32bit allocators with correct base and size
correct add 1 to the current size, gpuRange as gpuRange
only specifies the end address of the pool, not the actual
size, which causes alignment issue of all the offsets of
allocated objects. Also, a page was added in the beginning
of the limited range memory pool to avoid the base address
of it to be 0x0 that is interpreted as invalid address by
heap allocator (This makes the size reduced by pageSize)

Internal 32bit allocator is also initialized in proper way
with corrected base address.

v2: added 'givenMemoryManagerLimimedRangeAllocator' unit
    test
v3: adjust size to be freed when DrmMemoryManager instance
    is destroyed to 4GB
v4: - defined external 32bit allocator for limited Range
    allocation case.
    - softpinning object on the correct GPU address

Change-Id: Idaa0206d4133a1476cceb5a48ff8c8528742c76a
Signed-off-by: dongwonk <dongwon.kim@intel.com>
2019-02-17 19:19:52 +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
Hoppe, Mateusz d7ce6ef8d1 Allocate images through preferred pool call
Change-Id: I79c9c1a0a95a8a3e26ed690530b71ef504cc7ff8
2019-01-25 09:05:25 +01:00
Dunajski, Bartosz 8029639898 Pin allocation with specific DrmContextId at creation time
Change-Id: Ic132fb70b1da2cf3b7c70ab899822705adb83edc
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-12-27 09:35:58 +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
Mateusz Jablonski c8748b77a0 Simplify memory manager API [1/n]
pass struct with properties to allocate graphics memory methods:
for protected methods use AllocationData
for public methods use AllocationProperties

Change-Id: Ie1c3cb6b5e330bc4adac2ca8b0bf02d30ec76065
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-06 15:09:25 +01:00
Kai Chen 85b60dff0f Linux GPU address allocator for devices with reduced address space
Code implementation of GPU address allocator for devices with reduced
address space.

Change-Id: Ieb0412c5930fdd71f90741055cf89c0338b01133
Signed-off-by: Kai Chen <kai.chen@intel.com>
2018-11-19 10:20:25 +01:00
Katarzyna Cencelewska 76b97b4955 Change type to atomic for variables in mock_drm_memory_manager.h
fix for sporadic failure in utl

Change-Id: Icdcdd600e8114f0b73ade4bc5e714b98495645e7
2018-11-15 18:30:25 +01:00
Mateusz Jablonski 129380c1a6 Cleanup host ptr manager
Change-Id: I0fc9df41a08255eef8072666c1c5c16806e0f7cf
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-26 08:26:38 +02:00
Mateusz Jablonski b602cd2bb8 Pass execution environment to memory manager
Change-Id: If43cf9d1353b4cbc02ea269fb9105c01cc4e0876
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-03 22:12:26 +02:00
Artur Harasimiuk 40146291ad Update copyright headers
Updating files modified in 2018 only. Older files remain with old style
copyright header

Change-Id: Ic99f2e190ad74b4b7f2bd79dd7b9fa5fbe36ec92
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-09-20 18:02:35 +02:00
Hoppe, Mateusz e1eaf3ded0 Fix bug in VA sharing multithreaded scenario
- createGraphicsAllocationFromSharedHandle was not threadsafe,
instead of reusing BufferObject for a single handle when
multiple threads were creating memory objects from a single VASurface,
new BO could be created and placed in container with BOs for reuse.
This was leading to errors in ioctl calls.

- add lock for following set of operations:
 1. find BufferObject with a given handle in container
 2. create shared BO when not found
 3. add shared BO to container
 prevents creating multiple BOs for a single handle

- replace recursive mutex with regular mutex as mutex shouldn't
be locked recursively

Change-Id: I0937e2abf3bf1c672c6d77422d46e441f7216a68
2018-08-02 12:55:05 +02:00