Commit Graph

70 Commits

Author SHA1 Message Date
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 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
Dunajski, Bartosz b728526c4e Allow Device creating multiple CSRs [8/n]
Use OsContextId instead of DeviceIndex for residency

Change-Id: Ib2367b32b5b3e320252d8254f1042f1c3d497068
2018-12-04 15:36:59 +01:00
Zdanowicz, Zbigniew 7dbd0ea4f3 Move Scratch Space functionality to dedicated class
Change-Id: Ic7655c4b971513961aba6823478a139ffc943466
2018-11-29 11:55:56 +01:00
Piotr Fusik 87bb6afa56 Move stamps allocators from memory manager to CSR.
Change-Id: Ib399e462cdddad89fcc470df4c4f0f5e4591a6b2
2018-11-27 14:52:06 +01:00
Dunajski, Bartosz 2d77b86e70 Allow Device creating multiple CSRs [5/n]
- Move Engine type to OsContext
- Move OsContext to CSR
- Improve EngineMapper logic
- CompletionStamp cleanup

Change-Id: I935cb7169c8c48cd09837e20e3da06f6dd3437b9
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-27 14:25:04 +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 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
Woloszyn, Wojciech 549b73510c Flush L3 for reduced address space platforms
Change-Id: I5a73e72f8e309137328930920ab174ba6f1378dc
2018-11-06 14:26:59 +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 ead2e2ea6d Move createAllocationForHostPtr method to command stream receiver
Remove not needed includes from command_queue.h

Change-Id: I45963bf005471bd7716d55471474299a15e27b62
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-30 17:49:08 +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 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 a531751001 Remove ULT code from runtime
Change-Id: I2faf52070f980d031788fc6946df8534d96c639b
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-24 17:45:08 +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
Dunajski, Bartosz ef65e6433e Improve EnableTimestampPacket debug variable usage
Change-Id: I864f0dc756a7fe17a08d1bcca2d91e9b78fb730a
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-10-18 14:25:46 +02:00
Mateusz Jablonski 4f028d13a1 Command stream receiver: use memory manager from execution environment
Change-Id: I236218a73bd7dac6e5744e3596f146b77b5ca1c8
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-16 12:14:55 +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
Dunajski, Bartosz 66427f60c6 Handle TimestampPackets for non-kernel enqueues
Change-Id: I52ec4f43b10bf6e2a10b2455d32a90a606645d29
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-10-10 04:21:30 +02:00
Maciej Dziuban bc4700a193 Add OsContext argument to MemoryManager::makeNonResidentEvictionAllocations
OsContext has to propagate through following calls first:
- WddmCommandStreamReceiver<GfxFamily>::processEviction
- CommandStreamReceiver::makeSurfacePackNonResident

Change-Id: I7559c7406b2860c51905c9961cec251fac231b08
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-05 01:28:31 +02:00
Maciej Dziuban 41e8d70363 Change makeSurfacePackNonResident argument to a reference
Change-Id: Ic95ad2406184e91a78c152fad3fe6f0f4ebb24ae
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-28 18:08:18 +02:00
Maciej Dziuban 95e4dc4152 Delete unneeded residency/eviction allocations mutators
Change-Id: Ic73ea4c4e3ebf422f935a440a1b4789fe1c15494
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-26 13:02:19 +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
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
Maciej Dziuban da5a292e54 Delegate MemoryManager residency and eviction calls through CSR
MemoryManager::getEvictonAllocations()
MemoryManager::pushAllocationForEviction()
MemoryManager::clearEvictionAllocations()
MemoryManager::clearResidencyAllocations()

Change-Id: Iaa3051965bc9dfc09384e2bd5e9e0c372b5e722a
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-14 08:18:04 +02:00
Maciej Dziuban fafde2ec15 Delegate all MemoryManager::getResidencyAllocations() calls through CSR
Change-Id: I9cfbfd86d39b5341598ff2bd8883e13605c58b72
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-13 14:56:06 +02:00
Maciej Dziuban 81a1e435f9 Delegate all MemoryManager::pushAllocationForResidency() calls through CSR
This prepares for moving this method from MemoryManager to CSR.

