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