Commit Graph

29 Commits

Author SHA1 Message Date
Vilvaraj, T J Vivek 47f7b4f509 sysman: clean up code duplication for reset
warm and cold reset are common functionality,
the code is being moved to the common sysman implementation
from diagnostics specific files.

Related-To: LOCI-1908
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2022-03-31 14:10:39 +02:00
T J Vivek Vilvaraj b95428078e sysman: filter diagnostics related accesses
prevent diagnostics related calls on unsupported platforms


Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
2021-12-20 12:49:49 +01:00
Pichika Uday Kiran 7764924387 sysman: Avoid creating the IGSC libary handle in ULTs
- Contains the changes to avoid invoking IGSC library
during ULT execution.


Related-To: LOCI-2719
Signed-off-by: Pichika Uday Kiran <pichika.uday.kiran@intel.com>
2021-12-02 19:30:35 +01:00
Vilvaraj, T J Vivek b91cec5655 sysman: mock firmware utility in sysman
firmware utility needs to be mocked to prevent file access while
executing ULT's


Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2021-11-17 07:57:46 +01:00
T J Vivek Vilvaraj e1a1e96110 sysman:close diagnostics handles before reset
Relates-to:LOCI-2650

Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
2021-11-15 21:30:13 +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
T J Vivek Vilvaraj f27f430429 sysman: fix firmware device enumeration in firmware Utils
firmware Utils was always enumerating the same firmware
device handle for all sysman devices.

Related-To:LOCI-2609

Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
2021-10-14 18:02:55 +02:00
Jitendra Sharma 135ec380fc Dont initialize sysman for linux if Driver Model is not DRM
Related-To: LOCI-2533

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-10-04 12:15:21 +02:00
Jitendra Sharma c46f591a99 Do not initialize Sysman if OsSysman Init failed
Related-To: LOCI-2552

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-09-30 09:11:55 +02:00
T J Vivek Vilvaraj aba7d74bcd remove unused libxml module from sysman
Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
2021-09-30 09:01:35 +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
Jitendra Sharma e1458fc95c To avoid seg fault, add null check before deleting PMT objects
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-05-18 12:37:15 +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
Jitendra Sharma 46c51cb8a9 Sysman device reset stability fix
Close PMT, and PMU fds created during Sysman's init before calling
device reset.

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-04-15 11:53:10 +02:00
Jitendra Sharma 3597093758 Update Temperature APIs to get correct temperature
This change updates Temperature APIs to get correct current
temperature based on updated PMT interface.

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2021-02-06 18:39:58 +01:00
Vilvaraj, T J Vivek bddc63e8bd add firmware flashing utility interface
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
2020-12-22 09:10:11 +01:00
Bill Jordan 909107cab6 Fix zesDeviceReset for Spec version 1.
This patch does the following:
- Fixes a bug in FsAccess::listDirectory that could return
ZE_RESULT_UNKNOWN_ERROR when no error has occurred.
- Fixes a bug in zesDeviceReset that would reset the device
if force was set to false, even if the device was in use.
- Fixes a bug in zesDeviceReset that would reset the device
if force was set to false without closing the file descriptor.
- Added a releaseResources method method to Device object.
This method does the same thing as the DeviceImp
destructor except it does not free the DeviceImp object
and it does not free the SysmanDeviceImp object.
- Added the releaseResources methods to Mock<Device> object.
- Moved the reset of the debugger out of DriverHandleImp
destructor and into DeviceImp releaseResources.
- Added a releaseEngine method to the EngineHandleContext. This
method frees all the Engine handles.
- On reset, I call the Devcie->releaseResources and
EngineHandleContext->releaseEngines before resetting the device.
- Added a -r (--reset) option to zello_sysman so I
could easily test resets.

With these patches, the L0 Sysman CTS for zesDeviceReset
both pass.

