Commit Graph

34 Commits

Author SHA1 Message Date
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 b5d9ed77a6 Correct destruction logic of shared allocations
wait for all os contexts that used the allocation
when os context is not ready then flush related command stream receiver

Change-Id: I5fb2c16c1d398c59fbd02e32ebbbb9254583244e
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-08 14:32:21 +01:00
Hoppe, Mateusz a31c446d9f Allocate non USE_HOST_PTR and non-buffer images in preferred pool.
Change-Id: Ia486c7b32932202162d6587d06dc61023e38fff6
2018-12-31 14:37:44 +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
Pawel Wilma 5094c630f7 Force resource locking on transfer calls
Add debug variables to force resource locking on memory transfer calls
and to call makeResident() on mapVirtualAddress() call.

Change-Id: Ifa78d951fcb81812b10a98252bd414124dec9c74
2018-12-14 12:25:28 +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
Mateusz Jablonski 6be8aee45d Restore deferrable allocation deletion
Change-Id: Ie5e87fa6551b7ee33579fcd9487c7e9c3bd4ab95
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-29 07:48:19 +01:00
Piotr Fusik 87bb6afa56 Move stamps allocators from memory manager to CSR.
Change-Id: Ib399e462cdddad89fcc470df4c4f0f5e4591a6b2
2018-11-27 14:52:06 +01:00
Mateusz Jablonski f877d4254b Revert "Implement deferrable allocation deletion"
This reverts commit d961bd8354.

Change-Id: Ie7d772d57199ea2897e238b2ac289bd60a89e6c6
2018-11-23 14:59:02 +01:00
Mateusz Jablonski d961bd8354 Implement deferrable allocation deletion
Change-Id: I5e99d1bbb920619f63b71573335dc76f19c796a6
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-23 11:28:52 +01:00
Dunajski, Bartosz 706d9f8070 Allow Device creating multiple CSRs [2/n]
Create new OsContext per CSR

Change-Id: I8dad7fc1ab450e560f78eba3152b5913791e59a3
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-22 14:29:44 +01:00
Mateusz Jablonski d3f71cfb04 Move allocation lists to internal allocation storage
Change-Id: I543f1551c8fb161cf99c5870de44afec390415b2
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-30 13:49:31 +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 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 56f67748fd Remove not needed definitions and includes from mock_device.h
Change-Id: I95585f05805ee85577dfa0b981b32f828853af8a
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-22 16:30:14 +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
Hoppe, Mateusz 64c891f0fd Use specific address for Allocator32Bit in AUB CSR
Change-Id: If3fd466fcfea21c1967b10def57acf67ccfdc5e6
2018-09-26 16:01:07 -07: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 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
Pawel Wilma 4a12deea2b Add support for reduced GPU address space
Change-Id: I9ebbc8c51039bb533b44c6b80e717e1489a20a43
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
2018-09-03 13:51:36 +02:00
Dunajski, Bartosz da0f9381dc Timestamp Packet ownership
- Tag allocator: reference count tracking
- Obtain tag by command queue and pass to Event if exist during enqueue
- Handle Timestamp Packet lifetime on Event and CmdQueue destruction

Change-Id: I9a5969830ea7a9d729e6f70519d8c28ff70fcf06
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-08-29 13:47:46 +02:00
Stefanowski, Adam 1ad70dfebe Decouple memory manager and device
Change-Id: Ia64cc955e1d290cad4c50b6a2a41052d9acf0eec
2018-08-20 13:44:31 +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
Hoppe, Mateusz 03bad96877 Add failInAllocateWithSizeAndAlignment flag to MockMemoryManager
Change-Id: Iee6a5ec468a905e065645dbf2ae8b9521c0b04d9
2018-07-25 10:47:09 +02:00
Hoppe, Mateusz 229d1ad794 Merge two MockMemoryManager classes to a single one
Change-Id: I4b994b21a2423f1f3c077e847483766798c8d7f9
2018-07-24 16:48:03 +02:00
Dunajski, Bartosz 579367fe4a Enqueue write buffer instead of memcpy for renderCompressed allocation
Change-Id: I5505add129e08537fc0009b12228a446aa732645
2018-07-24 15:19:41 +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
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
Zdanowicz, Zbigniew f5513b6a1d Handle host pointer not meeting memory manager criteria
Change-Id: I65eec6083f1d8bb7b5f46e1a2e015aa6fd7f3d9f
2018-01-29 11:40:32 +01:00
Brandon Fliflet 7e9ad41290 Initial commit
Change-Id: I4bf1707bd3dfeadf2c17b0a7daff372b1925ebbd
2017-12-21 00:45:38 +01:00