[Sysman] Add support to control lifetime of file descriptor

This patch adds support to open and close the drm fd,
so that more granular control of drm fd could be
achieved.

Related-To: LOCI-3986

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
Joshua Santosh Ranjan
2023-03-01 09:29:12 +00:00
committed by Compute-Runtime-Automation
parent f7cf09d195
commit b180a83a24
19 changed files with 229 additions and 28 deletions

View File

@@ -10,15 +10,8 @@
namespace NEO {
void HwDeviceIdDrm::closeFileDescriptor() {
if (fileDescriptor > 0) {
SysCalls::close(fileDescriptor);
fileDescriptor = -1;
}
}
HwDeviceIdDrm::~HwDeviceIdDrm() {
closeFileDescriptor();
SysCalls::close(fileDescriptor);
}
} // namespace NEO