NVDRV: Further refactors and eliminate old code.
This commit is contained in:
parent
2931101e6f
commit
920429fde7
18 changed files with 12 additions and 242 deletions
|
@ -33,23 +33,6 @@ EventInterface::EventInterface(Module& module_) : module{module_}, guard{}, on_s
|
|||
|
||||
EventInterface::~EventInterface() = default;
|
||||
|
||||
void EventInterface::RegisterForSignal(Devices::nvhost_ctrl* device) {
|
||||
std::unique_lock<std::mutex> lk(guard);
|
||||
on_signal.push_back(device);
|
||||
}
|
||||
|
||||
void EventInterface::UnregisterForSignal(Devices::nvhost_ctrl* device) {
|
||||
std::unique_lock<std::mutex> lk(guard);
|
||||
on_signal.remove(device);
|
||||
}
|
||||
|
||||
void EventInterface::Signal(u32 syncpoint_id, u32 value) {
|
||||
std::unique_lock<std::mutex> lk(guard);
|
||||
for (auto* device : on_signal) {
|
||||
device->SignalNvEvent(syncpoint_id, value);
|
||||
}
|
||||
}
|
||||
|
||||
Kernel::KEvent* EventInterface::CreateEvent(std::string name) {
|
||||
Kernel::KEvent* new_event = module.service_context.CreateEvent(std::move(name));
|
||||
return new_event;
|
||||
|
@ -221,10 +204,6 @@ NvResult Module::Close(DeviceFD fd) {
|
|||
return NvResult::Success;
|
||||
}
|
||||
|
||||
void Module::SignalSyncpt(const u32 syncpoint_id, const u32 value) {
|
||||
events_interface.Signal(syncpoint_id, value);
|
||||
}
|
||||
|
||||
NvResult Module::QueryEvent(DeviceFD fd, u32 event_id, Kernel::KEvent*& event) {
|
||||
if (fd < 0) {
|
||||
LOG_ERROR(Service_NVDRV, "Invalid DeviceFD={}!", fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue