mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
Create enum for Ioctl request values
Related-To: NEO-6852 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0bf3af37d3
commit
b3814e41b4
@@ -31,10 +31,10 @@ void DeviceTimeDrm::timestampTypeDetect() {
|
||||
return;
|
||||
|
||||
reg.offset = (REG_GLOBAL_TIMESTAMP_LDW | 1);
|
||||
err = pDrm->ioctl(DRM_IOCTL_I915_REG_READ, ®);
|
||||
err = pDrm->ioctl(DrmIoctl::RegRead, ®);
|
||||
if (err) {
|
||||
reg.offset = REG_GLOBAL_TIMESTAMP_UN;
|
||||
err = pDrm->ioctl(DRM_IOCTL_I915_REG_READ, ®);
|
||||
err = pDrm->ioctl(DrmIoctl::RegRead, ®);
|
||||
if (err) {
|
||||
getGpuTime = &DeviceTimeDrm::getGpuTime32;
|
||||
} else {
|
||||
@@ -50,7 +50,7 @@ bool DeviceTimeDrm::getGpuTime32(uint64_t *timestamp) {
|
||||
|
||||
reg.offset = REG_GLOBAL_TIMESTAMP_LDW;
|
||||
|
||||
if (pDrm->ioctl(DRM_IOCTL_I915_REG_READ, ®)) {
|
||||
if (pDrm->ioctl(DrmIoctl::RegRead, ®)) {
|
||||
return false;
|
||||
}
|
||||
*timestamp = reg.value >> 32;
|
||||
@@ -62,7 +62,7 @@ bool DeviceTimeDrm::getGpuTime36(uint64_t *timestamp) {
|
||||
|
||||
reg.offset = REG_GLOBAL_TIMESTAMP_LDW | 1;
|
||||
|
||||
if (pDrm->ioctl(DRM_IOCTL_I915_REG_READ, ®)) {
|
||||
if (pDrm->ioctl(DrmIoctl::RegRead, ®)) {
|
||||
return false;
|
||||
}
|
||||
*timestamp = reg.value;
|
||||
@@ -78,11 +78,11 @@ bool DeviceTimeDrm::getGpuTimeSplitted(uint64_t *timestamp) {
|
||||
regHi.offset = REG_GLOBAL_TIMESTAMP_UN;
|
||||
regLo.offset = REG_GLOBAL_TIMESTAMP_LDW;
|
||||
|
||||
err += pDrm->ioctl(DRM_IOCTL_I915_REG_READ, ®Hi);
|
||||
err += pDrm->ioctl(DrmIoctl::RegRead, ®Hi);
|
||||
do {
|
||||
tmpHi = regHi.value;
|
||||
err += pDrm->ioctl(DRM_IOCTL_I915_REG_READ, ®Lo);
|
||||
err += pDrm->ioctl(DRM_IOCTL_I915_REG_READ, ®Hi);
|
||||
err += pDrm->ioctl(DrmIoctl::RegRead, ®Lo);
|
||||
err += pDrm->ioctl(DrmIoctl::RegRead, ®Hi);
|
||||
} while (err == 0 && regHi.value != tmpHi && --loop);
|
||||
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user