mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
panfrost: Move PanfrostDevice to a separate file
Put PanfrostDevice into it's own file to keep pan_pps_perf.cpp focused on the panfrost specific producer implementation. Signed-off-by: Lukas Zapolskas <lukas.zapolskas@arm.com>
This commit is contained in:
parent
7e7d9cddc7
commit
226669227e
3 changed files with 37 additions and 20 deletions
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
pps_panfrost_sources = [
|
||||
'pan_pps_perf.cpp',
|
||||
'pan_pps_dev.cpp',
|
||||
'pan_pps_driver.cpp'
|
||||
]
|
||||
|
||||
|
|
|
|||
36
src/panfrost/ds/pan_pps_dev.cpp
Normal file
36
src/panfrost/ds/pan_pps_dev.cpp
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright © 2021 Collabora, Ltd.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "pan_pps_perf.h"
|
||||
|
||||
#include <lib/kmod/pan_kmod.h>
|
||||
#include <perf/pan_perf.h>
|
||||
|
||||
#include <pps/pps.h>
|
||||
#include <util/ralloc.h>
|
||||
|
||||
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
|
||||
|
|
@ -12,26 +12,6 @@
|
|||
#include <util/ralloc.h>
|
||||
|
||||
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<struct pan_perf *>(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue