Files
compute-runtime/level_zero/tools/source/sysman/windows/os_sysman_imp.h
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

29 lines
646 B
C++

/*
* Copyright (C) 2019-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "level_zero/tools/source/sysman/sysman_imp.h"
namespace L0 {
class WddmSysmanImp : public OsSysman {
public:
WddmSysmanImp(SysmanImp *pParentSysmanImp) : pParentSysmanImp(pParentSysmanImp){};
~WddmSysmanImp() override = default;
// Don't allow copies of the WddmSysmanImp object
WddmSysmanImp(const WddmSysmanImp &obj) = delete;
WddmSysmanImp &operator=(const WddmSysmanImp &obj) = delete;
ze_result_t init() override;
private:
WddmSysmanImp() = delete;
SysmanImp *pParentSysmanImp;
};
} // namespace L0