Commit Graph

67 Commits

Author SHA1 Message Date
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 74510286a1 Command Queue: Destroy timestamp packet container before releasing context
Change-Id: I7ee492586ee178bc89c44d5d6663d3ff8fb2e778
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-14 08:26:46 +01:00
Dunajski, Bartosz 52fbf6473b Minor refactor of CommandQueue class
Change-Id: Iab64ad133fe96402d9577b64380472729f0190a8
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-12-06 12:45:25 +01:00
Dunajski, Bartosz 0131e66a70 Allow Device creating multiple CSRs [6/n]
- Introduce default Engine query
- Improve Deferred Deleter usage
- Remove Tag Allocation from Device

Change-Id: Iaa88d8dc0166325acf9a157dcd2217ea408ee285
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-29 16:20:13 +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
Dunajski, Bartosz 7e72b16aa4 Add processProperties method to CommandQueue constructor
Change-Id: If5b88de5311e3ab3973e47e70a1027cd7e0e791c
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-23 13:08:42 +01:00
Dunajski, Bartosz 3ad33bf1b8 Allow Device creating multiple CSRs [3/n]
Add CSR from Device to CommandQueue

Change-Id: Iaccf3c73d25e357242837677777d0513e81f520e
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-23 10:51:34 +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
Mrozek, Michal 08424d798f Enable power saving mode for queues created with throttle hint low.
- When queue is created with throttle hint low it should be power conservative
- With this change whenever queues with low throttle setting requests wait
for GPU completion, such wait will be handled in power conservative manner.
- Whenever GPU is not completed, waiting thread will be put to sleep and will
for GPU completion that triggers the wake up interrupt.

Change-Id: I9f34872a38ab9f5952f9d9623ea43503fc3dd587
2018-11-16 15:20:31 +01:00
Mrozek, Michal 5b316d142c Delete drm requirement tests.
- Those requirements are no longer valid.

Change-Id: I8885c2591fccf8825d812128ead6a637e353009f
2018-11-15 12:34:30 +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 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
Dunajski, Bartosz 6d610983f1 Deferred Pipe Control programming and CSR flush on Barrier request
Change-Id: Iabae0f9159bb455518cedf7da068c7d3da72b840
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-10-17 09:31:34 +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
Dunajski, Bartosz 73b2e947a5 Multiple TimestampPackets handling
Change-Id: Ia5936c3d0a34b892aa4444026a5aebc681f126c2
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-10-05 01:54:35 +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
Woloszyn, Wojciech f624ec757b Unify mipmap layout accross platforms
- revert "Fix reported row/slicePitch for mip-maps"
- calculate mipmap offset without gmm

Change-Id: Id4802ef9624ad330e0d0f871dfa4d4fc35a7ba33
2018-09-25 16:27:43 +02:00
Mrozek, Michal 7c7b405219 Remove makeCoherent from getTagAddress.
- if Tag allocation was not yet made resident then makeCoherent will fetch
uninitialized data, causing finish to return earlier then it should
causing later synchronization issues.
- simplify rest of method, remove redundant code.

Change-Id: I7bfcbd9f2d7170f41473a97f51856d82671b6638
2018-09-18 13:53:18 -07:00
Dunajski, Bartosz 7ec0989eea Obtain new TimestampPacket before releasing old node
Change-Id: I243d50e32967a0accea2d73fdd5ff4935bc03449
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-09-10 15:58:00 +02:00
Mrozek, Michal 393ce116e7 Remove flushWaitList method.
- No longer needed.

Change-Id: I9e255067fb4b0d52a42f6a49145b3a8d591b5e74
2018-09-07 15:27:37 +02:00
Mateusz Jablonski 92bfd2e3d2 Move OsContext to Device
Change-Id: I030b65372fbdc075423d22720e9da34ac65b8e68
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-09-03 10:42:26 +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
Maciej Dziuban b91c14f70e Delete Device::getBuiltIns()
Change-Id: I9d1968dfb2ba4a56020fd17152119add726106e1
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-08-22 16:54:53 +02:00
Maciej Dziuban e0e48203d2 Move BuiltIns to ExecutionEnvironment
Change-Id: Ib2a1b82cc7858c898bb32820aad106a01d1325ad
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-08-21 23:15:47 +02:00
Dunajski, Bartosz 6ca84c278a Aux translation [3/n]: Dispatch AuxTranslation builtin when required
Change-Id: I9bd0294de7980ac01ebb3c2d696eba6fd6a456ec
2018-08-13 12:15:30 +02:00
Mrozek, Michal 2a1feaffe9 Initialize stack variables.
Change-Id: I3fda7163cb649fe4754c46d83c641921593e1823
2018-07-19 16:19:17 +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
Zdunowski, Piotr 0cc10e47cc Use device instead of context when programing surface state.
Change-Id: I67615036d373cf905762a43a92562bf3d84854a5
2018-06-11 17:20:11 +02:00
Woloszyn, Wojciech 8a488ad52f Fix reported row/slicePitch for mip-maps
- use information from gmm correctly
- modify computation on gen8

Change-Id: Iaefcc20ce9436ef70cd2f4bc36654932c4b5af49
2018-05-22 10:36:54 +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
Hoppe, Mateusz 83160213f0 Fix problems in thkWrapper and SharingHandler
- ThkWrapper had uninitialized mFunc member, setting it
to nullptr

