Commit Graph

149 Commits

Author SHA1 Message Date
Mateusz Jablonski 3ac5853e8d Add a method to check drm support
Related-To: NEO-6999
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-05-20 12:44:19 +02:00
Mateusz Jablonski 3be31b821b Create a wrapper for drm_i915_query_topology_info
Related-To: NEO-6852
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-05-19 15:27:46 +02:00
Mateusz Jablonski e7e1e64cca Create a wrapper for drm_i915_gem_context_param_sseu
Related-To: NEO-6852
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-05-19 14:10:09 +02:00
Mateusz Jablonski ac3005a463 Create a wrapper for drm_i915_query_item
Related-To: NEO-6852
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-05-18 11:32:44 +02:00
Artur Harasimiuk 819e0f5515 style: configure readability-identifier-naming.LocalVariableCase
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-05-16 12:39:44 +02:00
Artur Harasimiuk e9be9b64c6 clang-tidy configuration cleanup
Define single .clang-tidy configuration with all used checks and use
NOLINT to selectively silence tool. That way cleanup should be easier.
third_part/ has its own configuration that disables clang-tidy for this
folder.

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2022-05-11 14:02:04 +02:00
Bartosz Dunajski 206e485dfc Remove not needed DEBUG_BREAK_IF
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-05-09 11:26:16 +02:00
Bartosz Dunajski f8ce86b116 XE_HPC: Fallback path to fix PAT_INDEX programming
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-05-05 15:06:21 +02:00
Bartosz Dunajski 4f7a225baf Set PAT programming support during VmBind support query
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-05-04 16:26:15 +02:00
Mateusz Jablonski 4a5f1b9358 refactor: extract common logic for waiting on user fences in Drm
Related-To: NEO-6643
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-04-25 17:34:23 +02:00
Naklicki, Mateusz f1574bebb4 Use flag to opt-in for VM_BIND mode
Related-To: NEO-6640
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2022-04-22 17:11:37 +02:00
Bartosz Dunajski 06fa316a75 Assign pat_index to BO during creation
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-04-21 13:25:13 +02:00
Milczarek, Slawomir 6256f89a79 Page fault support to be controlled with the registry key
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-04-13 14:29:02 +02:00
Slawomir Milczarek 858766c080 Remove unused members and getters in system info
Related-To: NEO-6835

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
2022-04-12 10:46:53 +02:00
Bartosz Dunajski 884d729e4e Improve pat index programming on linux
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-04-12 08:18:20 +02:00
Daniel Chabrowski 4d4ccfd128 Remove cache info base class
There is only one implementation of said class and we don't
even adhere to the interface it provides.

Signed-off-by: Daniel Chabrowski <daniel.chabrowski@intel.com>
2022-04-07 18:15:57 +02:00
Michal Mrozek fe9fe80fc6 Avoid dynamic memory allocation [3/n]
- use reference on auto type to prevent copy.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
2022-04-06 18:07:19 +02:00
Mateusz Jablonski d3b7ea10c8 Dont allocate dynamic memory when preparing params for vm bind call
Related-To: NEO-6837
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-04-05 19:41:56 +02:00
Daniel Chabrowski 5350553f72 Use PrelimHelper for isDebugAttachAvailable
Signed-off-by: Daniel Chabrowski daniel.chabrowski@intel.com
Related-To: NEO-6591
2022-03-30 16:17:05 +02:00
Naklicki, Mateusz bce96e666f Use updated macro names
Related-To: NEO-6730

Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
2022-03-30 10:44:59 +02:00
Filip Hazubski 0fa923dff6 Add check for open syscall in case it fails
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-03-29 10:17:26 +02:00
Joshua Santosh Ranjan 71abef22bd Code cleanup
This patch fixes missed type-casting.

Related-To: LOCI-3022

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
2022-03-23 19:05:48 +01:00
Joshua Santosh Ranjan 05a150f49f L0 Core Add Support For pci_speed_ext
This patch adds support for reading PCI bandwidth, generation
and linkwidth information from sysfs nodes for the linux
platform.

Related-To: LOCI-2969

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
2022-03-16 22:47:59 +01:00
Milczarek, Slawomir 13bc2300e1 Add mock function to check for page fault support
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-02-28 18:36:31 +01:00
Daniel Chabrowski 187f772ae5 Remove drm_query_flags
Signed-off-by: Daniel Chabrowski daniel.chabrowski@intel.com
Related-To: NEO-6591
2022-02-23 13:49:37 +01:00
Mateusz Jablonski 235f9be779 Move ioctl strings out of ioctl helper
In order to setup ioctl helper we need to call ioctl to get hw info

