Commit Graph

47 Commits

Author SHA1 Message Date
Mateusz Jablonski 352450adaa Pass number of os contexts to Graphics Allocation constructor
Mark unshareable allocations

Change-Id: Ie745dc639d8c6b01e2275d29ee1fb4c6343df2bc
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-21 17:38:02 +01:00
Dunajski, Bartosz af46d88fc1 Allow Device creating multiple CSRs [1/n]
Change-Id: Ie5d8d89aa388c608d5464919059c28a054ac9b1e
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-21 12:37:25 +01:00
Dunajski, Bartosz d6870a896b Reduce tag pool size to 1 for AUBs
Change-Id: I3a3513250b10e899795e149bff2739193a725f84
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-20 11:42:32 +01:00
Mateusz Jablonski 66492a53a4 Change type of residency task count to uint32_t
Move definitions of objectNotUsed and objectNotResident to GraphicsAllocation

Change-Id: I2aec604a865cc6c975e9d1121028cbdd35c0b18a
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-16 16:04:48 +01:00
Mateusz Jablonski 815ae851b7 Graphics Allocation: store task count per context id
Move definition of allocations list method to internal_allocation_storage.cpp

Change-Id: I4c6038df8fd1b9335e8a74edbab33b78f9293d8f
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-06 12:43:47 +01:00
Mateusz Jablonski a30c70d84b Remove cleaning allocation lists methods from memory manager
Change-Id: I4a58a5373e7dc4cf8dc5d90390e84c4f23689139
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-29 10:35:03 +01:00
Mateusz Jablonski baa9ce74a7 Remove obtainReusableAllocation method from memory manager
Change-Id: I629044d109822f02cfddc6418f025010e62ab65b
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-26 09:06:20 +00:00
Mateusz Jablonski d5c9816428 Remove store allocation methods from memory manager
Move setGPUAddress method to WddmAllocation

Change-Id: I91d877c3791e9eff69276e4258e3ce9c3111ca45
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-26 10:53:43 +02: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
Kowalczuk, Jakub 8ead8f727f Control enabling of local memory based on OS and HW Capabilities
Change-Id: Ia26c856aeef27fe638b7a6e895cc289859f3c579
2018-10-25 16:36:47 +02:00
Mateusz Jablonski 79804652d5 Remove not needed mutex from memory manager
Change-Id: Ia362b8fa400bcd2f97d779296af12e13e138792d
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-25 06:03:22 +00:00
Mateusz Jablonski 477a06a4eb Move creation of os storage for host ptr allocation to host ptr manager
Change-Id: If7b6c17e21c72c807031232a502265559dfa48b1
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-24 10:23:25 +02:00
Mrozek, Michal a7fa9d736e Delete freeGmm interface.
Change-Id: I9a3ce6f6076d5accf69be2be50126a46f9bde23d
2018-10-23 20:59:29 +02:00
Mateusz Jablonski 7bd92190d9 Create class to operate on command stream receiver's allocation lists
Change-Id: I4262f46aa31948ed70d1152d172619b5619a2333
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-23 09:42:31 +02:00
Mateusz Jablonski 7ec8e6a3f2 Fix naming convention in host ptr defines
Change-Id: I9f0d5790031b5067b92159b078768e560990b9c6
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-22 16:29:04 +02:00
Mateusz Jablonski 86be78bcc5 Add missing lock in freeAllocationsList method
Change-Id: I326fe830ad3c90bbe0f82bd8983bb6c2a8b36c1d
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-19 10:30:30 +02:00
Mateusz Jablonski 8a9d0a81df Move temporary and reusable allocation lists to command stream receiver
Change-Id: I40df6fe39b367e243e3710c5fdeaab3c85198d9d
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-11 15:32:12 +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
Mateusz Jablonski 9a1adc3095 Remove scenarios with memory manager with null csr
Change-Id: Ie151bf3d16c5d994f154c8f9ac3db43702a4798c
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-02 21:43:21 +02:00
Dunajski, Bartosz cbd017d495 Handle TimestamPacket with implicit dependencies ownership
Change-Id: I22a4de4e9eb904c359583e235e0de54a7c743e07
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-09-28 01:48:02 +02:00
Hoppe, Mateusz 5aae5a3d62 Rename DeviceIndex to DevicesBitfield to reflect type usage
Change-Id: Ic5ac1d2d49082dc3c6e98c1fa5178b93ec9ddf56
2018-09-24 14:46:19 +02:00
Hoppe, Mateusz e8b6f11cad Propagate AllocationFlags and deviceIndex to GraphicsAllocation
- adjust AllocationData interface

