Commit Graph

52 Commits

Author SHA1 Message Date
Dunajski, Bartosz 0337b58ee4 Remove dcFlush parameter from finish call
Change-Id: Ifc808822399a100745a9d81bb5f6e45903a895fa
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-09-13 12:28:10 +02:00
Jobczyk, Lukasz 2e8e6bdb18 Move majority of utilities to the core dir
Related-To: NEO-3677

Change-Id: If2e876028b765ad3ecf5f75db8755623b82955b8
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-09-12 15:07:02 +02:00
Adam Cetnerowski 1eac288a24 ULT renaming: Command queue hw tests
Related-To: NEO-2236

Change-Id: I95cb79402822de667038e33f330425b133520389
Signed-off-by: Adam Cetnerowski <adam.cetnerowski@intel.com>
2019-08-22 16:11:18 +02:00
Daria Hinz 06d14cdcae Checking builtinParams passed to Multidispatch
Change-Id: Idb6c30dc5bb46403cea12acbf5174c6d9ddfbd3e
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2019-07-30 08:21:13 +02:00
Dunajski, Bartosz 89d1878cd6 Rename engine member in CommandQueue
Change-Id: I01516616c164f19afbcd62d39a2a42d04ff768c9
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-07-15 17:53:01 +02:00
Mrozek, Michal fe26b0b406 Move debug_manager_state_restore.h to core.
Change-Id: I3ef4a1aec40efa4bbc8346a5b517336c42c06519
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
2019-07-15 17:21:38 +02:00
Mrozek, Michal 6ffcd51847 Fix race in events scenarios.
- It could happen that 2 threads try to update the same event within tree
- First thread starts to submit command, it releases cmdToSubmit
- Second thread doesn't see the command and follows
- Second thread thinks that it submitted the command so it follows to
subsequent steps which are child events notification
- We end up with corrupted enqueue sequence as child may submit prior to
parent.
- With this change each submit step is synchronized basing on task count
- When second thread enters submit command without task count being set
it wait for first thread to properly set it.

Change-Id: Ic2ddaea17f9af8cab6781320edae2c268dd0b189
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
2019-07-09 14:45:07 +02:00
Mrozek, Michal baa11187c3 Simplify isStatusCompletedByTermination.
- remove default parameter.
- remove branch.

Change-Id: Ia829adfc684057516a2fc204e853ad3948853e22
2019-07-09 09:48:16 +02:00
Mrozek, Michal 7f7f1b8ac9 Optimize waiting scheme in user events scenarios.
- do not wait on map/unmap if zero copy resource.
- do not wait in marker commands at all.

Change-Id: I74cdd8320d13602bf662eed412ed2fcad1504989
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
2019-07-08 17:40:36 +02:00
Mrozek, Michal 64403ef630 User event code path improvements.
- is queue blocked to release virtual event when it is submitted
- do not wait on completion after ndr submit.

Change-Id: I63c54e6940f6241b32f0dbdd5880f849c46fd12e
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
2019-07-08 16:23:17 +02:00
Zbigniew Zdanowicz e201725dd5 Add dedicated map allocation
Related-To: NEO-2917

Change-Id: Ieeca40f5faf29433a5c464d2c3ca3b8910695a9b
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2019-04-09 16:16:31 +02:00
Mateusz Jablonski f3d17008ee TransferProperties: lock resource only when transfer on CPU is requested
Change-Id: Ic93b4fd438e75f5d54cbae9bec332c4b18c6b1ee
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-04-01 14:02:49 +02:00
Maciej Plewka 9e52684f5b Change namespace from OCLRT to NEO
Change-Id: If965c79d70392db26597aea4c2f3b7ae2820fe96
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2019-03-26 15:48:19 +01:00
Koska, Andrzej fcdfcb3fc4 Pass enqueued values to enqueueHandler
Change-Id: I991818657c7cafaf8911ce711a87a6c7b4531517
Signed-off-by: Koska, Andrzej <andrzej.koska@intel.com>
2019-03-13 11:23:37 +01:00
Filip Hazubski 8b57d28116 clang-format: enable sorting includes
Include files are now grouped and sorted in following order:
1. Header file of the class the current file implements
2. Project files
3. Third party files
4. Standard library

Change-Id: If31af05652184169f7fee1d7ad08f1b2ed602cf0
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2019-02-27 11:50:07 +01:00
Kamil Diedrich a7b46ccdbd Add RAII for cl_objects
- add removeVirtualEvent to cmdQueue fixture
- add const keyword in event functions

Change-Id: I11354eb8fceb15ae2c58bddd327863a15aab6393
2019-02-12 11:19:35 +01:00
Chodor, Jaroslaw 43856e88b5 Refactor around cache flush and command queue
Change-Id: I277e27cbc60fbbb015c0024f171697408879ec0b
2019-02-10 17:59:33 +01:00
Kamil Diedrich e1eab521e7 use release for cl-objects instead of delete
- fix for data race in events
- modification of the addition child event

