Related-To: LOCI-3860
- Fixed IPC Event pools that are allocated for a single device such that
when opened thru IPC only that device handle can be used by the process
which opened the IPC event pool.
- IPC Event handle includes numDevices as a field to determine if the
root device index is the only index allowed for this event pool.
Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
1. Reposition event pool code
- Implementation of event pool methods should be placed in event pool file
2. Change event pool and event classes
- move all class variables to base classes as protected
- add needed setters and getters for runtime
- add extended mocks and whiteboxes for unit tests
- tests using base or mock class when needed
3. Correct event creation in unit tests
- use HW specific timestamp type
- HW unit tests are using template timestamp type for event creation
- other tests are using helper to create event
Related-To: NEO-7636
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
1. If cpu based copy is used, it is possible that copy time is
less than device timestamp resolution. In this scenario, this patch
returns 1 instead of 0.
2. This patch also fixes usage of CPU time instead of CPU timestamp
for end timestamp calculation.
Related-To: LOCI-3754
Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
- Given Device Allocated IPC Event Pool, the open IPC event pool process
must allocate the event pool as a device buffer or usage of the memory
will fail.
- Pass deviceAlloc flag thru the IPC Event Pool Handle to enable the
child processes to allocate the correct memory type.
- Pass isHostVisible flag thru IPCEvent Pool Handle to indicate if the
event pool must be allocated as host visible regardless of the
allocation type.
Related-To: LOCI-3764
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
- Given Device Allocated IPC Event Pool, the open IPC event pool process
must allocate the event pool as a device buffer or usage of the memory
will fail.
- Pass deviceAlloc flag thru the IPC Event Pool Handle to enable the
child processes to allocate the correct memory type.
- Pass isHostVisible flag thru IPCEvent Pool Handle to indicate if the
event pool must be allocated as host visible regardless of the
allocation type.
Related-To: LOCI-3764
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This fix unifies setting event properties in event pool, so they are shared
betweem all event pool devices.
Related-To: NEO-7490
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
- Given Device Allocated IPC Event Pool, the open IPC event pool process
must allocate the event pool as a device buffer or usage of the memory
will fail.
- Pass deviceAlloc flag thru the IPC Event Pool Handle to enable the
child processes to allocate the correct memory type.
Related-To: LOCI-3764
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
If a handle cannot be obtained, like PRIME_HANDLE_TO_FD, then
properly check for the error and propagate it upwards.
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Currently event pools are allocated in system
memory if HOST_VISIBLE flag is being set.
With this change such event pool will be
allocated in device memory if DC flush is not
allowed.
Related-To: NEO-7302
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
- Properly check for IPC event handle flag to determine if the event
pool memory is sharable between processes.
- Given Host Visible Event Pool, a check is done to determine if the
Host memory can be shared between the processes.
- Enabled handling if Event Host Memory is shareable for DRM
- If Event Pool Memory is Not shareable, then retrieving the IPC Event
Pool Handle returns unsupported.
Signed-off-by: Neil R Spruit <neil.r.spruit@intel.com>
Stack vector will not cause dynamic allocations in most circumstances
ie. number of root device indices not more than 16
Related-To: NEO-6837
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
- Add getMemoryManagerType to check which memory manager has been init
to determine if Linux + WDDM memory manager is in use.
- Add isNTHandle to test and verify if a handle is an NT handle during
L0 Open IPC Handle.
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
Dates corrected in copyright headers to reflect original publication date
(2018 for OpenCL, 2020 for Level Zero).
Signed-off-by: lgotszal <lukasz.gotszald@intel.com>