Change-Id: I3754585011d34b747fe23836f754fba8e711c9ff
2018-09-21 16:38:22 +02:00
Venevtsev, Igor 7c94409ce8 Change MemoryManager::allocateGraphicsMemoryInPreferredPool() signature.
Remove allocateMemory param.
Add AllocationFlags and DeviceIndex params.

Change-Id: I3ba048f8ea9840a047a3222dc1e97be2105c2222
2018-09-20 13:04:21 +02:00
Maciej Dziuban 8df30ceac1 Move residency and eviction allocations from MemoryManager to CSR
Change-Id: I44185b35375f4cc9d58cac14cac1edefaacde652
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-14 13:19:55 +02:00
Mrozek, Michal 581805cc88 Move OsContext id setting to constructor.
Change-Id: I1b809befc02536257800e3667307b8deabd5c95d
2018-09-12 09:50:26 +02:00
Hoppe, Mateusz cfa8035836 Add localMemorySupported member to MemoryManager
- extend constructor to take new flag
- extend ExecutionEnvironment createMemoryManager with new flag
- only OsAgnosticMemoryManager changes in this step

Change-Id: I1dae4fd79fe28fd87e42b237600dc216c94b597e
2018-09-07 12:04:21 +02:00
Mrozek, Michal cb2b45625a Assign numerical value to OsContext.
- will be used for all array based accesses.

Change-Id: If93efc874f05780d60573fe8359beccea8ff0f77
2018-09-07 06:49:53 +02:00
Mrozek, Michal 75e26f39b1 Move ownership of OsContext to memory manager.
- register OsContext when device is created
- memory manager controls residency so it needs to have control of
OsContexts underneath
- device may be destroyed while OsContexts may be still in use

Change-Id: If08df7686f5448a1e7b0b6ced20b37a1e8ba2cd6
2018-09-06 10:05:28 +02:00
Dunajski, Bartosz a807b9a90b Initial implementation of Timestamp Packet write
Change-Id: Ic498bcf9795f54fbb5fb5a8d07ed17fa70dc4f1a
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-08-28 08:27:13 +02:00
Hoppe, Mateusz 4441387969 Refactor allocateGraphicsMemoryInPreferredPool
- extend AllocationType to code necessary flags
- remove redundant args
- refactor Buffer::create()

Change-Id: Ic4b2e0931fad8198ad1cf4f79de210d815048ccf
2018-07-31 08:05:55 +02:00
Dunajski, Bartosz 512978768e Pass renderCompressed information to GMM for 64kb allocations
Change-Id: I56302055c028e919bceeb3333557cab7451e1d09
2018-07-23 11:28:43 +02:00
Hoppe, Mateusz f125c8ff45 Add allocateGraphicsMemoryInDevicePool
- do not always expect failures in tests with failure injections
there is retry mechanism for some cases

Change-Id: If7589d2dacc41216d2f3b08f861209bbab179615
2018-07-20 13:00:00 +02:00
Dunajski, Bartosz 85d7081beb Enable 64kb pages when its allowed by platform
Change-Id: I10f02bd83beabeff929e16c7293324b81bfed054
2018-07-12 08:43:51 +02:00
Hoppe, Mateusz 55a045ebe1 Refactor graphics memory allocation scheme
- replace createGraphicsAllocationWithRequiredBitness with more general
methodallocateGraphicsMemoryInPreferredPool based on passed
 AllocationData
- proper flags for allocation selected based on AllocationType

- remove allocateGraphicsMemory(size_t size, size_t alignment)
and use allocateGraphicsMemory(size_t size) instead where default
alignment is sufficient, otherwise use full options version:
allocateGraphicsMemory(size_t size, size_t alignment,
 bool forcePin, bool uncacheable)

Change-Id: I2da891f372ee181253cb840568a61b33c0d71fc9
2018-07-11 15:48:05 +02:00
Hoppe, Mateusz 684b1d75ba Refactor GraphicsAllocation::AllocationType and allocationType enums
- change GraphicsAllocatoin::AllocationType to scoped enumeration
so that ALLOCATION_TYPE_ prefix in every enum value can be removed
- all accesses are typed (example AllocationType::IMAGE)
- Rename allocationType to AllocationUsage to eliminate confusion
with multiple AllocationType enums / types

