mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
[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:
committed by
Compute-Runtime-Automation
parent
f7cf09d195
commit
b180a83a24
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user