| 1 |
/* |
| 2 |
* Copyright © 2021 Collabora, Ltd. |
| 3 |
* SPDX-License-Identifier: MIT |
| 4 |
*/ |
| 5 |
|
| 6 |
#pragma once |
| 7 |
|
| 8 |
struct pan_perf; |
| 9 |
|
| 10 |
namespace pps { |
| 11 |
class PanfrostDevice { |
| 12 |
public: |
| 13 |
PanfrostDevice(int fd); |
| 14 |
~PanfrostDevice(); |
| 15 |
|
| 16 |
PanfrostDevice(const PanfrostDevice &) = delete; |
| 17 |
PanfrostDevice &operator=(const PanfrostDevice &) = delete; |
| 18 |
|
| 19 |
PanfrostDevice(PanfrostDevice &&); |
| 20 |
PanfrostDevice &operator=(PanfrostDevice &&); |
| 21 |
|
| 22 |
int fd = -1; |
| 23 |
}; |
| 24 |
|
| 25 |
class PanfrostPerf { |
| 26 |
public: |
| 27 |
PanfrostPerf(const PanfrostDevice &dev); |
| 28 |
~PanfrostPerf(); |
| 29 |
|
| 30 |
PanfrostPerf(const PanfrostPerf &) = delete; |
| 31 |
PanfrostPerf &operator=(const PanfrostPerf &) = delete; |
| 32 |
|
| 33 |
PanfrostPerf(PanfrostPerf &&); |
| 34 |
PanfrostPerf &operator=(PanfrostPerf &&); |
| 35 |
|
| 36 |
int enable() const; |
| 37 |
void disable() const; |
| 38 |
int dump() const; |
| 39 |
|
| 40 |
struct pan_perf *perf = nullptr; |
| 41 |
}; |
| 42 |
|
| 43 |
} // namespace pps |