This change helps in achieving the following:
- Moves the OS specific code from scheduler_imp.cpp to os specific
files.
- Frees any drm resource, including level zero's before enabling/dis
-abling Debug mode. And once Debug mode is toggled, reinitialize of
level zero occurs.
- If current mode is Debug mode and any other mode is requested by user,
then new mode will be made effective by unsetting debug mode.
Related-To: LOCI-866
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
Earlier implementation of sysman events API was based on file
creation in the filesystem. Whenever a uevent for some event
which needs to be monitored arrive, at that time a file was
created in the filesystem based on some preinstalled udev rules.
This approach was inefficient as it heavily depends over file
system and second with this approach losing events is always a
possibility.
Now with this change, we are removing our dependency over file
creation in filesystem. Rather we will be using libudev library
to monitor the uevents. This approach could also be extended,
when we want to listen to all the uevents for all the gpu
devices present in the system.
Related-To: LOCI-2140
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
hot plug interrupts need to be disabled before
issuing a warm reset. and needs to be enable after
completion of the warm reset.
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
warm reset needs to have a longer sleep duaration after remove to
ensure that the PCIe state is save and restored safely.
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
Invoking FwDeviceInit from several modules without closing
igsc device result in memory leak.
Add support to invoke FwDeviceInit only during creation of fw util
interface.
Related-To: LOCI-3204
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
Add platform check to read pmt offsets corresponding to
tile instead of root node for single tile devices.
Related-To: LOCI-2575
Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
With this change, init for sysman Engine API would not be done during zeInit.
init and thereby Engine API handle creation would be done only
when user explicitly requests to enumerate handles
using zesDeviceEnumEngineGroups
Related-To: LOCI-3127
Signed-off-by: Kulkarni, Ashwin Kumar <ashwin.kumar.kulkarni@intel.com>
With this change, init for sysman Power/Performance API would
not be done during zeInit.
init and thereby Power/Performance API handle creation would be done
only when user explicitly requests to enumerate handles
using zesDeviceEnumPowerDomains/zesDeviceEnumPerformanceFactorDomains.
Related-To: LOCI-3127
Signed-off-by: Kulkarni, Ashwin Kumar <ashwin.kumar.kulkarni@intel.com>
The distance from the SGUnit to the Root port is constant.
calculating the Rootport and Cardbus based on this observation.
the root port and card bus are used by Warmreset function to
preserve the PCI config space.
Resolves: LOCI-2899
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
the scpoe of the restorer is till the LinuxSysmanImp is deleted.
Ideally the scope of restorer needs to be function level.
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
convert the present system of calling Inc/Dec of
execution environment to a more elegant solution
Resolves: LOCI-3165
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
The following modifications were done as part of the fix
for warm reset.
1. Release sysman resources before quiscenting the GPU.
2. Add additional checks to confirm quiscenting of the GPU
before launching the diagnostics tests.
3. Fixed warm reset with wait time to allow the changes to be
propagated to the entire GPU PCI tree.
4. Modified the ULT's completely to avoid the usage of MOCKS.
5. Made Diagnostics handle creation per-device from per-SubDevice.
Related-To: LOCI-3053
Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
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>
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>
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>
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>
This change updates Temperature APIs to get correct current
temperature based on updated PMT interface.
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
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
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>
XML parsing for linux only, hanging off the OsSysmanImp object.
Change-Id: I473dc8dde0611cc13f38a2c0b59e839fced2e59e
Signed-off-by: Bill Jordan <bill.jordan@intel.com>