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
This commit is contained in:
Bill Jordan
2020-09-25 14:04:02 -04:00
committed by sys_ocldev
parent a107078925
commit 909107cab6
15 changed files with 170 additions and 36 deletions

View File

@@ -35,6 +35,7 @@ struct EngineHandleContext {
~EngineHandleContext();
void init();
void releaseEngines();
ze_result_t engineGet(uint32_t *pCount, zes_engine_handle_t *phEngine);