Commit Graph

54 Commits

Author SHA1 Message Date
Jablonski, Mateusz ed6381a66a Use HEAP_STANDARD64Kb when cpu access is required
Change-Id: I3a451b618f1b72836cd640ed510e874cf2d60624
Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
2019-02-19 10:36:15 +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
Piotr Fusik 9af011809f Make HeapIndex and GraphicsAllocation::origin not specific to Windows.
Change-Id: Ie5a26b45c0b5eff0daf047361d8c992bd3c65ba7
2019-02-18 08:47:49 +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
Dunajski, Bartosz dc181defba Use GpuAddress for TimestampPacket programming
Change-Id: I1303605c33e2e0267a1716e12a0bfcb341fcfbd7
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-02-11 15:31:17 +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
Hoppe, Mateusz c870628d08 Rename SHARED_RESOURCE allocation type to SHARED_RESOURCE_COPY
Change-Id: Ie846450384730171304788bbb1709d7f088036a8
2019-01-28 16:20:35 +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
Zdunowski, Piotr 75a635fdc5 [1/n] Log allocation placement.
Change-Id: I9ab61e10dcb0fcbbaf859c077a64ce7a4f2c213c
2019-01-16 16:46:50 +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
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 b138ff5750 Minor refactoring related to residency task count
Change-Id: I49c9a5b37637e19fa12b7e6d91c352fb78bb117a
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-19 11:38:49 +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
Maciej Dziuban 43fd32b3ad Enable aggregating command buffers with multiple osContexts
- Store inspectionId for each osContext in GraphicsAllocation
- Pass osContextId to aggregateCommandBuffer and use it to select inspectionId

Change-Id: I2c377ad7577a8c882cc89c1205430cb581c2c0d5
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-12-06 10:11:07 +01:00
Maciej Dziuban 1cd59e927a Store residency status for each osContext separately
Change-Id: I2f17f68dcef6db7b596a69579a435b7ccd24e44b
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-29 08:08: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
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 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
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
Dunajski, Bartosz bd4ea652ec Make Timestamp allocations OneTimeAubWritable
Change-Id: I22e973714e4df1b3a07d8fb45cdab37b28a6433e
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-16 15:49:25 +01:00
Mateusz Jablonski 0e0a280803 Create structure UsageInfo for task count and residency task count
Change-Id: I0899c88d9e567a09ba46461ae69cf6c80f713e67
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-15 14:07:05 +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
Mrozek, Michal 200228b506 Replace cpuPtrAllocated flag with driverAllocatedCpuPointer.
Change-Id: Ic0ce165d0e583701e1128595a3d9dabd0a61a84b
2018-10-31 12:37:20 +01:00
Mrozek, Michal 7ece16ee7a Graphics Allocation cleanup.
- remove one constructor
- start using mock graphics allocation in tests

Change-Id: Idb8f4a35dbc2cae8d6bf667bab5542d8e91d6e0d
2018-10-31 11:54:24 +01: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
Hoppe, Mateusz 5aae5a3d62 Rename DeviceIndex to DevicesBitfield to reflect type usage
Change-Id: Ic5ac1d2d49082dc3c6e98c1fa5178b93ec9ddf56
2018-09-24 14:46:19 +02:00
Hoppe, Mateusz 91aaa92fb6 Refactor PhysicalAddressAllocator
- create allocator dynamically in AUB & TBX CSRs

Change-Id: I3b01a3fc2f4824b552ef27cbda5bdcc140e92e53
2018-09-21 21:48:57 +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
Mrozek, Michal f3bcb5c539 Make sure that residency is properly initialized.
- all members needs proper init.

Change-Id: I578eee8178ae375cc4861872c84ced1729fb689b
2018-09-20 20:47:27 +02:00
Mrozek, Michal 78f828fcd1 Make residency in graphics allocation OsContext dependent.
- Graphics Allocation now holds residency control per OsContext.