Change-Id: I82393289c48990f26ed3ac922bcd64e2b6c11f28
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-13 14:33:16 +02:00
Mrozek, Michal 8e33ec04c5 Create separate command stream receiver for every device.
Change-Id: I8073380941e2a3bfe57610e6e437bdc177dcc2d5
2018-09-12 09:32:41 +02:00
Maciej Dziuban 4da2dd471d Get rid of processResidency() calls with null ResidencyContainer 2/n
Change-Id: Ic2495cd21304710825727177a1d90889e22808d8
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-11 15:01:01 +02:00
Dunajski, Bartosz b74280beb6 Check EnableTimestampPacket debug variable once and set as CSR mode
Change-Id: Ia6e7caa96f3b46b30590fb46a1fb37fa153adeb4
2018-09-06 11:19:02 +02:00
Mrozek, Michal fb735e5ee5 Move SSH size obtaining logic to dedicated function.
Change-Id: I1ea2ceb69f0ae06fe8e37f7769015933295dd6cd
2018-09-03 16:54:38 +02:00
Chodor, Jaroslaw ad9710bec2 Refactor around binding table programming
Change-Id: I4cad63b11937531e36ea9d92cee606ea8941c9ef
2018-08-29 14:35:52 +02:00
Mrozek, Michal 599b79320e Call yield in busy loop to reduce CPU usage.
Change-Id: I6563665a9a1cbb0baabc0db6d8666f80414ad347
2018-08-14 14:27:39 +02:00
Kamil Diedrich d3d8b6f905 change ARRAY_COUNT macro to constexpr
Change-Id: I027c4e70e3b901f3ffb3c0971935ae67e971db07
2018-08-14 10:04:58 +02:00
Mrozek, Michal 1599ea800e Pass execution environment to command stream receiver.
Change-Id: I598f67f8b005b5ce8249b638e080657eb6dc3547
2018-08-08 17:10:39 +02:00
Mrozek, Michal d80dbb1ae0 Do not take ownership on device.
- Command Stream Receiver should be used instead for locking.
- Remove not needed synchronization in clSetUserEventStatus

Change-Id: I17050dc70cb0be03b2003043a9666ba8df1a83c9
2018-08-07 09:29:50 +02:00
Mrozek, Michal 6f251f5ea1 Fix TBX completion loop.
- resources are dumped in make non resident call
- in order to dump correct data we need to be sure that GPU is done processing
- waiting needs to be unconditional to handle all cases
- remove not needed parameter to makeSurfacePackNonResident

Change-Id: Ib2b065d486cd3a5d86e599c51b24f3c958c3a10b
2018-08-03 09:32:24 +02:00
Mrozek, Michal 1807ea651c Initialize tag value in init function.
- remove not needed method in mock device.
- remove duplication from aub tests.
- tag allocation now have desired value

Change-Id: Ib3161cce6753eae27c60fddb63054fd2e12f7dac
2018-08-03 09:25:26 +02:00
Mrozek, Michal aa71442d50 Make sure that devices reuse memory manager and command stream receiver.
- initialize them only once per execution environment
- initialize tag allocation only once

Change-Id: Ic816c81a84320aeb66b09d333bec69a92fe0859b
2018-07-17 16:38:05 +02:00
Mrozek, Michal f59c191915 Refactor parts of createDeviceImpl.
- Move portions of code to dedicated methods.

Change-Id: I9abec23785f3f3201dce42a7a840ca4a450c4cc1
2018-07-17 09:46:45 +02:00
Mrozek, Michal f6dc90c903 Move destruction of command stream receiver to execution environment.
- remove other explicit resets, no longer needed.
- change the order of destruction, command stream receiver needs to be
destroyed prior to memory manager.

Change-Id: I3c5db46db15a2cb7dc9f6fdb0e06441806fbd9f2
2018-07-16 13:20:25 +02:00
Mrozek, Michal 0abacce160 Move tag allocation destruction to command stream receiver.
Change-Id: I657df755c6cdd695103769a45a8dce749f7bd545
2018-07-16 13:12:53 +02:00
Zdanowicz, Zbigniew 51421ec0b9 Add experimental command buffer
This code is an infrastructure for special debug purpose that allow measure
execution time of any hardware command.

Change-Id: Id12a7979d204734a0c4a6c4700e427b65ac2397f
2018-07-13 12:09:14 +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
Hoppe, Mateusz 64277ee849 TBX CommandStreamReceiver fix for makeCoherent
- makeCoherent should be called after TBX finished processing
 - this is when tagAddress is updated with taskCount
makeCoherent is called from makeNonResident which is invoked just
after flush and may happen before TBX server finished processing
leading to invalid data to be read back to CPU accessible memory

- this fix adds waiting for taskCount to blocking calls for TBX CSR
before calling makeNonResident on surfaces to guarantee correct data
from TBX server is ready.

Change-Id: I498a5454e0826eec2a5413a08880af40268550e1
2018-07-04 12:04:32 +02:00