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