Change-Id: Ie0a0d3aa9fdaf542fdd42dee3aba236a5af635c7
2018-09-20 16:44:04 +02:00
Milczarek, Slawomir f6f9c0f456 Add notify functions to enqueue read buffer and image calls
This commit adds notifications to enqueue read buffer and image calls
and setters/getters to mark/check if an allocation is dumpable.

Change-Id: I123f24752d2a86abcf934e0d404f4e0ecf1729cc
2018-08-22 21:43:17 +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
Dunajski, Bartosz 239ebf9eab Improve AllocationType operations: dont do bit operations on enums
Change-Id: Ie70ca9e2a93ec80b1cd655bad622db9e12abb7f7
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-07-20 09:12:58 +02:00
Hoppe, Mateusz 407227959a Add memoryPool to GraphicsAllocation
- new ExtendableEnum struct that serves as enum but can
be extended with values
- decrease dependencies on graphics_allocation.h header -
 use forward class declaration when possible
- memoryPool indicates what kind of memory is allocated
for a given GraphicsAllocation

Change-Id: I7a707c28dc4544cc73abc5f0ed5263ba5be17452
2018-07-17 20:10:33 +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
mplewka 95e5aba86a Decode sip binaries once for all tests
Change-Id: I05a54146dc1aa893c5217f60f3b4ca47ded03019
2018-05-29 13:47:19 +02:00
Mrozek, Michal 5bae27ae51 Fix a bug in Graphics Allocations constructors.
- There was a wrong cast in Graphics Allocation constructor resulting
in wrong GPU address generation in some sporadic scenarios.
- Problem appears in 32 bit applications where void* address is cast to
uint64_t value, if c style cast is used it makes trailing bit to be
populated to higher bits constructing wrong value

0xf000000 is being casted to 0xfffffffff0000000 while it should be casted to
0x00000000f0000000
- added special cast function for further use.

Change-Id: I56d53a8e13e17cbacd127566442eea3f6a089977
2018-04-19 09:45:03 +02:00
Koska, Andrzej b0a6d9131a Making DSH and IOH always resident
Change-Id: Ib114b92cb5ee153f213c15c935f8f1d1cfeb46eb
2018-04-13 12:35:15 +02:00
Milczarek, Slawomir b56289a507 User space AUBs capable of memory re-dumps on CPU-side memory modifications.
Any CPU related updates such as clEnqueueMapBuffer or similar
need to trigger a re-dump of memory prior to the next clEnqueue call.

Change-Id: I7b31e559278e92ff55b6ebab8ef4190caef1ebc0
2018-04-03 15:40:29 +02:00
Milczarek, Slawomir a02c3cb781 KM DAF AubCapture to recapture fill pattern allocations
The commit introduces a recapture of fill pattern allocations on every submit.

Change-Id: I634af075348dbc59c7809f58b8495326cab804e1
2018-03-27 16:38:41 +02:00
Milczarek, Slawomir 32825e203e KM DAF AubCapture to recapture command streams and heap allocations
This commit introduces a recapture of CS and Heap resources on every submit.

Change-Id: I2a5a763e8988de804da1a6c2c8042154b0786b2e
2018-03-26 18:27:20 +02:00
Mrozek, Michal 5d3d3ff0e7 [16/n] Internal 4GB allocator.
- simplify os agnostic memory manager
- remove pointer map
- move cpuPtr allocate logic to graphics allocation
- do not release tag allocation while injecting memory manager
- remove not needed ref count from Memory Allocation

Change-Id: I6ad81ee919c9cde939bc754a9dfc2db7568397d2
2018-03-22 09:26:19 +01:00
Dunajski, Bartosz f6a8cb3279 Improve GraphicsAllocation reuse management
Change-Id: Iee14b4641712231c801676b758546be76deef636
2018-03-05 10:56:34 +01:00
Dunajski, Bartosz e579578bc8 Reuse GraphicsAllocation mechanism for shared resources
Change-Id: I4bfd2d3387ae0fc10d461ebc1ada94614ab7f6b5
2018-03-02 16:51:28 +01:00