mirror of
https://github.com/intel/compute-runtime.git
synced 2025-06-28 17:58:30 +08:00

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>
29 lines
646 B
C++
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
|