mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 23:24:53 +08:00
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:
@@ -30,6 +30,7 @@ class FsAccess {
|
||||
|
||||
virtual ze_result_t canRead(const std::string file);
|
||||
virtual ze_result_t canWrite(const std::string file);
|
||||
ze_result_t exists(const std::string file);
|
||||
virtual ze_result_t getFileMode(const std::string file, ::mode_t &mode);
|
||||
|
||||
virtual ze_result_t read(const std::string file, uint64_t &val);
|
||||
@@ -61,6 +62,7 @@ class ProcfsAccess : private FsAccess {
|
||||
::pid_t myProcessId();
|
||||
ze_result_t getFileDescriptors(const ::pid_t pid, std::vector<int> &list);
|
||||
ze_result_t getFileName(const ::pid_t pid, const int fd, std::string &val);
|
||||
ze_result_t isAlive(const ::pid_t pid);
|
||||
|
||||
private:
|
||||
ProcfsAccess() = default;
|
||||
|
||||
Reference in New Issue
Block a user