Commit Graph

295 Commits

Author SHA1 Message Date
Bartosz Dunajski c4fcd7ed9b Capability to set low scheduling priority for Wddm context
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-05-10 16:44:25 +02:00
Mateusz Jablonski 943ad0e1eb style: skip redundant unique_ptr::get function
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-05-10 13:22:40 +02:00
Krzysztof Gibala 4f1e01d279 Create getGmmHelper function in MemoryManager
Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-05-09 16:51:23 +02:00
Krzysztof Gibala 1c366d1ec0 Refactor: Change canonize method accessing point
Accessing canonize method as a member of GmmHelper class object

Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-05-09 14:16:31 +02:00
Jaime Arteaga 3f26f45c10 Add support for IPC handles with implicit scaling
When using implicit scaling, device allocations may have
more than one internal allocation created internally. In that case,
a separate dma-buf handle per internal allocation needs to be
exported.

So introduced two driver experimental extensions to export and
import more than one IPC handle:

- zexMemGetIpcHandles
- zexMemOpenIpcHandles

Related-To: LOCI-2919

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-05-09 00:38:17 +02:00
Krzysztof Gibala 9b778863b4 Store GmmHelper in Gmm class
Store GmmHelper in Gmm class instead of GmmClientContext

Related-To: NEO-6523
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2022-04-27 15:45:49 +02:00
Mateusz Jablonski b5b8762faf refactor direct submission: Pass command stream receiver to ctor
Related-To: NEO-6643

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-04-19 23:02:55 +02:00
Bartosz Dunajski 9e7703a578 Fix Wddm DirectSubmission unit tests
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-04-11 12:42:58 +02:00
Bartosz Dunajski fc4eaa1894 Refactor passing GlobalFenceAllocation to DirectSubmission
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-04-07 16:08:07 +02:00
Bartosz Dunajski db9c0d1103 Refactor and enable MI_MEM_FENCE programming for DirectSubmission dispatch
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-04-07 12:53:56 +02:00
Dominik Dabek 308f9ccfff Do not allocate dynamic state heap if not needed
Dynamic state heap is only used for sampler data.

Related-To: NEO-6821

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2022-03-31 12:13:13 +02:00
Kacper Nowak 5477cb6b8c Correct typo
- Replace "aligMent" with correct "aligNMent"
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2022-03-24 17:46:49 +01:00
Fabian Zwolinski 3d8effcd69 Clean-Up unused code related to GMock
This commit:
- Removes usings e.g. ::testing::Return
- Removes unnecessary gmock inclues
- Replaces Gmock macros (e.g. EXPECT_THAT) with our custom implementations

Related-To: NEO-4941
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2022-03-22 16:16:34 +01:00
Jaime Arteaga a010fb3634 Dont close shared handle on imported allocations
Related-To: LOCI-2272

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2022-03-06 04:35:47 +01:00
Patryk Wrobel 7f729b7f89 Detect GPU hang in clWaitForEvents
This change:
- moves NEO::WaitStatus to a separate file
- enables detection of GPU hang in clWaitForEvents
- adjusts most of blocking calls in CommandStreamReceiver to return WaitStatus
- adds ULTs to cover the new code

Related-To: NEO-6681
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-02-23 13:33:09 +01:00
Bartosz Dunajski 6a111e41ff Improve submission logging
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-11 17:36:14 +01:00
Patryk Wrobel 18cafd3a52 Implement GPU hang detection on Windows
This change uses value of cpuAddress from monitored fence
to detect GPU hang.

Related-To: NEO-5313
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-02-09 17:22:52 +01:00
Bartosz Dunajski 61ca84e94b Pass memory placement info to StorageInfo
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-09 16:55:32 +01:00
Bartosz Dunajski abd90308f3 CacheSettingsHelper - heaps support
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-09 10:29:48 +01:00
Bartosz Dunajski a95198521e Initial implementation of CacheSettingsHelper
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-08 16:18:06 +01:00
Bartosz Dunajski c88fce0def Gmm construction cleanup
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-08 10:20:24 +01:00
Bartosz Dunajski 4b0d986876 Move AllocationType enum out of GraphicsAllocation class
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-02-04 17:49:09 +01:00
Mateusz Jablonski 1671e0a1a7 Add new debug flags for filtering devices to open
FilterBdfPath is used only on Linux as a filter for BDF
when opening from /dev/dri/by-path

FilterDeviceId is used on both OSes as a filter for device id

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-03 14:34:01 +01:00
Spruit, Neil R ae77bd1bd2 Enable Device Memory to be shared in WSL-2 with L0
- 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>
2022-01-27 23:14:29 +01:00
Fabian Zwolinski d9bf1886c2 Remove GMock from GMockMemoryManagerFailFirstAllocation, GMockMemoryManager...
Removed GMock from
- GMockMemoryManagerFailFirstAllocation
- GMockMemoryManager
- TestEventCsr
- MockKmdNotifyCsr
- MockMemoryOperationsHandlerTests
- GmockGmmMemory
- MockMemoryManagerCommandQueueSBA
- TestCmdQueueCsr

