mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Dont pass drm to ioctl helper methods - use Ioctl Helper's member instead
Related-To: NEO-6999 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
28edaa9a2d
commit
e88bad79a6
@@ -32,10 +32,10 @@ void DeviceTimeDrm::timestampTypeDetect() {
|
||||
|
||||
reg.offset = (REG_GLOBAL_TIMESTAMP_LDW | 1);
|
||||
auto ioctlHelper = pDrm->getIoctlHelper();
|
||||
err = ioctlHelper->ioctl(pDrm, DrmIoctl::RegRead, ®);
|
||||
err = ioctlHelper->ioctl(DrmIoctl::RegRead, ®);
|
||||
if (err) {
|
||||
reg.offset = REG_GLOBAL_TIMESTAMP_UN;
|
||||
err = ioctlHelper->ioctl(pDrm, DrmIoctl::RegRead, ®);
|
||||
err = ioctlHelper->ioctl(DrmIoctl::RegRead, ®);
|
||||
if (err) {
|
||||
getGpuTime = &DeviceTimeDrm::getGpuTime32;
|
||||
} else {
|
||||
@@ -52,7 +52,7 @@ bool DeviceTimeDrm::getGpuTime32(uint64_t *timestamp) {
|
||||
reg.offset = REG_GLOBAL_TIMESTAMP_LDW;
|
||||
|
||||
auto ioctlHelper = pDrm->getIoctlHelper();
|
||||
if (ioctlHelper->ioctl(pDrm, DrmIoctl::RegRead, ®)) {
|
||||
if (ioctlHelper->ioctl(DrmIoctl::RegRead, ®)) {
|
||||
return false;
|
||||
}
|
||||
*timestamp = reg.value >> 32;
|
||||
@@ -65,7 +65,7 @@ bool DeviceTimeDrm::getGpuTime36(uint64_t *timestamp) {
|
||||
reg.offset = REG_GLOBAL_TIMESTAMP_LDW | 1;
|
||||
|
||||
auto ioctlHelper = pDrm->getIoctlHelper();
|
||||
if (ioctlHelper->ioctl(pDrm, DrmIoctl::RegRead, ®)) {
|
||||
if (ioctlHelper->ioctl(DrmIoctl::RegRead, ®)) {
|
||||
return false;
|
||||
}
|
||||
*timestamp = reg.value;
|
||||
@@ -82,11 +82,11 @@ bool DeviceTimeDrm::getGpuTimeSplitted(uint64_t *timestamp) {
|
||||
regLo.offset = REG_GLOBAL_TIMESTAMP_LDW;
|
||||
|
||||
auto ioctlHelper = pDrm->getIoctlHelper();
|
||||
err += ioctlHelper->ioctl(pDrm, DrmIoctl::RegRead, ®Hi);
|
||||
err += ioctlHelper->ioctl(DrmIoctl::RegRead, ®Hi);
|
||||
do {
|
||||
tmpHi = regHi.value;
|
||||
err += ioctlHelper->ioctl(pDrm, DrmIoctl::RegRead, ®Lo);
|
||||
err += ioctlHelper->ioctl(pDrm, DrmIoctl::RegRead, ®Hi);
|
||||
err += ioctlHelper->ioctl(DrmIoctl::RegRead, ®Lo);
|
||||
err += ioctlHelper->ioctl(DrmIoctl::RegRead, ®Hi);
|
||||
} while (err == 0 && regHi.value != tmpHi && --loop);
|
||||
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user