Commit Graph

55 Commits

Author SHA1 Message Date
Jaime Arteaga e02162d301 Enable shareable buffer support (1/N)
Define method to allocate memory in SKL using
DRM_IOCTL_I915_GEM_CREATE.

Change-Id: I3106c690eaa6ce089a21100a1839c4886580f9c0
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2019-12-18 22:13:14 +01:00
Michal Mrozek e234c89ee4 Change makeResident to be non virtual function.
- remove wddm version, not a lot of value there as residency is logged
in processResidency anyway.

Change-Id: Icb2814cfce0e8f3cd75445f1fd2e2f8535d476cc
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2019-12-04 07:29:00 +01:00
Igor Venevtsev 684d58d2aa Make GraphicsAllocation constructors unambiguous
Related-To: NEO-2941

Change-Id: Iedd16d0dcb4158b5e7832043289e2e6aba1549d5
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2019-11-06 10:12:26 +01:00
Igor Venevtsev fed673861f Add multiple root devices support to memory manager
Related-To: NEO-2941

Change-Id: If4977c19dbd083f2d1559a40f9b4e911eab4859c
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2019-10-31 14:30:19 +01:00
Jobczyk, Lukasz e784ba39fb [2/N] Make the execution environment adapter agnostic
-add rootDeviceId to the command stream receiver

Related-To: NEO-3857

Change-Id: I6c7f334ebe3d19cf0c58a4db65d013b7a8b7f982
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-10-29 17:15:01 +01:00
Mateusz Jablonski c8664b50a4 MemoryManager: don't access command stream receivers from execution environment
Related-To: NEO-3691, NEO-3857

Change-Id: I8d83456f4164d2b25d78bffa368cffe988c498b0
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-10-22 17:38:24 +02:00
Katarzyna Cencelewska 260759268a Add logic to change queue slice count
Change-Id: I4f5ccb4ecb290e1a05e3a312b9fa2a5d9c5c17f7
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2019-09-26 10:21:12 +02:00
Piotr Fusik 02e1677cf0 DrmCommandStreamEnhancedTest for different families.
Related-To: NEO-3008

Change-Id: I04ef29ff868a0b2dda50cf7a6a7c660149b5ec6a
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-09-19 12:23:39 +02:00
Piotr Fusik 578a03e417 Remove redundant test code.
Related-To: NEO-3008

Change-Id: Ibd52700d6eef01136a3df8ce97a6e4d4d741495e
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-09-17 13:36:19 +02:00
Piotr Fusik f18b3bb5f5 Clean up TestedDrmCommandStreamReceiver.
Change-Id: I566bda0e8c942c3a458e24ad1ee23845f4a5c1ba
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-09-16 17:44:01 +02:00
Mateusz Jablonski 5d640e7100 Remove multiOsContextCapable flag from GraphicsAllocation
Change-Id: I3ebeef39befdc2a3e0f9d7d76ae531622ecf1a42
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-09-13 13:55:42 +02:00
Milczarek, Slawomir 093bc4da9c Add support for multiple buffer objects in drm allocation
Resolves: NEO-3364

Change-Id: I05e8b9a05328298dcc578d62b2aa7b56ffbf4ddc
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2019-09-06 10:16:05 +02:00
Igor Venevtsev 3371ed12f6 Refactor DrmMemoryManager::freeGraphicsMemoryImpl
- remove default value from synchronousDestroy param in
  DrmMemoryManager::unreference
- unreference BufferObject in synchronous mode  before release
  GPU and CPU memory
- add ULTs

Related-To: NEO-2877

Change-Id: I8065c27923cf4259a0fcd0f6d8d6d5b7c4b810c0
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
2019-08-28 12:30:20 +02:00
Venevtsev, Igor 614104bf37 Remove MMAP allocator from DrmMemoryManager
Related-To: NEO-2877

Change-Id: Iddfadde449b71b2fcfb7d6298db5de014773476d
Signed-off-by: Venevtsev, Igor <igor.venevtsev@intel.com>
2019-08-05 17:39:21 +02:00
Venevtsev, Igor e721ff1ec3 Add ULT for DrmMemoryManager
- ensure DrmMemoryManager::releaseGpuRange() calls GmmHelper::decanonize()
  before pass gpuAddress to GfxPartition::freeGpuAddressRange()

Related-To: NEO-2877, NEO-3530

Change-Id: I6f6b745a8f9262c6980b9ddd32c70d376fa49726
Signed-off-by: Venevtsev, Igor <igor.venevtsev@intel.com>
2019-07-30 13:25:03 +02:00
Milczarek, Slawomir c93b011ac6 Add support for SVM CPU allocations to DRM memory manager
Related-To: NEO-2687

Change-Id: I8987054d2fd12a1c2c01857eca1883476b0f5e04
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2019-07-17 23:37:51 +02:00
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
Stefanowski, Adam 16aee8cc46 [2/n] Move Hardware Info to Execution Environment
- remove hwInfo from the csr functions where it was passed as a parameter,
now csr functions have access to hwInfo by Execution Environment

Change-Id: I756ae63d9728c9c963571147bab97f9e1c15797b
Signed-off-by: Adam Stefanowski <adam.stefanowski@intel.com>
2019-03-22 10:08:26 +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
Piotr Fusik 8febabfbd6 DrmAllocation constructor accepts allocationType.
Change-Id: I6a6457948ada7eb59537d17b966278d114f802c6
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-02-27 16:58:22 +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
Zdunowski, Piotr 842fb5dadc [4/n] Log allocation placement.
Change-Id: I300be5f09b6ee77aa89584a6bddf4c7e57aa54f1
2019-02-26 10:21:42 +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