- D3DSurface could dereference null image pointer,
adding validateUpdateData method in SharingHandler
that may return CL_INVALID_MEM_OBJECT if memObject is invalid

Change-Id: Iaa4499bcea47baca156c9d28be4c93ba4f0e1ebb
2018-04-19 15:04:38 +02:00
Mrozek, Michal d900bdffc6 [33/n] Internal 4GB allocator.
- Move indirect heap to internal allocator domain.
- Add logic in getIndirectHeap to allocate with proper API depending on
heap type
- Add State base Address programming, reflecting that now Indirect Object
Heap is placed in 4GB domain.
- For AddPatchInfoCommentsForAUBDump mode , keep all heaps in non 4GB mode.

Change-Id: I6862f6a249e444d0d6cfe7e499a10d43f284553e
2018-04-19 08:13:48 +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
Artur Harasimiuk cb064abb04 fix mapImage for 1D_ARRAY
There are differences in qPitch programming between Gen8 vs Gen9+
devices and this requires special operation when image is zero-copy.

For Gen8 qPitch is distance in rows while Gen9+ it is in pixels.
Minimum value of qPitch is 4 and this causes slicePitch = 4*rowPitch on
Gen8.

To allow zero-copy we have to tell what is correct value rowPitch which
should equal to slicePitch.

Change-Id: I58dea004e3c7f9f4dfabd154d02749c15b6b0246
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-16 16:13:51 +02:00
Mrozek, Michal ffa9b097f5 [26/n] Internal 4GB allocator.
- change the way we handle blocked commands.
- instead of allocating CPU pointer and populating it with commands, create
real IndirectHeap that may be later submitted to the GPU
- that removes a lot of copy operations that were happening on submit time
- for device enqueue, this requires dsh & shh to be passed directly to the
underlying commands, in that scenario device queue buffers are not used

Change-Id: I1124a8edbb46777ea7f7d3a5946f302e7fdf9665
2018-04-09 10:47:37 +02:00
Chodor, Jaroslaw 0a97dfbb2f [1/n] Mipmap support
* adding support for map/unmap
* adding support for origin/region validation with mipmaps
* fixing slices returned in map/unmap
* removing ambiguity around mipLevel naming
* enabling cl_khr_mipmap_image in current shape
* enabling cl_khr_mipmap_image_writes in current shape

* fixing CompileProgramWithReraFlag test

Change-Id: I0c9d83028c5c376f638e45151755fd2c7d0fb0ab
2018-04-05 01:09:27 +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
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
Hoppe, Mateusz 7f32eb06d1 Kernel Source Level debugger support 4/n
- adding DebugSurface allocation and setup
- unit tests refactors:
  - mock kernel with kernel debug option
  - separating fixtures to headers
  - added helper for getting internal-options kernels
    filenames

Change-Id: I7b6f4d46e2ab7cff0da8d5212483f44ae0d4be31
2018-03-26 15:02:42 +02:00
Dunajski, Bartosz 516082e7c5 Kmd notify improvements [1/n]: Quick KMD sleep optimization
- KmdNotifyProperties struct for CapabilityTable that can be extended by
  incoming KmdNotify related optimizations
- Quick KMD sleep optimization that is called from async events handler
- Optimization makes a taskCount check in busy loop with much smaller
  delay than basic version of KMD Notify optimization

Change-Id: I60c851c59895f0cf9de1e1f21e755a8b4c2fe900
2018-03-21 20:41:33 +01:00
Dunajski, Bartosz dd44a87d5f Map/unmap enqueue fixes [6/n]: Support multiple map operations
- Dont make cpu/gpu writes on read-only unmap
- Read/Write on limited map range only
- Overlaps checks for non read-only maps
- Fixed cmd type on returned event

Change-Id: I98ca542e8d369d2426a87279f86cadb0bf3db299
2018-02-23 10:45:06 +01:00
Dunajski, Bartosz b4f79e036f Map/unmap enqueue fixes [5/n]: Unify offset calculation
Change-Id: I53eafe89532d43c5cf5139ed3fac0a87619dc7a3
2018-02-21 20:12:52 +01:00
Dunajski, Bartosz f6825252fc Map/unmap enqueue fixes [4/n]: Return slice/row pitch
When queue is blocked on non-blocking call, map operation is added to
waitlist dependencies. Returning slice/row pitch for map image was skipped

Change-Id: I46f97590315e7aee7fbbfbdb615f383cdb666307
2018-02-20 14:30:35 +01:00
hjnapiat 5909a6b3d3 Add support for GT-Pin Callbacks [3/n]
Change-Id: Iea4b49efc9a666fde310ece15a9c69686d22f627
2018-02-19 10:43:19 +01:00
Dunajski, Bartosz e0ca78ccea Map/unmap enqueue fixes [3/n]: Map params inconsistency
- Introducing MapInfo struct which will be used as container for multiple
  map operations
- Unified mapped offset and size for Buffers and Images
- Fixed incorrect map params for CPU and GPU path
- Missing API level checks


Change-Id: Ib4077c9e2c0c333b131ffd5ccbc4a1404920eb5b
2018-02-16 08:28:29 +01:00
Mrozek, Michal d563059c14 Remove redundant code from flushWaitList.
Change-Id: Iab4cb856ce324a785b052b8638ef23aef43c9bc9
2018-02-13 10:40:33 +01:00