diff --git a/src/panfrost/ds/meson.build b/src/panfrost/ds/meson.build index b61b02ee248..8f8f5ccae5d 100644 --- a/src/panfrost/ds/meson.build +++ b/src/panfrost/ds/meson.build @@ -5,6 +5,7 @@ pps_panfrost_sources = [ 'pan_pps_perf.cpp', + 'pan_pps_dev.cpp', 'pan_pps_driver.cpp' ] diff --git a/src/panfrost/ds/pan_pps_dev.cpp b/src/panfrost/ds/pan_pps_dev.cpp new file mode 100644 index 00000000000..065a9c46b7d --- /dev/null +++ b/src/panfrost/ds/pan_pps_dev.cpp @@ -0,0 +1,36 @@ +/* + * Copyright © 2021 Collabora, Ltd. + * SPDX-License-Identifier: MIT + */ + +#include "pan_pps_perf.h" + +#include +#include + +#include +#include + +namespace pps { +PanfrostDevice::PanfrostDevice(int fd): fd(fd) +{ + assert(fd >= 0); +} + +PanfrostDevice::~PanfrostDevice() +{ +} + +PanfrostDevice::PanfrostDevice(PanfrostDevice &&o): fd{o.fd} +{ + o.fd = -1; +} + +PanfrostDevice & +PanfrostDevice::operator=(PanfrostDevice &&o) +{ + std::swap(fd, o.fd); + return *this; +} + +} // namespace pps diff --git a/src/panfrost/ds/pan_pps_perf.cpp b/src/panfrost/ds/pan_pps_perf.cpp index fce1792f55f..f801779c18e 100644 --- a/src/panfrost/ds/pan_pps_perf.cpp +++ b/src/panfrost/ds/pan_pps_perf.cpp @@ -12,26 +12,6 @@ #include namespace pps { -PanfrostDevice::PanfrostDevice(int fd): fd(fd) -{ - assert(fd >= 0); -} - -PanfrostDevice::~PanfrostDevice() -{ -} - -PanfrostDevice::PanfrostDevice(PanfrostDevice &&o): fd{o.fd} -{ - o.fd = -1; -} - -PanfrostDevice & -PanfrostDevice::operator=(PanfrostDevice &&o) -{ - std::swap(fd, o.fd); - return *this; -} PanfrostPerf::PanfrostPerf(const PanfrostDevice &dev) : perf{reinterpret_cast(