Renamed:
- GMockMemoryManagerFailFirstAllocation -> MockMemoryManagerFailFirstAllocation

Moved class body:
- GMockMemoryManager to MockMemoryManager
- GmockGmmMemory to MockGmmMemoryBase

Related-To: NEO-4914
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2022-01-20 16:08:34 +01:00
Kamil Diedrich 1b7949432f Add shareable allocation on windows dGPUs
Add default initialization for object members

Related-To: LOCI-2665

Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2022-01-19 19:03:18 +01:00
Raiyan Latif 394c0e90e1 Return error when failing on submission
Signed-off-by: Raiyan Latif <raiyan.latif@intel.com>
2022-01-12 16:42:30 +01:00
Fabian Zwolinski 44ebe800df Move MockWddm body to WddmMock
This commit cleans the code after previously removed GMock from the
MockWddm(GmockWddm) class by merging MockWddm class into WddmMock.

Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2022-01-12 16:08:46 +01:00
Spruit, Neil R 02f075c541 Power Saving Hint Support for Level Zero in Windows
- Added Functionality to pass ze_power_saving_hint_type_t to zeContextCreate
included in the pNext extensions in ze_context_desc_t.
- Enables handling a hint value 0-100 with 0 being no power savings
and 100 being maximum power savings.
- ZE_RESULT_ERROR_INVALID_ENUMERATION is returned given an invalid hint.

Related-To: LOCI-2567

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
2022-01-06 23:56:59 +01:00
Fabian Zwolinski 1d48e97649 Remove GMock from MockAubCsr, GmockAubFileStream, AsyncEventsHandlerTests...
GMock Removed from:
- MockAubCsr
- GmockAubFileStream
- AsyncEventsHandlerTests
- AsyncEventsHandlerTests::MyEvent
- MockGmmPageTableMngr
- GmockWddm

Additionally:
- GmockAubFileStream body moved to MockAubFileStream class
- Deleted unused GmockAubFileStream class
- Deleted NiceMocks from AsyncEventsHandlerTests
- Renamed GmockWddm to MockWddm

Related-To: NEO-4914
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
2022-01-05 14:45:13 +01:00
Zbigniew Zdanowicz 0cbc320e57 Move memory fixtures to shared
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-01-03 16:47:02 +01:00
Zbigniew Zdanowicz 2047fc88f9 Move execution environment helper to shared
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-12-31 11:36:44 +01:00
Zbigniew Zdanowicz b6da6471f2 Add notify parameter to direct submission post sync operations
Related-To: NEO-5845

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-12-23 17:35:48 +01:00
Zbigniew Zdanowicz 4176cac845 Move shared mocks to shared directory
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-12-21 13:26:59 +01:00
Zbigniew Zdanowicz 7680331b4a Move shared object mocks to shared directory
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-12-20 18:48:37 +01:00
Mateusz Jablonski e4bbed49d0 Use full path to include test.h 1/n
fix files in opencl

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-12-15 12:34:34 +01:00
Bartosz Dunajski 4dde9393ad Extend engine checkers to support more engine types
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-09 13:41:25 +01:00
Bartosz Dunajski dfdd3c597a Remove redundant BUFFER_COMPRESSED allocation type
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-07 13:35:49 +01:00
Bartosz Dunajski 68aea5bf62 Rename compression flags and helpers
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-03 18:09:02 +01:00
Bartosz Dunajski 9481d8a88b Compression refactor [2/n]
Dont use allocation type for compression preference

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-03 08:47:46 +01:00
Bartosz Dunajski 7b55d38e34 Refactor [1/n]: Make compression preference allocation property
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-12-02 15:24:35 +01:00
Kamil Diedrich 5bc98718b9 Add support for device allocation on Windows
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
2021-12-02 12:26:47 +01:00
Bartosz Dunajski 995cb88bfa Improve ftr/wa flags packing
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-11-25 16:05:57 +01:00
Mateusz Jablonski 95610188af Fallback to cpu copy when filling work partition allocation
move some command stream receiver tests to shared

Related-To: NEO-6325
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-11-03 12:17:02 +01:00
Compute-Runtime-Validation 782a287b27 Revert "Fallback to cpu copy when filling work partition allocation"
This reverts commit 93e3d948f5.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-10-29 04:39:22 +02:00
Mateusz Jablonski 93e3d948f5 Fallback to cpu copy when filling work partition allocation
move some command stream receiver tests to shared

Related-To: NEO-6325
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-28 14:30:00 +02:00
Mateusz Jablonski ef3f93a178 Create neo_libult target
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-22 16:55:07 +02:00
Mateusz Jablonski 802a272c5f Move mock_gmm_memory to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-22 13:46:46 +02:00
Mateusz Jablonski 58ebebeec6 Move drm_memory_manager_tests.h and related fixtures to shared
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-10-21 20:46:58 +02:00
Filip Hazubski 28b37aea72 Correct handling unique_ptr in functions
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2021-10-21 18:17:14 +02:00