Commit Graph

62 Commits

Author SHA1 Message Date
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
Milczarek, Slawomir eb1b5ded9c Add support for AUB subcapture (filter and toggle modes)
This commit adds a capability to selectively enable/disable AUB capture,
i.e. by toggling the registry key from the outside or specifying the filter
with a kernel name and/or kernel start index and kernel end index.

Change-Id: Ib5d39c21863fbc4a95aa73c949b9779ff993de0f
2018-06-15 13:02:27 +02:00
Mrozek, Michal d2817427af Remove createInternalGraphicsAllocation function.
- Route directly to allocate32BitGraphicsMemory

Change-Id: Ia6872bae655c530ff06b0ec270f419ca91d005ce
2018-05-21 04:11:43 +02:00
Mrozek, Michal 8d2df3c332 Move indirect heaps from command queues to csr.
-This is required to enable N:1 submission model.
-If heaps are coming from different command queues that always
mean that STATE_BASE_ADDRESS needs to be reloaded
-In order to not emit any non pipelined state in CSR, this change
moves the ownership of IndirectHeap to one centralized place which is
CommandStreamReceiver
-This way when there are submissions from multiple command queues then
they reuse the same heaps, therefore preventing SBA reload

Change-Id: I5caf5dc5cb05d7a2d8766883d9bc51c29062e980
2018-04-26 14:05:40 +02:00
Pawel Wilma a0c044e6d2 Extend batch buffer flattening in AubCSR to BatchedDispatch mode
- batch buffer flatening in batched mode
    - added MI_USER_INTERRUPT command
    - added GUC Work Queue Item

Change-Id: I35142da34b30d3006bb4ffc1521db7f6ebe68ebc
2018-04-26 12:45:02 +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
Koska, Andrzej b0a6d9131a Making DSH and IOH always resident
Change-Id: Ib114b92cb5ee153f213c15c935f8f1d1cfeb46eb
2018-04-13 12:35:15 +02:00
Hoppe, Mateusz 4703417813 Use correct virtual addresses in TBX CSR makeCoherent method
- cpu virtual address was used instead of gpu va
- this caused incorrect behaviour of TBX server when
special heap allocator assigning GPU addresses was used

Change-Id: I2328cf2441be797311fd6a3c7b331b0fff79d4fc
2018-04-03 15:54:07 +02:00
Mrozek, Michal 7f3c4d3d70 [22/n] Internal 4GB allocator.
- Finalize Instruction Heap removal.

Change-Id: Idd7df94a228238a5157c3251180fc3c8d3a189df
2018-03-29 08:17:32 +02:00