Change-Id: I16003297ecfcb0aaa5779ad00706c5d983914bbe
2018-07-06 13:00:08 +02:00
Dunajski, Bartosz e18e9fb94e Move static methods from Gmm to new GmmHelper class
Change-Id: I84fbe94f0e1072324164086b456c71a46ae5040c
2018-06-27 16:46:09 +02:00
Mrozek, Michal d2817427af Remove createInternalGraphicsAllocation function.
- Route directly to allocate32BitGraphicsMemory

Change-Id: Ia6872bae655c530ff06b0ec270f419ca91d005ce
2018-05-21 04:11:43 +02:00
Hoppe, Mateusz baa7640c90 Rename MemoryType enum to AllocationOrigin
- better describes the meaning of INTERNAL and
EXTERNAL allocation types

Change-Id: Iacb97f5a9d63f45b60bc404cc6dd32c7ebd72ab3
2018-05-14 12:38:52 +02:00
Artur Harasimiuk ef5bd7ec5b refactor HwTS and HWPerf tag allocators
- use full type specification and remove casts in MemoryManager
- remove TagAllocatorBase not used any more
- make TagAllocator to be profiling/instrumentation agnostic
- unify UnlimitedTagCount and make part of TagAllocator

Change-Id: I7b5b1ed83aa5e1f0839f611db0530d7e062a3c25
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-24 22:12:10 +02:00
Mrozek, Michal 8583c68c8c [29/n] Internal 4GB allocator.
- Internal allocations may now coexists with non internal on reusable list.
- Caller now specifies if internal allocation is needed.
- If criteria are not met , then allocation is not returned.

Change-Id: I7da3a4f944768b7c8a873e44fd47248f1d76bf9e
2018-04-17 06:42:56 +02:00
Hoppe, Mateusz a1a20a3b34 Service read only memory passed as host_ptr
- read only memory cannot be used for allocation,
Oses cannot create graphics alocation for such memory
- if memory allocation fails for host_ptr passed
to enqueueWrite calls, then try doing new allocation
and copy host_ptr on cpu

Change-Id: I415a4673ae1319ea8f77e53bd8fba7489fe85218
2018-03-14 13:16:36 +01:00
Mrozek, Michal 0b6acb4d7a [3/n] Internal 4GB allocator.
-Do not create allocator 32 bit with every DRM memory manager
-This is not needed for apps that do not use this.
-Add allocation of allocator to setForce32BitAddressing

Change-Id: I836b60f6b74eecf678cc9d56851797d0db176107
2018-02-28 16:54:49 +01:00
Mrozek, Michal 19c68a608f [1/n] Internal 4GB allocator
- Add new entry point in memory manager for internal allocations.
- Route to allocate32BitGraphicsMemory
- Add new enum to control memory region
- Change mm to memoryManager

Change-Id: I2ee069aa9baf7f69f652022e026569ec4fdb9d77
2018-02-27 16:35:12 +01:00
Zdanowicz, Zbigniew e42d43953d Restrict system memory allocations to certain address range
Change-Id: Ibe8c1183368ce48f2c820d0f1a71f0b15703ffcd
2018-01-26 15:16:41 +01:00
Mrozek, Michal 0066daf495 Add support for deletion of allocations that may be in use by GPU.
- fix deletion of constant program surface
- fix deletion of global program surface
- move program_data tests to shared code
- make program_data tests SKU agnostic

Change-Id: Icf3e9fd035416072699336c4f86e49703ef48cc5
2018-01-19 12:34:49 +01:00
Hoppe, Mateusz e8fb931ef1 Use 64KB pages for SVM allocations when 64KB pages are enabled
- clSVMAlloc allocates 64KB pages as memory storage for both
fine grain and coarse grain allocation

Change-Id: I2068ffb9f5577761f739df47b54bc382e971949c
2017-12-28 11:25:43 +01:00
Brandon Fliflet 7e9ad41290 Initial commit
Change-Id: I4bf1707bd3dfeadf2c17b0a7daff372b1925ebbd
2017-12-21 00:45:38 +01:00