Commit Graph

93 Commits

Author SHA1 Message Date
Milczarek, Slawomir
f02b6cd521 Dont print errno for BO binding result after success
Fixes incorrect errors reported for bind and unbind operations
in printfs activated with the debug key PrintBOBindingResult.

Related-To: NEO-5869

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2022-02-07 11:33:36 +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
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
Bartosz Dunajski
72edadb265 Remove not used GT type info
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2022-01-26 18:06:38 +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
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
d9f6757378 Change return type from unique_ptr to vector
In some of the drm functions there is a pattern
to store array in unique_ptr and pass it's length
as an argument. This commit simplifies this.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-28 10:33:53 +01:00
Szymon Morek
7a730200ee Move appendDrmContextFlags to drm_neo.cpp
Use flag for direct submission when prelim kernel is used.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-20 17:25:11 +01:00
Milczarek, Slawomir
21f6e7e17c Remove mock function to check for page fault support
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-12-14 12:50:12 +01:00
Szymon Morek
5a3fd1dc94 Check i915 version at runtime
Related-To: NEO-6510

Check which prelim version is being used.
Select proper IoctlHelper based on that version.
If no version found, switch to upstream instead.

Source of prelim headers:
https://github.com/intel-gpu/drm-uapi-helper


Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-10 12:22:00 +01:00
Filip Hazubski
fe08216102 Refactor: Update Drm::createDrmContext
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2021-12-01 17:04:09 +01:00
Szymon Morek
ce5f9c2214 Rename LocalMemoryHelper to IoctlHelper
Related-To: NEO-6472

This helper class is not used only for local memory.
IoctlHelper is more appropriate.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
2021-12-01 14:34:21 +01:00
Joshua Santosh Ranjan
152ee4a627 Sysman Fix Multithread Access for zesMemoryGetState
Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>

Related-To: LOCI-2727
2021-11-27 02:35:46 +01:00
Milczarek, Slawomir
31b339b873 Use VM Bind immediate when page faults supported
Related-To: NEO-6355

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-11-22 18:11:18 +01:00
Milczarek, Slawomir
b8aa2871bd Add mock function to check for page fault support
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-11-18 17:46:41 +01:00
Milczarek, Slawomir
bc4c64b095 Add unit test for query page fault support
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-11-15 10:33:51 +01:00
Milczarek, Slawomir
8cf3e8ca94 Improve control of explicit residency flag
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-11-09 10:54:00 +01:00
Jitendra Sharma
1186c1aae3 zesSysmanDeviceReset: Reinitialize device after device reset
Before performing gpu device reset, first all level zero resources
and gpu device specific resources have to be cleaned up. Also as
after device reset, state of gpu device would be lost.
Hence after performing gpu device reset, level zero device have
to be reinitialized by querying gpu device again.
This change is aimed at reinitializing the level zero resources
after gpu device reset, so that user could continue using level zero
devices after device reset.

Related-To: LOCI-2627

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-11-07 23:43:48 +01:00
Milczarek, Slawomir
ca4af1dde1 Add helpers for page fault support
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-11-03 13:39:38 +01: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
Milczarek, Slawomir
a5e686cf3a Add helper function to create drm extended context
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2021-10-19 18:16:38 +02:00
Jaime Arteaga
9d49c56b75 Include domain when ordering with ZE_ENABLE_PCI_ID_DEVICE_ORDER
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2021-10-06 21:34:36 +02:00
Mateusz Hoppe
cf8e3269c7 Set context unrecoverable when debugging enabled
Related-To: NEO-6204

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-09-10 13:29:11 +02:00
Lukasz Jobczyk
a3d970ee24 Track new resource bound per VM
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-09-02 12:32:50 +02:00
Zbigniew Zdanowicz
6d510240e6 Improve ioctl statistics
Related-To: NEO-5845

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-08-19 17:50:53 +02:00
Lukasz Jobczyk
81609c7695 Use bind fence atomically
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-08-09 16:19:46 +02:00
Mateusz Hoppe
bbb27cdb8a L0 Device slice id mapping
Related-To: NEO-5640


Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-07-07 15:00:44 +02:00
Bartosz Dunajski
c7a936d1f4 Add memory banks to Simulated CSR
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-07-05 12:19:58 +02:00
Katarzyna Cencelewska
2ce3a223f0 Change use of querySystemInfo
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
2021-07-05 11:56:45 +02:00
Zbigniew Zdanowicz
8156d5c16e Reorganize new ioctl and ioctl param logging code
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-06-29 15:10:12 +02:00
Zbigniew Zdanowicz
94154145c0 Improve drm ioctl debug prints
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-06-25 14:18:54 +02:00
Zbigniew Zdanowicz
991fd3b358 Add flags parameter to user fence wait function
Related-To: NEO-5845

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-06-22 15:43:02 +02:00
Zbigniew Zdanowicz
ad18099ed8 Enable KMD fallback for User Fence wait call
Related-To: NEO-5845

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-06-17 12:12:43 +02:00
Zbigniew Zdanowicz
d14c7e4ffb Add new DRM wait function
Related-To: NEO-5845

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-06-08 12:29:22 +02:00
Zbigniew Zdanowicz
2829226937 Improve query PCI info
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2021-06-01 19:26:22 +02:00
Jaroslaw Chodor
3b4ec5b3fa Refactor of global factories
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-05-28 19:09:24 +02:00
Jaroslaw Chodor
a2da0d5e70 Refactor/cleanup around wddm
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-05-26 16:26:28 +02:00
Jaroslaw Chodor
67aa1ad7ec Refactoring HwDeviceId
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-05-24 21:38:20 +02:00
Jaroslaw Chodor
0e9aa45e46 Improving OS abstraction
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
2021-05-23 21:40:37 +02:00
Suldin, Egor
2b3b47b495 Add cl_khr_pci_bus_info extension
Signed-off-by: Egor Suldin <egor.suldin@intel.com>

https://github.com/intel/compute-runtime/pull/374
2021-05-20 14:51:33 +02:00
lgotszal
3bd4bca911 Copyright header update
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>
2021-05-17 20:38:19 +02:00
Mayank Raghuwanshi
1c3107fc7e Update sysman engine and scheduler as per lastest spec
Signed-off-by: Mayank Raghuwanshi <mayank.raghuwanshi@intel.com>
2021-05-12 14:51:21 +02:00
Bartosz Dunajski
085a2af2d6 Add EngineInstanced param to OsContext
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2021-05-12 10:57:12 +02:00
Lukasz Jobczyk
4440c55725 Add ioctl to string decoder
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-05-11 15:44:25 +02:00
Mateusz Hoppe
cc914ffde3 Save topology - slice mapping
Related-To: NEO-5640

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-05-11 14:19:06 +02:00
Lukasz Jobczyk
fa69b7539d Create special drm context when new residency model available
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
2021-05-11 12:39:49 +02:00
Mateusz Hoppe
2d07d6a3d7 Refactor Drm::queryTopology() to take struct
- set max values in SystemInfo based on topology

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-04-28 12:19:34 +02:00
Compute-Runtime-Validation
6bb76c82e3 Revert "Refactor Drm::queryTopology() to take struct"
This reverts commit f83b51e628.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
2021-04-26 00:56:06 +02:00
Mateusz Jablonski
1823054e08 Linux: pass adapter BDF to GmmLib
Resolves: NEO-5785
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2021-04-23 18:45:50 +02:00