2021-05-20 19:49:44 +02:00
|
|
|
/*
|
2024-05-24 11:50:30 +00:00
|
|
|
* Copyright (C) 2018-2024 Intel Corporation
|
2021-05-20 19:49:44 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
#include "shared/source/os_interface/os_time.h"
|
|
|
|
|
|
|
|
|
|
namespace NEO {
|
2023-01-27 12:45:12 +00:00
|
|
|
class Drm;
|
2021-05-20 19:49:44 +02:00
|
|
|
|
|
|
|
|
class DeviceTimeDrm : public DeviceTime {
|
|
|
|
|
public:
|
2023-10-18 10:00:43 +02:00
|
|
|
DeviceTimeDrm(OSInterface &osInterface);
|
|
|
|
|
bool getGpuCpuTimeImpl(TimeStampData *pGpuCpuTime, OSTime *osTime) override;
|
2021-05-20 19:49:44 +02:00
|
|
|
double getDynamicDeviceTimerResolution(HardwareInfo const &hwInfo) const override;
|
|
|
|
|
uint64_t getDynamicDeviceTimerClock(HardwareInfo const &hwInfo) const override;
|
2024-05-28 11:12:18 +00:00
|
|
|
bool isTimestampsRefreshEnabled() const override;
|
2021-05-20 19:49:44 +02:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
Drm *pDrm = nullptr;
|
2023-09-18 10:49:16 +00:00
|
|
|
|
|
|
|
|
static constexpr double nanosecondsPerSecond = 1000000000.0;
|
2021-05-20 19:49:44 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace NEO
|