Change-Id: I31fad1b27bc5cc6befe31cd6f9319748e2683424
2020-10-05 19:55:14 +02:00
Jitendra Sharma 38ecb25ee6 Add support to query PMU counters
This change adds support to get engine active time and timestamp
from PMU interface.

Change-Id: I486dcce9fef3c7dc3f73fb8c7ea4c0bd020a6807
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-09-07 16:15:21 +02:00
mraghuwa 4b8d4285d7 add getDeviceHandle() at OS specific level
Change-Id: I95fc24043f8f603d6270323b0f23a78f9d8ad2f1
Signed-off-by: mraghuwa <mayank.raghuwanshi@intel.com>
2020-08-18 17:11:22 +02:00
Jaime Arteaga 902fc2f6c4 level-zero v1.0 (2/N)
Change-Id: I1419231a721fab210e166d26a264cae04d661dcd
Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
Signed-off-by: macabral <matias.a.cabral@intel.com>
Signed-off-by: davidoli <david.olien@intel.com>
Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@intel.com>
Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
Signed-off-by: Latif, Raiyan <raiyan.latif@intel.com>
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2020-08-03 13:11:13 +02:00
Bill Jordan 6e20dfafab Added limited XML parsing capability to L0 Sysman using libxml2.
XML parsing for linux only, hanging off the OsSysmanImp object.

Change-Id: I473dc8dde0611cc13f38a2c0b59e839fced2e59e
Signed-off-by: Bill Jordan <bill.jordan@intel.com>
2020-07-16 12:12:45 -07:00
Jitendra Sharma 146fc900c3 Add initial sysman stub as per latest spec
Change-Id: I6f36b9faa21e05a6954de0b50ea01240539441d1
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-07-11 06:54:08 +05:30
macabral e08022e9c7 Support for Platform Monitoring Technology
Add support for Platform Monitoring Technology,
and read temperature and energy counters.

Change-Id: Ic2c79e902400148cc538267c498fc1d0185c81f8
Signed-off-by: Matias Cabral <matias.a.cabral@intel.com>
2020-07-02 19:41:06 +02:00
Jitendra Sharma 251994149a Expose DRM interface to sysman APIs
Change-Id: Iab4d42cf90c9804c2b036045f3990aedd31efa91
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-06-24 16:40:49 +02:00
macabral 86105d7e77 Disable copying Linux OS sysman class
Update the Linux os class not allow copying
by usage of  NEO::NonCopyableClass.

Change-Id: Icc0d40eaa83d7a46ec0d48a5fc9deb5c57c0e3f8
Signed-off-by: macabral <matias.a.cabral@intel.com>
2020-05-26 11:37:52 -07:00
Bill Jordan 7c489ac60d Implement zetSysmanDeviceReset
Implemented function level reset.

Implementation is:
Make sure we are root (otherwise, return insufficient permissions)
Make sure no one has the device open
    (otherwise, return hande object in use)
Close our file handle
Unbind the device from the kernel driver
Make sure no one still has the device open
    (otherwise, kill them)
Perform function level reset (FLR)
Rebind the device to the kernel driver

Change-Id: Ic57b95487e73b5a5f2d03e619d813bf4199adf40
Signed-off-by: Bill Jordan <bill.jordan@intel.com>
2020-03-24 18:26:45 +01:00
Mateusz Hoppe 307a5cb822 Link tools and experimental sources to object library
Related-To: NEO-4480

Change-Id: I16da4434ec24753eabdb1bce9e38ed2e1e83ed6c
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2020-03-23 08:57:19 +01:00
Jitendra Sharma a5082656ca Remove systemCmd from sysman
Change-Id: I8821d5a9712984076264f6521a9b7fe9cac5cd8e
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
2020-03-17 17:07:14 +01:00
Brandon Fliflet 27f4bce42f Initial support for oneAPI Level Zero
Change-Id: I221df8427b1844237a4d9d900c58512706b0be0f
2020-03-06 14:53:29 +01:00