Change-Id: I6ea3a413f13f13a91d37d20d8b9fad37d0ffafb9
2019-02-05 14:09:32 +01:00
Zdanowicz, Zbigniew 767f27a483 Add calculation of default SSH size in ULTs
Change-Id: I682f7cc671ab18de7a9976e0034842df0f6134bf
2019-01-04 09:28:21 +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
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 1e0064fc2f Allow ULTs to work with enabled TimestampPacketWrite
Change-Id: Idd4622469220b859e8724d9179837c685377ce52
2018-11-07 08:50:04 +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 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 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
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
Pawel Wilma 8c1db4fb2f Code cleanup for reduced GPU address space
Change-Id: Ibce79ddbe1f03dac1813b5dc2356a9db86b60200
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
2018-09-10 16:16:06 +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
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
Mrozek, Michal 1599ea800e Pass execution environment to command stream receiver.
Change-Id: I598f67f8b005b5ce8249b638e080657eb6dc3547
2018-08-08 17:10:39 +02:00
Mateusz Jablonski 98061903aa Remove device helper
Change-Id: Ie66c029359a62b81c8658d804dcf8565647100f1
2018-07-26 14:10:05 +02:00
Artur Harasimiuk 10e5b71111 dependencies cleanup
move gmock/gtest to third party

Change-Id: I96b43a3de2b6f2151659a9b2eed27eb58db5ce48
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-05-11 15:04:45 +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
Artur Harasimiuk 0432d117ca ULTs cleanup
- removing more occurences of unused MemoryManagerFixture

Change-Id: I4d2d03536b26a54024e09877cf1bf48dcbf8559a
2018-03-30 08:53:35 +02:00
Mrozek, Michal 2be5934096 [21/n] Remove Instruction Heap from enqueue path.
- This removes Instruction Heap allocation from enqueue path
- Blocked path is handled as well
- Heap is no longer allocated on demand it is bind to kernelInfo.

Change-Id: I54545beceed3404ee0330a8bac2b0934944cac30
2018-03-28 20:15:55 +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
Mrozek, Michal 1602fa5a88 [7/n] Internal 4GB allocator
- rename getBase to getCpuBase
- change some test names accordingly.

Change-Id: I6fb2e4714298250147ea7766a916d7f5d62edc54
2018-03-05 22:16:14 +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 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
Zdanowicz, Zbigniew 86bb715b95 HostPtr surface makeResident must be called once
Change-Id: I9cb04e3affdd8b8634466621b50326a088ecdcf9
2018-02-16 11:11:37 +01:00
Dunajski, Bartosz 72b78d15ee Map/unmap enqueue fixes [1/n]: Unify Buffer and Image paths
Change-Id: I59bf18072c15367ff6caec5dbdc1350ea2d93281
2018-02-09 17:35:03 +01:00
Hoppe, Mateusz 012b8bd73c Adding initial PreemptionMode::Initial
- account for initial setting (when set mode was equal to initial(Disabled))
estimate size in cmdStreamCS, program MMIO

Change-Id: Ice218ae986583c8f3bab4f4f6979e38f03e30d7e
2018-02-08 16:21:52 +01:00
Mrozek, Michal e35a066f79 Change the instruction heap size to be at least 512KB.
- Instruction heap is currently heavily used as every kernel copies ISA into
 it.
- It dries out very fast and each change to new heap requires whole pipeline
drain that prevents concurrency
- Problem is even larger when sip kernel is used as it limits the total heap
size
- In order to maximize heap re-use and to limit the count of pipeline drains
this change introduces new minimal size for instruction heap 512 KB.

Change-Id: Ic54e9ef4448b1d35dab01b084ee1d59b509642cb
2018-02-01 13:10:39 +01:00
Chodor, Jaroslaw 044fd1ab81 Fixing IntDescr programing for blocked cmd and MT
Fixing InterfaceDescriptor programming for
blocked commands when MidThread preemption is
enabled
Additionally, fixing couple of tests that block
global preemption enabling in ULTs

Change-Id: I454c9608f8606f23d7446785ac24c7c7d8701ae0
2018-01-17 12:19:07 +01:00
Mrozek, Michal b00819cafe Add refcount on MemObj in blocked scenarios.
- Prevents destruction of MemObj while it may still be in use.
- Add UNRECOVERABLE to check whether object is deleted while having
dependencies, fix all problems is tests due to that fact.
- Fix special queue setting, clean interfaces.

Change-Id: I2a467e80df00ea1650decdcfa6866acf10b441f8
2018-01-08 16:03:24 +01:00
Mrozek, Michal 3eb856b192 Add reference on kernel in blocked scenarios.
- Prevents kernel destruction while it may still be in use.

Change-Id: I1f87d09c5cabf29644a1b06b63f1789dbb15985a
2018-01-05 10:19:04 +01:00
Mrozek, Michal 57137fea84 Fix heap programming in blocked scenarios.
- When command queue is blocked, all heaps are being stored in temporary
allocations, command buffers are being pre-programmed, heaps are being set
on those temporary allocations with the assumption that all heaps start with
offset 0.
- Problem was when the actual submissions happened, all those temporary heaps
were just copied to appended command queue heaps, so when something was there
then new stuff was copied right after it. It means that all state was
incorrect as the offsets are not valid anymore and will point to wrong
location.

- This change releases command queue heaps when blocked command is being
submitted to make sure they will be programmed with the proper offset in newly
allocate command queue heap.

Change-Id: I3e30be13caf4df8621ddb18f8448ffaf0f1278d1
2018-01-04 10:45:49 +01:00
Mrozek, Michal 2b91ea85c6 Fortify events
- add some debug breaks
- clean cmd ownership, there can't be situation when event holds 2 commands
- cmd meaning cleanup
- remove not needed try catch clause

Change-Id: I5ad6877e7235de2d7f48818467cb4b92655aab97
2017-12-22 15:05:28 +01:00