Related-To: NEO-6591

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-17 12:30:47 +01:00
Mateusz Jablonski dabbabd3c9 Refactor createDrmContext function
merge createDrmContext, createDrmContextExt and appendDrmContextFlag

Related-To: NEO-6591

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-16 15:15:35 +01:00
Mateusz Jablonski b9d613995d Move createDrmVirtualMemory function to drm_neo.cpp
Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-16 11:34:52 +01:00
Daniel Chabrowski 85de06649d Support for execbuffer user fence ext
Signed-off-by: Daniel Chabrowski daniel.chabrowski@intel.com
Related-To: NEO-6591
2022-02-16 10:55:07 +01:00
Mateusz Jablonski 4a24195e99 Move bind/unbind buffer objects methods to drm_neo.cpp
use ioctl helper to handle binding properly

Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-16 08:37:16 +01:00
Mateusz Jablonski 143f67f2fe Enable vm bind availability based on ioctl helper support
Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-15 15:27:52 +01:00
Mateusz Jablonski cf27583264 Move createDrmContextExt to drm_neo.cpp
add ioctl helper functions to create dedicated drm contexts

createContextWithAccessCounters
createCooperativeContext

Related-To: NEO-6591

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-15 09:16:36 +01:00
Mateusz Hoppe 33f02ee2eb Print debug message when GPU hang is detected
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-02-14 20:48:14 +01:00
Mateusz Jablonski 173c86d6f1 Move ioctl strings to ioctl helper
move ioctl helper prelim tests with drm to separated file

Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-14 10:47:31 +01:00
Mateusz Jablonski 3467bc0994 Extend waitForBind function
use waitUserFence to wait for fence value
move some tests to shared
- ioctl helper tests
- drm memory info tests
- drm cache info

Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-11 18:52:59 +01:00
Mateusz Jablonski 2e32bcb2e1 Extend bindDrmContext function
move implementation to drm_neo.cpp
respect multiple CCS and BCS engines

Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-02-11 14:50:48 +01:00
Daniel Chabrowski 23999110ed Add prelim DRM page fault allocation check support
Signed-off-by: Daniel Chabrowski daniel.chabrowski@intel.com
Related-To: NEO-6591
2022-02-10 18:57:52 +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
Daniel Chabrowski 85eb6d7403 [CP-1] Extend CLOS cache mechanism for DRM allocation
Signed-off-by: Daniel Chabrowski daniel.chabrowski@intel.com
Related-To: NEO-6591
2022-02-09 16:51:48 +01:00
Daniel Chabrowski f2c4231a27 Extend DRM mock and queryTopology tests - part 1
Signed-off-by: Daniel Chabrowski daniel.chabrowski@intel.com
Related-To: NEO-6591
2022-02-04 12:02:49 +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
Mateusz Hoppe 4d8d2412f9 Add subslice ID remapping for single slice configs
Related-To: NEO-6565

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2022-02-01 16:38:57 +01:00
Szymon Morek d9886f67ee Make IoctlHelper member of Drm
Related-To: NEO-6575

This is needed to fix accessing IoctlHelper
after driver detach.
This way we are also reducing accessing
sysfs file in Drm::getPrelimVersion

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-02-01 08:26:59 +01:00
Patryk Wrobel 498cf5e871 Implement GPU hang detection
This change uses DRM_IOCTL_I915_GET_RESET_STATS to detect
GPU hangs. When such situation is encountered, then
zeCommandQueueSynchronize returns ZE_RESULT_ERROR_DEVICE_LOST.

Related-To: NEO-5313
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
2022-01-31 13:48:17 +01:00
Filip Hazubski 2dc54f6fd9 Update isLinuxCompletionFenceSupported value for XE HPG CORE
Related-To: NEO-6575

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2022-01-24 14:58:17 +01:00
Zbigniew Zdanowicz a7455b5767 Add tweaks and control flags to linux completion fence
Related-To: NEO-6575

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-01-21 13:41:23 +01:00
Ayush Pandey 715b9d31d2 Find sscanf alternative.
Used strtol() to write sscanfUtil to extraxt info of BDF pcipath.

Related-To: LOCI-1002

Signed-off-by: Ayush Pandey <ayush.pandey@intel.com>
2022-01-21 09:02:48 +01:00
Zbigniew Zdanowicz d44f3009b8 Add interface for user fence extension
Related-To: NEO-6575

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2022-01-19 19:58:22 +01:00
Szymon Morek 4fc365acca Create EngineInfo without MemoryInfo
Allow to create EngineInfo even if memoryInfo is
nullptr.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-01-13 10:03:34 +01:00
Szymon Morek 26a24e8fde Query engine info with distances
If prelim kernel is being used, query distances
and set correctly number of available engines

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2022-01-10 13:30:26 +01:00