summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvnflinger
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-02-19 21:05:34 +0100
committerLiam <byteslice@airmail.cc>2023-03-01 16:39:49 +0100
commit809148e1a58296ab88c9d3c6719d345f35ce0279 (patch)
tree8db1dcd33eabde75ca55ceafc6fb380d5f007e50 /src/core/hle/service/nvnflinger
parentservice: move hle_ipc from kernel (diff)
downloadyuzu-809148e1a58296ab88c9d3c6719d345f35ce0279.tar
yuzu-809148e1a58296ab88c9d3c6719d345f35ce0279.tar.gz
yuzu-809148e1a58296ab88c9d3c6719d345f35ce0279.tar.bz2
yuzu-809148e1a58296ab88c9d3c6719d345f35ce0279.tar.lz
yuzu-809148e1a58296ab88c9d3c6719d345f35ce0279.tar.xz
yuzu-809148e1a58296ab88c9d3c6719d345f35ce0279.tar.zst
yuzu-809148e1a58296ab88c9d3c6719d345f35ce0279.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nvnflinger/binder.h (renamed from src/core/hle/service/nvflinger/binder.h)0
-rw-r--r--src/core/hle/service/nvnflinger/buffer_item.h (renamed from src/core/hle/service/nvflinger/buffer_item.h)4
-rw-r--r--src/core/hle/service/nvnflinger/buffer_item_consumer.cpp (renamed from src/core/hle/service/nvflinger/buffer_item_consumer.cpp)12
-rw-r--r--src/core/hle/service/nvnflinger/buffer_item_consumer.h (renamed from src/core/hle/service/nvflinger/buffer_item_consumer.h)4
-rw-r--r--src/core/hle/service/nvnflinger/buffer_queue_consumer.cpp (renamed from src/core/hle/service/nvflinger/buffer_queue_consumer.cpp)40
-rw-r--r--src/core/hle/service/nvnflinger/buffer_queue_consumer.h (renamed from src/core/hle/service/nvflinger/buffer_queue_consumer.h)4
-rw-r--r--src/core/hle/service/nvnflinger/buffer_queue_core.cpp (renamed from src/core/hle/service/nvflinger/buffer_queue_core.cpp)4
-rw-r--r--src/core/hle/service/nvnflinger/buffer_queue_core.h (renamed from src/core/hle/service/nvflinger/buffer_queue_core.h)10
-rw-r--r--src/core/hle/service/nvnflinger/buffer_queue_defs.h (renamed from src/core/hle/service/nvflinger/buffer_queue_defs.h)2
-rw-r--r--src/core/hle/service/nvnflinger/buffer_queue_producer.cpp (renamed from src/core/hle/service/nvflinger/buffer_queue_producer.cpp)136
-rw-r--r--src/core/hle/service/nvnflinger/buffer_queue_producer.h (renamed from src/core/hle/service/nvflinger/buffer_queue_producer.h)14
-rw-r--r--src/core/hle/service/nvnflinger/buffer_slot.h (renamed from src/core/hle/service/nvflinger/buffer_slot.h)2
-rw-r--r--src/core/hle/service/nvnflinger/buffer_transform_flags.h (renamed from src/core/hle/service/nvflinger/buffer_transform_flags.h)0
-rw-r--r--src/core/hle/service/nvnflinger/consumer_base.cpp (renamed from src/core/hle/service/nvflinger/consumer_base.cpp)24
-rw-r--r--src/core/hle/service/nvnflinger/consumer_base.h (renamed from src/core/hle/service/nvflinger/consumer_base.h)6
-rw-r--r--src/core/hle/service/nvnflinger/consumer_listener.h (renamed from src/core/hle/service/nvflinger/consumer_listener.h)0
-rw-r--r--src/core/hle/service/nvnflinger/graphic_buffer_producer.cpp (renamed from src/core/hle/service/nvflinger/graphic_buffer_producer.cpp)4
-rw-r--r--src/core/hle/service/nvnflinger/graphic_buffer_producer.h (renamed from src/core/hle/service/nvflinger/graphic_buffer_producer.h)4
-rw-r--r--src/core/hle/service/nvnflinger/hos_binder_driver_server.cpp (renamed from src/core/hle/service/nvflinger/hos_binder_driver_server.cpp)6
-rw-r--r--src/core/hle/service/nvnflinger/hos_binder_driver_server.h (renamed from src/core/hle/service/nvflinger/hos_binder_driver_server.h)6
-rw-r--r--src/core/hle/service/nvnflinger/nvnflinger.cpp (renamed from src/core/hle/service/nvflinger/nvflinger.cpp)58
-rw-r--r--src/core/hle/service/nvnflinger/nvnflinger.h (renamed from src/core/hle/service/nvflinger/nvflinger.h)10
-rw-r--r--src/core/hle/service/nvnflinger/parcel.h (renamed from src/core/hle/service/nvflinger/parcel.h)0
-rw-r--r--src/core/hle/service/nvnflinger/pixel_format.h (renamed from src/core/hle/service/nvflinger/pixel_format.h)0
-rw-r--r--src/core/hle/service/nvnflinger/producer_listener.h (renamed from src/core/hle/service/nvflinger/producer_listener.h)0
-rw-r--r--src/core/hle/service/nvnflinger/status.h (renamed from src/core/hle/service/nvflinger/status.h)0
-rw-r--r--src/core/hle/service/nvnflinger/ui/fence.h (renamed from src/core/hle/service/nvflinger/ui/fence.h)0
-rw-r--r--src/core/hle/service/nvnflinger/ui/graphic_buffer.h (renamed from src/core/hle/service/nvflinger/ui/graphic_buffer.h)2
-rw-r--r--src/core/hle/service/nvnflinger/window.h (renamed from src/core/hle/service/nvflinger/window.h)0
29 files changed, 176 insertions, 176 deletions
diff --git a/src/core/hle/service/nvflinger/binder.h b/src/core/hle/service/nvnflinger/binder.h
index aef1477e3..aef1477e3 100644
--- a/src/core/hle/service/nvflinger/binder.h
+++ b/src/core/hle/service/nvnflinger/binder.h
diff --git a/src/core/hle/service/nvflinger/buffer_item.h b/src/core/hle/service/nvnflinger/buffer_item.h
index f73dec4f1..7fd808f54 100644
--- a/src/core/hle/service/nvflinger/buffer_item.h
+++ b/src/core/hle/service/nvnflinger/buffer_item.h
@@ -10,8 +10,8 @@
#include "common/common_types.h"
#include "common/math_util.h"
-#include "core/hle/service/nvflinger/ui/fence.h"
-#include "core/hle/service/nvflinger/window.h"
+#include "core/hle/service/nvnflinger/ui/fence.h"
+#include "core/hle/service/nvnflinger/window.h"
namespace Service::android {
diff --git a/src/core/hle/service/nvflinger/buffer_item_consumer.cpp b/src/core/hle/service/nvnflinger/buffer_item_consumer.cpp
index 152bb5bdf..cf151ea3a 100644
--- a/src/core/hle/service/nvflinger/buffer_item_consumer.cpp
+++ b/src/core/hle/service/nvnflinger/buffer_item_consumer.cpp
@@ -6,9 +6,9 @@
#include "common/assert.h"
#include "common/logging/log.h"
-#include "core/hle/service/nvflinger/buffer_item.h"
-#include "core/hle/service/nvflinger/buffer_item_consumer.h"
-#include "core/hle/service/nvflinger/buffer_queue_consumer.h"
+#include "core/hle/service/nvnflinger/buffer_item.h"
+#include "core/hle/service/nvnflinger/buffer_item_consumer.h"
+#include "core/hle/service/nvnflinger/buffer_queue_consumer.h"
namespace Service::android {
@@ -25,7 +25,7 @@ Status BufferItemConsumer::AcquireBuffer(BufferItem* item, std::chrono::nanoseco
if (const auto status = AcquireBufferLocked(item, present_when); status != Status::NoError) {
if (status != Status::NoBufferAvailable) {
- LOG_ERROR(Service_NVFlinger, "Failed to acquire buffer: {}", status);
+ LOG_ERROR(Service_Nvnflinger, "Failed to acquire buffer: {}", status);
}
return status;
}
@@ -44,12 +44,12 @@ Status BufferItemConsumer::ReleaseBuffer(const BufferItem& item, const Fence& re
if (const auto status = AddReleaseFenceLocked(item.buf, item.graphic_buffer, release_fence);
status != Status::NoError) {
- LOG_ERROR(Service_NVFlinger, "Failed to add fence: {}", status);
+ LOG_ERROR(Service_Nvnflinger, "Failed to add fence: {}", status);
}
if (const auto status = ReleaseBufferLocked(item.buf, item.graphic_buffer);
status != Status::NoError) {
- LOG_WARNING(Service_NVFlinger, "Failed to release buffer: {}", status);
+ LOG_WARNING(Service_Nvnflinger, "Failed to release buffer: {}", status);
return status;
}
diff --git a/src/core/hle/service/nvflinger/buffer_item_consumer.h b/src/core/hle/service/nvnflinger/buffer_item_consumer.h
index a5c655d9e..e0c6b3604 100644
--- a/src/core/hle/service/nvflinger/buffer_item_consumer.h
+++ b/src/core/hle/service/nvnflinger/buffer_item_consumer.h
@@ -10,8 +10,8 @@
#include <memory>
#include "common/common_types.h"
-#include "core/hle/service/nvflinger/consumer_base.h"
-#include "core/hle/service/nvflinger/status.h"
+#include "core/hle/service/nvnflinger/consumer_base.h"
+#include "core/hle/service/nvnflinger/status.h"
namespace Service::android {
diff --git a/src/core/hle/service/nvflinger/buffer_queue_consumer.cpp b/src/core/hle/service/nvnflinger/buffer_queue_consumer.cpp
index 0767e548d..51291539d 100644
--- a/src/core/hle/service/nvflinger/buffer_queue_consumer.cpp
+++ b/src/core/hle/service/nvnflinger/buffer_queue_consumer.cpp
@@ -6,11 +6,11 @@
#include "common/logging/log.h"
#include "core/hle/service/nvdrv/core/nvmap.h"
-#include "core/hle/service/nvflinger/buffer_item.h"
-#include "core/hle/service/nvflinger/buffer_queue_consumer.h"
-#include "core/hle/service/nvflinger/buffer_queue_core.h"
-#include "core/hle/service/nvflinger/producer_listener.h"
-#include "core/hle/service/nvflinger/ui/graphic_buffer.h"
+#include "core/hle/service/nvnflinger/buffer_item.h"
+#include "core/hle/service/nvnflinger/buffer_queue_consumer.h"
+#include "core/hle/service/nvnflinger/buffer_queue_core.h"
+#include "core/hle/service/nvnflinger/producer_listener.h"
+#include "core/hle/service/nvnflinger/ui/graphic_buffer.h"
namespace Service::android {
@@ -31,7 +31,7 @@ Status BufferQueueConsumer::AcquireBuffer(BufferItem* out_buffer,
}))};
if (num_acquired_buffers >= core->max_acquired_buffer_count + 1) {
- LOG_ERROR(Service_NVFlinger, "max acquired buffer count reached: {} (max {})",
+ LOG_ERROR(Service_Nvnflinger, "max acquired buffer count reached: {} (max {})",
num_acquired_buffers, core->max_acquired_buffer_count);
return Status::InvalidOperation;
}
@@ -57,12 +57,12 @@ Status BufferQueueConsumer::AcquireBuffer(BufferItem* out_buffer,
if (desired_present < expected_present.count() - MAX_REASONABLE_NSEC ||
desired_present > expected_present.count()) {
// This buffer is set to display in the near future, or desired_present is garbage.
- LOG_DEBUG(Service_NVFlinger, "nodrop desire={} expect={}", desired_present,
+ LOG_DEBUG(Service_Nvnflinger, "nodrop desire={} expect={}", desired_present,
expected_present.count());
break;
}
- LOG_DEBUG(Service_NVFlinger, "drop desire={} expect={} size={}", desired_present,
+ LOG_DEBUG(Service_Nvnflinger, "drop desire={} expect={} size={}", desired_present,
expected_present.count(), core->queue.size());
if (core->StillTracking(*front)) {
@@ -78,19 +78,19 @@ Status BufferQueueConsumer::AcquireBuffer(BufferItem* out_buffer,
const auto desired_present = front->timestamp;
if (desired_present > expected_present.count() &&
desired_present < expected_present.count() + MAX_REASONABLE_NSEC) {
- LOG_DEBUG(Service_NVFlinger, "defer desire={} expect={}", desired_present,
+ LOG_DEBUG(Service_Nvnflinger, "defer desire={} expect={}", desired_present,
expected_present.count());
return Status::PresentLater;
}
- LOG_DEBUG(Service_NVFlinger, "accept desire={} expect={}", desired_present,
+ LOG_DEBUG(Service_Nvnflinger, "accept desire={} expect={}", desired_present,
expected_present.count());
}
const auto slot = front->slot;
*out_buffer = *front;
- LOG_DEBUG(Service_NVFlinger, "acquiring slot={}", slot);
+ LOG_DEBUG(Service_Nvnflinger, "acquiring slot={}", slot);
// If the buffer has previously been acquired by the consumer, set graphic_buffer to nullptr to
// avoid unnecessarily remapping this buffer on the consumer side.
@@ -109,7 +109,7 @@ Status BufferQueueConsumer::AcquireBuffer(BufferItem* out_buffer,
Status BufferQueueConsumer::ReleaseBuffer(s32 slot, u64 frame_number, const Fence& release_fence) {
if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) {
- LOG_ERROR(Service_NVFlinger, "slot {} out of range", slot);
+ LOG_ERROR(Service_Nvnflinger, "slot {} out of range", slot);
return Status::BadValue;
}
@@ -127,7 +127,7 @@ Status BufferQueueConsumer::ReleaseBuffer(s32 slot, u64 frame_number, const Fenc
auto current(core->queue.begin());
while (current != core->queue.end()) {
if (current->slot == slot) {
- LOG_ERROR(Service_NVFlinger, "buffer slot {} pending release is currently queued",
+ LOG_ERROR(Service_Nvnflinger, "buffer slot {} pending release is currently queued",
slot);
return Status::BadValue;
}
@@ -140,7 +140,7 @@ Status BufferQueueConsumer::ReleaseBuffer(s32 slot, u64 frame_number, const Fenc
listener = core->connected_producer_listener;
- LOG_DEBUG(Service_NVFlinger, "releasing slot {}", slot);
+ LOG_DEBUG(Service_Nvnflinger, "releasing slot {}", slot);
core->SignalDequeueCondition();
}
@@ -156,16 +156,16 @@ Status BufferQueueConsumer::ReleaseBuffer(s32 slot, u64 frame_number, const Fenc
Status BufferQueueConsumer::Connect(std::shared_ptr<IConsumerListener> consumer_listener,
bool controlled_by_app) {
if (consumer_listener == nullptr) {
- LOG_ERROR(Service_NVFlinger, "consumer_listener may not be nullptr");
+ LOG_ERROR(Service_Nvnflinger, "consumer_listener may not be nullptr");
return Status::BadValue;
}
- LOG_DEBUG(Service_NVFlinger, "controlled_by_app={}", controlled_by_app);
+ LOG_DEBUG(Service_Nvnflinger, "controlled_by_app={}", controlled_by_app);
std::scoped_lock lock{core->mutex};
if (core->is_abandoned) {
- LOG_ERROR(Service_NVFlinger, "BufferQueue has been abandoned");
+ LOG_ERROR(Service_Nvnflinger, "BufferQueue has been abandoned");
return Status::NoInit;
}
@@ -177,14 +177,14 @@ Status BufferQueueConsumer::Connect(std::shared_ptr<IConsumerListener> consumer_
Status BufferQueueConsumer::GetReleasedBuffers(u64* out_slot_mask) {
if (out_slot_mask == nullptr) {
- LOG_ERROR(Service_NVFlinger, "out_slot_mask may not be nullptr");
+ LOG_ERROR(Service_Nvnflinger, "out_slot_mask may not be nullptr");
return Status::BadValue;
}
std::scoped_lock lock{core->mutex};
if (core->is_abandoned) {
- LOG_ERROR(Service_NVFlinger, "BufferQueue has been abandoned");
+ LOG_ERROR(Service_Nvnflinger, "BufferQueue has been abandoned");
return Status::NoInit;
}
@@ -205,7 +205,7 @@ Status BufferQueueConsumer::GetReleasedBuffers(u64* out_slot_mask) {
++current;
}
- LOG_DEBUG(Service_NVFlinger, "returning mask {}", mask);
+ LOG_DEBUG(Service_Nvnflinger, "returning mask {}", mask);
*out_slot_mask = mask;
return Status::NoError;
}
diff --git a/src/core/hle/service/nvflinger/buffer_queue_consumer.h b/src/core/hle/service/nvnflinger/buffer_queue_consumer.h
index 4ec06ca13..50ed0bb5f 100644
--- a/src/core/hle/service/nvflinger/buffer_queue_consumer.h
+++ b/src/core/hle/service/nvnflinger/buffer_queue_consumer.h
@@ -10,8 +10,8 @@
#include <memory>
#include "common/common_types.h"
-#include "core/hle/service/nvflinger/buffer_queue_defs.h"
-#include "core/hle/service/nvflinger/status.h"
+#include "core/hle/service/nvnflinger/buffer_queue_defs.h"
+#include "core/hle/service/nvnflinger/status.h"
namespace Service::Nvidia::NvCore {
class NvMap;
diff --git a/src/core/hle/service/nvflinger/buffer_queue_core.cpp b/src/core/hle/service/nvnflinger/buffer_queue_core.cpp
index 3d1338e66..2dbe29616 100644
--- a/src/core/hle/service/nvflinger/buffer_queue_core.cpp
+++ b/src/core/hle/service/nvnflinger/buffer_queue_core.cpp
@@ -6,7 +6,7 @@
#include "common/assert.h"
-#include "core/hle/service/nvflinger/buffer_queue_core.h"
+#include "core/hle/service/nvnflinger/buffer_queue_core.h"
namespace Service::android {
@@ -82,7 +82,7 @@ s32 BufferQueueCore::GetPreallocatedBufferCountLocked() const {
}
void BufferQueueCore::FreeBufferLocked(s32 slot) {
- LOG_DEBUG(Service_NVFlinger, "slot {}", slot);
+ LOG_DEBUG(Service_Nvnflinger, "slot {}", slot);
slots[slot].graphic_buffer.reset();
diff --git a/src/core/hle/service/nvflinger/buffer_queue_core.h b/src/core/hle/service/nvnflinger/buffer_queue_core.h
index 85b3bc4c1..9164f08a0 100644
--- a/src/core/hle/service/nvflinger/buffer_queue_core.h
+++ b/src/core/hle/service/nvnflinger/buffer_queue_core.h
@@ -13,11 +13,11 @@
#include <set>
#include <vector>
-#include "core/hle/service/nvflinger/buffer_item.h"
-#include "core/hle/service/nvflinger/buffer_queue_defs.h"
-#include "core/hle/service/nvflinger/pixel_format.h"
-#include "core/hle/service/nvflinger/status.h"
-#include "core/hle/service/nvflinger/window.h"
+#include "core/hle/service/nvnflinger/buffer_item.h"
+#include "core/hle/service/nvnflinger/buffer_queue_defs.h"
+#include "core/hle/service/nvnflinger/pixel_format.h"
+#include "core/hle/service/nvnflinger/status.h"
+#include "core/hle/service/nvnflinger/window.h"
namespace Service::android {
diff --git a/src/core/hle/service/nvflinger/buffer_queue_defs.h b/src/core/hle/service/nvnflinger/buffer_queue_defs.h
index 334445213..6fd3156f4 100644
--- a/src/core/hle/service/nvflinger/buffer_queue_defs.h
+++ b/src/core/hle/service/nvnflinger/buffer_queue_defs.h
@@ -9,7 +9,7 @@
#include <array>
#include "common/common_types.h"
-#include "core/hle/service/nvflinger/buffer_slot.h"
+#include "core/hle/service/nvnflinger/buffer_slot.h"
namespace Service::android::BufferQueueDefs {
diff --git a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp b/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp
index ad73edd66..cd0a13094 100644
--- a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp
+++ b/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp
@@ -14,12 +14,12 @@
#include "core/hle/service/hle_ipc.h"
#include "core/hle/service/kernel_helpers.h"
#include "core/hle/service/nvdrv/core/nvmap.h"
-#include "core/hle/service/nvflinger/buffer_queue_core.h"
-#include "core/hle/service/nvflinger/buffer_queue_producer.h"
-#include "core/hle/service/nvflinger/consumer_listener.h"
-#include "core/hle/service/nvflinger/parcel.h"
-#include "core/hle/service/nvflinger/ui/graphic_buffer.h"
-#include "core/hle/service/nvflinger/window.h"
+#include "core/hle/service/nvnflinger/buffer_queue_core.h"
+#include "core/hle/service/nvnflinger/buffer_queue_producer.h"
+#include "core/hle/service/nvnflinger/consumer_listener.h"
+#include "core/hle/service/nvnflinger/parcel.h"
+#include "core/hle/service/nvnflinger/ui/graphic_buffer.h"
+#include "core/hle/service/nvnflinger/window.h"
#include "core/hle/service/vi/vi.h"
namespace Service::android {
@@ -37,20 +37,20 @@ BufferQueueProducer::~BufferQueueProducer() {
}
Status BufferQueueProducer::RequestBuffer(s32 slot, std::shared_ptr<GraphicBuffer>* buf) {
- LOG_DEBUG(Service_NVFlinger, "slot {}", slot);
+ LOG_DEBUG(Service_Nvnflinger, "slot {}", slot);
std::scoped_lock lock{core->mutex};
if (core->is_abandoned) {
- LOG_ERROR(Service_NVFlinger, "BufferQueue has been abandoned");
+ LOG_ERROR(Service_Nvnflinger, "BufferQueue has been abandoned");
return Status::NoInit;
}
if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) {
- LOG_ERROR(Service_NVFlinger, "slot index {} out of range [0, {})", slot,
+ LOG_ERROR(Service_Nvnflinger, "slot index {} out of range [0, {})", slot,
BufferQueueDefs::NUM_BUFFER_SLOTS);
return Status::BadValue;
} else if (slots[slot].buffer_state != BufferState::Dequeued) {
- LOG_ERROR(Service_NVFlinger, "slot {} is not owned by the producer (state = {})", slot,
+ LOG_ERROR(Service_Nvnflinger, "slot {} is not owned by the producer (state = {})", slot,
slots[slot].buffer_state);
return Status::BadValue;
}
@@ -62,7 +62,7 @@ Status BufferQueueProducer::RequestBuffer(s32 slot, std::shared_ptr<GraphicBuffe
}
Status BufferQueueProducer::SetBufferCount(s32 buffer_count) {
- LOG_DEBUG(Service_NVFlinger, "count = {}", buffer_count);
+ LOG_DEBUG(Service_Nvnflinger, "count = {}", buffer_count);
std::shared_ptr<IConsumerListener> listener;
{
@@ -70,12 +70,12 @@ Status BufferQueueProducer::SetBufferCount(s32 buffer_count) {
core->WaitWhileAllocatingLocked();
if (core->is_abandoned) {
- LOG_ERROR(Service_NVFlinger, "BufferQueue has been abandoned");
+ LOG_ERROR(Service_Nvnflinger, "BufferQueue has been abandoned");
return Status::NoInit;
}
if (buffer_count > BufferQueueDefs::NUM_BUFFER_SLOTS) {
- LOG_ERROR(Service_NVFlinger, "buffer_count {} too large (max {})", buffer_count,
+ LOG_ERROR(Service_Nvnflinger, "buffer_count {} too large (max {})", buffer_count,
BufferQueueDefs::NUM_BUFFER_SLOTS);
return Status::BadValue;
}
@@ -83,7 +83,7 @@ Status BufferQueueProducer::SetBufferCount(s32 buffer_count) {
// There must be no dequeued buffers when changing the buffer count.
for (s32 s{}; s < BufferQueueDefs::NUM_BUFFER_SLOTS; ++s) {
if (slots[s].buffer_state == BufferState::Dequeued) {
- LOG_ERROR(Service_NVFlinger, "buffer owned by producer");
+ LOG_ERROR(Service_Nvnflinger, "buffer owned by producer");
return Status::BadValue;
}
}
@@ -96,7 +96,7 @@ Status BufferQueueProducer::SetBufferCount(s32 buffer_count) {
const s32 min_buffer_slots = core->GetMinMaxBufferCountLocked(false);
if (buffer_count < min_buffer_slots) {
- LOG_ERROR(Service_NVFlinger, "requested buffer count {} is less than minimum {}",
+ LOG_ERROR(Service_Nvnflinger, "requested buffer count {} is less than minimum {}",
buffer_count, min_buffer_slots);
return Status::BadValue;
}
@@ -127,14 +127,14 @@ Status BufferQueueProducer::WaitForFreeSlotThenRelock(bool async, s32* found, St
while (try_again) {
if (core->is_abandoned) {
- LOG_ERROR(Service_NVFlinger, "BufferQueue has been abandoned");
+ LOG_ERROR(Service_Nvnflinger, "BufferQueue has been abandoned");
return Status::NoInit;
}
const s32 max_buffer_count = core->GetMaxBufferCountLocked(async);
if (async && core->override_max_buffer_count) {
if (core->override_max_buffer_count < max_buffer_count) {
- LOG_ERROR(Service_NVFlinger, "async mode is invalid with buffer count override");
+ LOG_ERROR(Service_Nvnflinger, "async mode is invalid with buffer count override");
return Status::BadValue;
}
}
@@ -176,7 +176,7 @@ Status BufferQueueProducer::WaitForFreeSlotThenRelock(bool async, s32* found, St
// Producers are not allowed to dequeue more than one buffer if they did not set a buffer
// count
if (!core->override_max_buffer_count && dequeued_count) {
- LOG_ERROR(Service_NVFlinger,
+ LOG_ERROR(Service_Nvnflinger,
"can't dequeue multiple buffers without setting the buffer count");
return Status::InvalidOperation;
}
@@ -188,7 +188,7 @@ Status BufferQueueProducer::WaitForFreeSlotThenRelock(bool async, s32* found, St
const s32 new_undequeued_count = max_buffer_count - (dequeued_count + 1);
const s32 min_undequeued_count = core->GetMinUndequeuedBufferCountLocked(async);
if (new_undequeued_count < min_undequeued_count) {
- LOG_ERROR(Service_NVFlinger,
+ LOG_ERROR(Service_Nvnflinger,
"min undequeued buffer count({}) exceeded (dequeued={} undequeued={})",
min_undequeued_count, dequeued_count, new_undequeued_count);
return Status::InvalidOperation;
@@ -200,7 +200,7 @@ Status BufferQueueProducer::WaitForFreeSlotThenRelock(bool async, s32* found, St
// outrun the consumer. Wait here if it looks like we have too many buffers queued up.
const bool too_many_buffers = core->queue.size() > static_cast<size_t>(max_buffer_count);
if (too_many_buffers) {
- LOG_ERROR(Service_NVFlinger, "queue size is {}, waiting", core->queue.size());
+ LOG_ERROR(Service_Nvnflinger, "queue size is {}, waiting", core->queue.size());
}
// If no buffer is found, or if the queue has too many buffers outstanding, wait for a
@@ -226,11 +226,11 @@ Status BufferQueueProducer::WaitForFreeSlotThenRelock(bool async, s32* found, St
Status BufferQueueProducer::DequeueBuffer(s32* out_slot, Fence* out_fence, bool async, u32 width,
u32 height, PixelFormat format, u32 usage) {
- LOG_DEBUG(Service_NVFlinger, "async={} w={} h={} format={}, usage={}", async ? "true" : "false",
- width, height, format, usage);
+ LOG_DEBUG(Service_Nvnflinger, "async={} w={} h={} format={}, usage={}",
+ async ? "true" : "false", width, height, format, usage);
if ((width != 0 && height == 0) || (width == 0 && height != 0)) {
- LOG_ERROR(Service_NVFlinger, "invalid size: w={} h={}", width, height);
+ LOG_ERROR(Service_Nvnflinger, "invalid size: w={} h={}", width, height);
return Status::BadValue;
}
@@ -255,7 +255,7 @@ Status BufferQueueProducer::DequeueBuffer(s32* out_slot, Fence* out_fence, bool
// This should not happen
if (found == BufferQueueCore::INVALID_BUFFER_SLOT) {
- LOG_ERROR(Service_NVFlinger, "no available buffer slots");
+ LOG_ERROR(Service_Nvnflinger, "no available buffer slots");
return Status::Busy;
}
@@ -287,11 +287,11 @@ Status BufferQueueProducer::DequeueBuffer(s32* out_slot, Fence* out_fence, bool
}
if ((return_flags & Status::BufferNeedsReallocation) != Status::None) {
- LOG_DEBUG(Service_NVFlinger, "allocating a new buffer for slot {}", *out_slot);
+ LOG_DEBUG(Service_Nvnflinger, "allocating a new buffer for slot {}", *out_slot);
auto graphic_buffer = std::make_shared<GraphicBuffer>(width, height, format, usage);
if (graphic_buffer == nullptr) {
- LOG_ERROR(Service_NVFlinger, "creating GraphicBuffer failed");
+ LOG_ERROR(Service_Nvnflinger, "creating GraphicBuffer failed");
return Status::NoMemory;
}
@@ -299,7 +299,7 @@ Status BufferQueueProducer::DequeueBuffer(s32* out_slot, Fence* out_fence, bool
std::scoped_lock lock{core->mutex};
if (core->is_abandoned) {
- LOG_ERROR(Service_NVFlinger, "BufferQueue has been abandoned");
+ LOG_ERROR(Service_Nvnflinger, "BufferQueue has been abandoned");
return Status::NoInit;
}
@@ -312,32 +312,32 @@ Status BufferQueueProducer::DequeueBuffer(s32* out_slot, Fence* out_fence, bool
return_flags |= Status::BufferNeedsReallocation;
}
- LOG_DEBUG(Service_NVFlinger, "returning slot={} frame={}, flags={}", *out_slot,
+ LOG_DEBUG(Service_Nvnflinger, "returning slot={} frame={}, flags={}", *out_slot,
slots[*out_slot].frame_number, return_flags);
return return_flags;
}
Status BufferQueueProducer::DetachBuffer(s32 slot) {
- LOG_DEBUG(Service_NVFlinger, "slot {}", slot);
+ LOG_DEBUG(Service_Nvnflinger, "slot {}", slot);
std::scoped_lock lock{core->mutex};
if (core->is_abandoned) {
- LOG_ERROR(Service_NVFlinger, "BufferQueue has been abandoned");
+ LOG_ERROR(Service_Nvnflinger, "BufferQueue has been abandoned");
return Status::NoInit;
}
if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) {
- LOG_ERROR(Service_NVFlinger, "slot {} out of range [0, {})", slot,
+ LOG_ERROR(Service_Nvnflinger, "slot {} out of range [0, {})", slot,
BufferQueueDefs::NUM_BUFFER_SLOTS);
return Status::BadValue;
} else if (slots[slot].buffer_state != BufferState::Dequeued) {
- LOG_ERROR(Service_NVFlinger, "slot {} is not owned by the producer (state = {})", slot,
+ LOG_ERROR(Service_Nvnflinger, "slot {} is not owned by the producer (state = {})", slot,
slots[slot].buffer_state);
return Status::BadValue;
} else if (!slots[slot].request_buffer_called) {
- LOG_ERROR(Service_NVFlinger, "buffer in slot {} has not been requested", slot);
+ LOG_ERROR(Service_Nvnflinger, "buffer in slot {} has not been requested", slot);
return Status::BadValue;
}
@@ -350,10 +350,10 @@ Status BufferQueueProducer::DetachBuffer(s32 slot) {
Status BufferQueueProducer::DetachNextBuffer(std::shared_ptr<GraphicBuffer>* out_buffer,
Fence* out_fence) {
if (out_buffer == nullptr) {
- LOG_ERROR(Service_NVFlinger, "out_buffer must not be nullptr");
+ LOG_ERROR(Service_Nvnflinger, "out_buffer must not be nullptr");
return Status::BadValue;
} else if (out_fence == nullptr) {
- LOG_ERROR(Service_NVFlinger, "out_fence must not be nullptr");
+ LOG_ERROR(Service_Nvnflinger, "out_fence must not be nullptr");
return Status::BadValue;
}
@@ -361,7 +361,7 @@ Status BufferQueueProducer::DetachNextBuffer(std::shared_ptr<GraphicBuffer>* out
core->WaitWhileAllocatingLocked();
if (core->is_abandoned) {
- LOG_ERROR(Service_NVFlinger, "BufferQueue has been abandoned");
+ LOG_ERROR(Service_Nvnflinger, "BufferQueue has been abandoned");
return Status::NoInit;
}
@@ -380,7 +380,7 @@ Status BufferQueueProducer::DetachNextBuffer(std::shared_ptr<GraphicBuffer>* out
return Status::NoMemory;
}
- LOG_DEBUG(Service_NVFlinger, "Detached slot {}", found);
+ LOG_DEBUG(Service_Nvnflinger, "Detached slot {}", found);
*out_buffer = slots[found].graphic_buffer;
*out_fence = slots[found].fence;
@@ -393,10 +393,10 @@ Status BufferQueueProducer::DetachNextBuffer(std::shared_ptr<GraphicBuffer>* out
Status BufferQueueProducer::AttachBuffer(s32* out_slot,
const std::shared_ptr<GraphicBuffer>& buffer) {
if (out_slot == nullptr) {
- LOG_ERROR(Service_NVFlinger, "out_slot must not be nullptr");
+ LOG_ERROR(Service_Nvnflinger, "out_slot must not be nullptr");
return Status::BadValue;
} else if (buffer == nullptr) {
- LOG_ERROR(Service_NVFlinger, "Cannot attach nullptr buffer");
+ LOG_ERROR(Service_Nvnflinger, "Cannot attach nullptr buffer");
return Status::BadValue;
}
@@ -413,13 +413,13 @@ Status BufferQueueProducer::AttachBuffer(s32* out_slot,
// This should not happen
if (found == BufferQueueCore::INVALID_BUFFER_SLOT) {
- LOG_ERROR(Service_NVFlinger, "No available buffer slots");
+ LOG_ERROR(Service_Nvnflinger, "No available buffer slots");
return Status::Busy;
}
*out_slot = found;
- LOG_DEBUG(Service_NVFlinger, "Returning slot {} flags={}", *out_slot, return_flags);
+ LOG_DEBUG(Service_Nvnflinger, "Returning slot {} flags={}", *out_slot, return_flags);
slots[*out_slot].graphic_buffer = buffer;
slots[*out_slot].buffer_state = BufferState::Dequeued;
@@ -451,7 +451,7 @@ Status BufferQueueProducer::QueueBuffer(s32 slot, const QueueBufferInput& input,
case NativeWindowScalingMode::NoScaleCrop:
break;
default:
- LOG_ERROR(Service_NVFlinger, "unknown scaling mode {}", scaling_mode);
+ LOG_ERROR(Service_Nvnflinger, "unknown scaling mode {}", scaling_mode);
return Status::BadValue;
}
@@ -464,38 +464,38 @@ Status BufferQueueProducer::QueueBuffer(s32 slot, const QueueBufferInput& input,
std::scoped_lock lock{core->mutex};
if (core->is_abandoned) {
- LOG_ERROR(Service_NVFlinger, "BufferQueue has been abandoned");
+ LOG_ERROR(Service_Nvnflinger, "BufferQueue has been abandoned");
return Status::NoInit;
}
const s32 max_buffer_count = core->GetMaxBufferCountLocked(async);
if (async && core->override_max_buffer_count) {
if (core->override_max_buffer_count < max_buffer_count) {
- LOG_ERROR(Service_NVFlinger, "async mode is invalid with "
- "buffer count override");
+ LOG_ERROR(Service_Nvnflinger, "async mode is invalid with "
+ "buffer count override");
return Status::BadValue;
}
}
if (slot < 0 || slot >= max_buffer_count) {
- LOG_ERROR(Service_NVFlinger, "slot index {} out of range [0, {})", slot,
+ LOG_ERROR(Service_Nvnflinger, "slot index {} out of range [0, {})", slot,
max_buffer_count);
return Status::BadValue;
} else if (slots[slot].buffer_state != BufferState::Dequeued) {
- LOG_ERROR(Service_NVFlinger,
+ LOG_ERROR(Service_Nvnflinger,
"slot {} is not owned by the producer "
"(state = {})",
slot, slots[slot].buffer_state);
return Status::BadValue;
} else if (!slots[slot].request_buffer_called) {
- LOG_ERROR(Service_NVFlinger,
+ LOG_ERROR(Service_Nvnflinger,
"slot {} was queued without requesting "
"a buffer",
slot);
return Status::BadValue;
}
- LOG_DEBUG(Service_NVFlinger,
+ LOG_DEBUG(Service_Nvnflinger,
"slot={} frame={} time={} crop=[{},{},{},{}] transform={} scale={}", slot,
core->frame_counter + 1, timestamp, crop.Left(), crop.Top(), crop.Right(),
crop.Bottom(), transform, scaling_mode);
@@ -506,7 +506,7 @@ Status BufferQueueProducer::QueueBuffer(s32 slot, const QueueBufferInput& input,
[[maybe_unused]] const bool unused = crop.Intersect(buffer_rect, &cropped_rect);
if (cropped_rect != crop) {
- LOG_ERROR(Service_NVFlinger, "crop rect is not contained within the buffer in slot {}",
+ LOG_ERROR(Service_Nvnflinger, "crop rect is not contained within the buffer in slot {}",
slot);
return Status::BadValue;
}
@@ -598,21 +598,21 @@ Status BufferQueueProducer::QueueBuffer(s32 slot, const QueueBufferInput& input,
}
void BufferQueueProducer::CancelBuffer(s32 slot, const Fence& fence) {
- LOG_DEBUG(Service_NVFlinger, "slot {}", slot);
+ LOG_DEBUG(Service_Nvnflinger, "slot {}", slot);
std::scoped_lock lock{core->mutex};
if (core->is_abandoned) {
- LOG_ERROR(Service_NVFlinger, "BufferQueue has been abandoned");
+ LOG_ERROR(Service_Nvnflinger, "BufferQueue has been abandoned");
return;
}
if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) {
- LOG_ERROR(Service_NVFlinger, "slot index {} out of range [0, {})", slot,
+ LOG_ERROR(Service_Nvnflinger, "slot index {} out of range [0, {})", slot,
BufferQueueDefs::NUM_BUFFER_SLOTS);
return;
} else if (slots[slot].buffer_state != BufferState::Dequeued) {
- LOG_ERROR(Service_NVFlinger, "slot {} is not owned by the producer (state = {})", slot,
+ LOG_ERROR(Service_Nvnflinger, "slot {} is not owned by the producer (state = {})", slot,
slots[slot].buffer_state);
return;
}
@@ -629,12 +629,12 @@ Status BufferQueueProducer::Query(NativeWindow what, s32* out_value) {
std::scoped_lock lock{core->mutex};
if (out_value == nullptr) {
- LOG_ERROR(Service_NVFlinger, "outValue was nullptr");
+ LOG_ERROR(Service_Nvnflinger, "outValue was nullptr");
return Status::BadValue;
}
if (core->is_abandoned) {
- LOG_ERROR(Service_NVFlinger, "BufferQueue has been abandoned");
+ LOG_ERROR(Service_Nvnflinger, "BufferQueue has been abandoned");
return Status::NoInit;
}
@@ -666,7 +666,7 @@ Status BufferQueueProducer::Query(NativeWindow what, s32* out_value) {
return Status::BadValue;
}
- LOG_DEBUG(Service_NVFlinger, "what = {}, value = {}", what, value);
+ LOG_DEBUG(Service_Nvnflinger, "what = {}, value = {}", what, value);
*out_value = static_cast<s32>(value);
@@ -678,26 +678,26 @@ Status BufferQueueProducer::Connect(const std::shared_ptr<IProducerListener>& li
QueueBufferOutput* output) {
std::scoped_lock lock{core->mutex};
- LOG_DEBUG(Service_NVFlinger, "api = {} producer_controlled_by_app = {}", api,
+ LOG_DEBUG(Service_Nvnflinger, "api = {} producer_controlled_by_app = {}", api,
producer_controlled_by_app);
if (core->is_abandoned) {
- LOG_ERROR(Service_NVFlinger, "BufferQueue has been abandoned");
+ LOG_ERROR(Service_Nvnflinger, "BufferQueue has been abandoned");
return Status::NoInit;
}
if (core->consumer_listener == nullptr) {
- LOG_ERROR(Service_NVFlinger, "BufferQueue has no consumer");
+ LOG_ERROR(Service_Nvnflinger, "BufferQueue has no consumer");
return Status::NoInit;
}
if (output == nullptr) {
- LOG_ERROR(Service_NVFlinger, "output was nullptr");
+ LOG_ERROR(Service_Nvnflinger, "output was nullptr");
return Status::BadValue;
}
if (core->connected_api != NativeWindowApi::NoConnectedApi) {
- LOG_ERROR(Service_NVFlinger, "already connected (cur = {} req = {})", core->connected_api,
+ LOG_ERROR(Service_Nvnflinger, "already connected (cur = {} req = {})", core->connected_api,
api);
return Status::BadValue;
}
@@ -714,7 +714,7 @@ Status BufferQueueProducer::Connect(const std::shared_ptr<IProducerListener>& li
core->connected_producer_listener = listener;
break;
default:
- LOG_ERROR(Service_NVFlinger, "unknown api = {}", api);
+ LOG_ERROR(Service_Nvnflinger, "unknown api = {}", api);
status = Status::BadValue;
break;
}
@@ -727,7 +727,7 @@ Status BufferQueueProducer::Connect(const std::shared_ptr<IProducerListener>& li
}
Status BufferQueueProducer::Disconnect(NativeWindowApi api) {
- LOG_DEBUG(Service_NVFlinger, "api = {}", api);
+ LOG_DEBUG(Service_Nvnflinger, "api = {}", api);
Status status = Status::NoError;
std::shared_ptr<IConsumerListener> listener;
@@ -762,13 +762,13 @@ Status BufferQueueProducer::Disconnect(NativeWindowApi api) {
buffer_wait_event->Signal();
listener = core->consumer_listener;
} else {
- LOG_ERROR(Service_NVFlinger, "still connected to another api (cur = {} req = {})",
+ LOG_ERROR(Service_Nvnflinger, "still connected to another api (cur = {} req = {})",
core->connected_api, api);
status = Status::BadValue;
}
break;
default:
- LOG_ERROR(Service_NVFlinger, "unknown api = {}", api);
+ LOG_ERROR(Service_Nvnflinger, "unknown api = {}", api);
status = Status::BadValue;
break;
}
@@ -784,7 +784,7 @@ Status BufferQueueProducer::Disconnect(NativeWindowApi api) {
Status BufferQueueProducer::SetPreallocatedBuffer(s32 slot,
const std::shared_ptr<GraphicBuffer>& buffer) {
- LOG_DEBUG(Service_NVFlinger, "slot {}", slot);
+ LOG_DEBUG(Service_Nvnflinger, "slot {}", slot);
if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) {
return Status::BadValue;
@@ -914,7 +914,7 @@ void BufferQueueProducer::Transact(HLERequestContext& ctx, TransactionId code, u
break;
}
case TransactionId::GetBufferHistory:
- LOG_WARNING(Service_NVFlinger, "(STUBBED) called, transaction=GetBufferHistory");
+ LOG_WARNING(Service_Nvnflinger, "(STUBBED) called, transaction=GetBufferHistory");
break;
default:
ASSERT_MSG(false, "Unimplemented TransactionId {}", code);
diff --git a/src/core/hle/service/nvflinger/buffer_queue_producer.h b/src/core/hle/service/nvnflinger/buffer_queue_producer.h
index 16189fa6f..d4201c104 100644
--- a/src/core/hle/service/nvflinger/buffer_queue_producer.h
+++ b/src/core/hle/service/nvnflinger/buffer_queue_producer.h
@@ -12,13 +12,13 @@
#include "common/common_funcs.h"
#include "core/hle/service/nvdrv/nvdata.h"
-#include "core/hle/service/nvflinger/binder.h"
-#include "core/hle/service/nvflinger/buffer_queue_defs.h"
-#include "core/hle/service/nvflinger/buffer_slot.h"
-#include "core/hle/service/nvflinger/graphic_buffer_producer.h"
-#include "core/hle/service/nvflinger/pixel_format.h"
-#include "core/hle/service/nvflinger/status.h"
-#include "core/hle/service/nvflinger/window.h"
+#include "core/hle/service/nvnflinger/binder.h"
+#include "core/hle/service/nvnflinger/buffer_queue_defs.h"
+#include "core/hle/service/nvnflinger/buffer_slot.h"
+#include "core/hle/service/nvnflinger/graphic_buffer_producer.h"
+#include "core/hle/service/nvnflinger/pixel_format.h"
+#include "core/hle/service/nvnflinger/status.h"
+#include "core/hle/service/nvnflinger/window.h"
namespace Kernel {
class KernelCore;
diff --git a/src/core/hle/service/nvflinger/buffer_slot.h b/src/core/hle/service/nvnflinger/buffer_slot.h
index 0cd0e9964..d25bca049 100644
--- a/src/core/hle/service/nvflinger/buffer_slot.h
+++ b/src/core/hle/service/nvnflinger/buffer_slot.h
@@ -9,7 +9,7 @@
#include <memory>
#include "common/common_types.h"
-#include "core/hle/service/nvflinger/ui/fence.h"
+#include "core/hle/service/nvnflinger/ui/fence.h"
namespace Service::android {
diff --git a/src/core/hle/service/nvflinger/buffer_transform_flags.h b/src/core/hle/service/nvnflinger/buffer_transform_flags.h
index 67aa5dad6..67aa5dad6 100644
--- a/src/core/hle/service/nvflinger/buffer_transform_flags.h
+++ b/src/core/hle/service/nvnflinger/buffer_transform_flags.h
diff --git a/src/core/hle/service/nvflinger/consumer_base.cpp b/src/core/hle/service/nvnflinger/consumer_base.cpp
index 982531e2d..4dcda8dac 100644
--- a/src/core/hle/service/nvflinger/consumer_base.cpp
+++ b/src/core/hle/service/nvnflinger/consumer_base.cpp
@@ -6,11 +6,11 @@
#include "common/assert.h"
#include "common/logging/log.h"
-#include "core/hle/service/nvflinger/buffer_item.h"
-#include "core/hle/service/nvflinger/buffer_queue_consumer.h"
-#include "core/hle/service/nvflinger/buffer_queue_core.h"
-#include "core/hle/service/nvflinger/consumer_base.h"
-#include "core/hle/service/nvflinger/ui/graphic_buffer.h"
+#include "core/hle/service/nvnflinger/buffer_item.h"
+#include "core/hle/service/nvnflinger/buffer_queue_consumer.h"
+#include "core/hle/service/nvnflinger/buffer_queue_core.h"
+#include "core/hle/service/nvnflinger/consumer_base.h"
+#include "core/hle/service/nvnflinger/ui/graphic_buffer.h"
namespace Service::android {
@@ -28,7 +28,7 @@ void ConsumerBase::Connect(bool controlled_by_app) {
}
void ConsumerBase::FreeBufferLocked(s32 slot_index) {
- LOG_DEBUG(Service_NVFlinger, "slot_index={}", slot_index);
+ LOG_DEBUG(Service_Nvnflinger, "slot_index={}", slot_index);
slots[slot_index].graphic_buffer = nullptr;
slots[slot_index].fence = Fence::NoFence();
@@ -36,17 +36,17 @@ void ConsumerBase::FreeBufferLocked(s32 slot_index) {
}
void ConsumerBase::OnFrameAvailable(const BufferItem& item) {
- LOG_DEBUG(Service_NVFlinger, "called");
+ LOG_DEBUG(Service_Nvnflinger, "called");
}
void ConsumerBase::OnFrameReplaced(const BufferItem& item) {
- LOG_DEBUG(Service_NVFlinger, "called");
+ LOG_DEBUG(Service_Nvnflinger, "called");
}
void ConsumerBase::OnBuffersReleased() {
std::scoped_lock lock{mutex};
- LOG_DEBUG(Service_NVFlinger, "called");
+ LOG_DEBUG(Service_Nvnflinger, "called");
if (is_abandoned) {
// Nothing to do if we're already abandoned.
@@ -77,7 +77,7 @@ Status ConsumerBase::AcquireBufferLocked(BufferItem* item, std::chrono::nanoseco
slots[item->slot].frame_number = item->frame_number;
slots[item->slot].fence = item->fence;
- LOG_DEBUG(Service_NVFlinger, "slot={}", item->slot);
+ LOG_DEBUG(Service_Nvnflinger, "slot={}", item->slot);
return Status::NoError;
}
@@ -85,7 +85,7 @@ Status ConsumerBase::AcquireBufferLocked(BufferItem* item, std::chrono::nanoseco
Status ConsumerBase::AddReleaseFenceLocked(s32 slot,
const std::shared_ptr<GraphicBuffer>& graphic_buffer,
const Fence& fence) {
- LOG_DEBUG(Service_NVFlinger, "slot={}", slot);
+ LOG_DEBUG(Service_Nvnflinger, "slot={}", slot);
// If consumer no longer tracks this graphic_buffer, we can safely
// drop this fence, as it will never be received by the producer.
@@ -109,7 +109,7 @@ Status ConsumerBase::ReleaseBufferLocked(s32 slot,
return Status::NoError;
}
- LOG_DEBUG(Service_NVFlinger, "slot={}", slot);
+ LOG_DEBUG(Service_Nvnflinger, "slot={}", slot);
Status err = consumer->ReleaseBuffer(slot, slots[slot].frame_number, slots[slot].fence);
if (err == Status::StaleBufferSlot) {
FreeBufferLocked(slot);
diff --git a/src/core/hle/service/nvflinger/consumer_base.h b/src/core/hle/service/nvnflinger/consumer_base.h
index 9a8a5f6bb..264829414 100644
--- a/src/core/hle/service/nvflinger/consumer_base.h
+++ b/src/core/hle/service/nvnflinger/consumer_base.h
@@ -12,9 +12,9 @@
#include <mutex>
#include "common/common_types.h"
-#include "core/hle/service/nvflinger/buffer_queue_defs.h"
-#include "core/hle/service/nvflinger/consumer_listener.h"
-#include "core/hle/service/nvflinger/status.h"
+#include "core/hle/service/nvnflinger/buffer_queue_defs.h"
+#include "core/hle/service/nvnflinger/consumer_listener.h"
+#include "core/hle/service/nvnflinger/status.h"
namespace Service::android {
diff --git a/src/core/hle/service/nvflinger/consumer_listener.h b/src/core/hle/service/nvnflinger/consumer_listener.h
index 74a193988..74a193988 100644
--- a/src/core/hle/service/nvflinger/consumer_listener.h
+++ b/src/core/hle/service/nvnflinger/consumer_listener.h
diff --git a/src/core/hle/service/nvflinger/graphic_buffer_producer.cpp b/src/core/hle/service/nvnflinger/graphic_buffer_producer.cpp
index 769e8c0a3..d72b49a8e 100644
--- a/src/core/hle/service/nvflinger/graphic_buffer_producer.cpp
+++ b/src/core/hle/service/nvnflinger/graphic_buffer_producer.cpp
@@ -4,8 +4,8 @@
// Parts of this implementation were based on:
// https://cs.android.com/android/platform/superproject/+/android-5.1.1_r38:frameworks/native/libs/gui/IGraphicBufferProducer.cpp
-#include "core/hle/service/nvflinger/graphic_buffer_producer.h"
-#include "core/hle/service/nvflinger/parcel.h"
+#include "core/hle/service/nvnflinger/graphic_buffer_producer.h"
+#include "core/hle/service/nvnflinger/parcel.h"
namespace Service::android {
diff --git a/src/core/hle/service/nvflinger/graphic_buffer_producer.h b/src/core/hle/service/nvnflinger/graphic_buffer_producer.h
index 2969f0fd5..21d7b31f3 100644
--- a/src/core/hle/service/nvflinger/graphic_buffer_producer.h
+++ b/src/core/hle/service/nvnflinger/graphic_buffer_producer.h
@@ -9,8 +9,8 @@
#include "common/common_funcs.h"
#include "common/common_types.h"
#include "common/math_util.h"
-#include "core/hle/service/nvflinger/ui/fence.h"
-#include "core/hle/service/nvflinger/window.h"
+#include "core/hle/service/nvnflinger/ui/fence.h"
+#include "core/hle/service/nvnflinger/window.h"
namespace Service::android {
diff --git a/src/core/hle/service/nvflinger/hos_binder_driver_server.cpp b/src/core/hle/service/nvnflinger/hos_binder_driver_server.cpp
index dc9b2a9ec..b86a79ec9 100644
--- a/src/core/hle/service/nvflinger/hos_binder_driver_server.cpp
+++ b/src/core/hle/service/nvnflinger/hos_binder_driver_server.cpp
@@ -4,9 +4,9 @@
#include <mutex>
#include "common/common_types.h"
-#include "core/hle/service/nvflinger/hos_binder_driver_server.h"
+#include "core/hle/service/nvnflinger/hos_binder_driver_server.h"
-namespace Service::NVFlinger {
+namespace Service::Nvnflinger {
HosBinderDriverServer::HosBinderDriverServer(Core::System& system_)
: service_context(system_, "HosBinderDriverServer") {}
@@ -33,4 +33,4 @@ android::IBinder* HosBinderDriverServer::TryGetProducer(u64 id) {
return {};
}
-} // namespace Service::NVFlinger
+} // namespace Service::Nvnflinger
diff --git a/src/core/hle/service/nvflinger/hos_binder_driver_server.h b/src/core/hle/service/nvnflinger/hos_binder_driver_server.h
index 8fddc1206..58bb9469a 100644
--- a/src/core/hle/service/nvflinger/hos_binder_driver_server.h
+++ b/src/core/hle/service/nvnflinger/hos_binder_driver_server.h
@@ -9,13 +9,13 @@
#include "common/common_types.h"
#include "core/hle/service/kernel_helpers.h"
-#include "core/hle/service/nvflinger/binder.h"
+#include "core/hle/service/nvnflinger/binder.h"
namespace Core {
class System;
}
-namespace Service::NVFlinger {
+namespace Service::Nvnflinger {
class HosBinderDriverServer final {
public:
@@ -34,4 +34,4 @@ private:
u64 last_id{};
};
-} // namespace Service::NVFlinger
+} // namespace Service::Nvnflinger
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvnflinger/nvnflinger.cpp
index f4416f5b2..4988e6e17 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvnflinger/nvnflinger.cpp
@@ -15,11 +15,11 @@
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/service/nvdrv/devices/nvdisp_disp0.h"
#include "core/hle/service/nvdrv/nvdrv.h"
-#include "core/hle/service/nvflinger/buffer_item_consumer.h"
-#include "core/hle/service/nvflinger/buffer_queue_core.h"
-#include "core/hle/service/nvflinger/hos_binder_driver_server.h"
-#include "core/hle/service/nvflinger/nvflinger.h"
-#include "core/hle/service/nvflinger/ui/graphic_buffer.h"
+#include "core/hle/service/nvnflinger/buffer_item_consumer.h"
+#include "core/hle/service/nvnflinger/buffer_queue_core.h"
+#include "core/hle/service/nvnflinger/hos_binder_driver_server.h"
+#include "core/hle/service/nvnflinger/nvnflinger.h"
+#include "core/hle/service/nvnflinger/ui/graphic_buffer.h"
#include "core/hle/service/vi/display/vi_display.h"
#include "core/hle/service/vi/layer/vi_layer.h"
#include "core/hle/service/vi/vi_results.h"
@@ -27,11 +27,11 @@
#include "video_core/host1x/host1x.h"
#include "video_core/host1x/syncpoint_manager.h"
-namespace Service::NVFlinger {
+namespace Service::Nvnflinger {
constexpr auto frame_ns = std::chrono::nanoseconds{1000000000 / 60};
-void NVFlinger::SplitVSync(std::stop_token stop_token) {
+void Nvnflinger::SplitVSync(std::stop_token stop_token) {
system.RegisterHostThread();
std::string name = "VSyncThread";
MicroProfileOnThreadCreate(name.c_str());
@@ -54,8 +54,8 @@ void NVFlinger::SplitVSync(std::stop_token stop_token) {
}
}
-NVFlinger::NVFlinger(Core::System& system_, HosBinderDriverServer& hos_binder_driver_server_)
- : system(system_), service_context(system_, "nvflinger"),
+Nvnflinger::Nvnflinger(Core::System& system_, HosBinderDriverServer& hos_binder_driver_server_)
+ : system(system_), service_context(system_, "nvnflinger"),
hos_binder_driver_server(hos_binder_driver_server_) {
displays.emplace_back(0, "Default", hos_binder_driver_server, service_context, system);
displays.emplace_back(1, "External", hos_binder_driver_server, service_context, system);
@@ -92,7 +92,7 @@ NVFlinger::NVFlinger(Core::System& system_, HosBinderDriverServer& hos_binder_dr
}
}
-NVFlinger::~NVFlinger() {
+Nvnflinger::~Nvnflinger() {
if (system.IsMulticore()) {
system.CoreTiming().UnscheduleEvent(multi_composition_event, {});
vsync_thread.request_stop();
@@ -109,7 +109,7 @@ NVFlinger::~NVFlinger() {
}
}
-void NVFlinger::ShutdownLayers() {
+void Nvnflinger::ShutdownLayers() {
for (auto& display : displays) {
for (size_t layer = 0; layer < display.GetNumLayers(); ++layer) {
display.GetLayer(layer).Core().NotifyShutdown();
@@ -117,15 +117,15 @@ void NVFlinger::ShutdownLayers() {
}
}
-void NVFlinger::SetNVDrvInstance(std::shared_ptr<Nvidia::Module> instance) {
+void Nvnflinger::SetNVDrvInstance(std::shared_ptr<Nvidia::Module> instance) {
nvdrv = std::move(instance);
disp_fd = nvdrv->Open("/dev/nvdisp_disp0");
}
-std::optional<u64> NVFlinger::OpenDisplay(std::string_view name) {
+std::optional<u64> Nvnflinger::OpenDisplay(std::string_view name) {
const auto lock_guard = Lock();
- LOG_DEBUG(Service_NVFlinger, "Opening \"{}\" display", name);
+ LOG_DEBUG(Service_Nvnflinger, "Opening \"{}\" display", name);
const auto itr =
std::find_if(displays.begin(), displays.end(),
@@ -138,7 +138,7 @@ std::optional<u64> NVFlinger::OpenDisplay(std::string_view name) {
return itr->GetID();
}
-bool NVFlinger::CloseDisplay(u64 display_id) {
+bool Nvnflinger::CloseDisplay(u64 display_id) {
const auto lock_guard = Lock();
auto* const display = FindDisplay(display_id);
@@ -151,7 +151,7 @@ bool NVFlinger::CloseDisplay(u64 display_id) {
return true;
}
-std::optional<u64> NVFlinger::CreateLayer(u64 display_id) {
+std::optional<u64> Nvnflinger::CreateLayer(u64 display_id) {
const auto lock_guard = Lock();
auto* const display = FindDisplay(display_id);
@@ -164,12 +164,12 @@ std::optional<u64> NVFlinger::CreateLayer(u64 display_id) {
return layer_id;
}
-void NVFlinger::CreateLayerAtId(VI::Display& display, u64 layer_id) {
+void Nvnflinger::CreateLayerAtId(VI::Display& display, u64 layer_id) {
const auto buffer_id = next_buffer_queue_id++;
display.CreateLayer(layer_id, buffer_id, nvdrv->container);
}
-void NVFlinger::CloseLayer(u64 layer_id) {
+void Nvnflinger::CloseLayer(u64 layer_id) {
const auto lock_guard = Lock();
for (auto& display : displays) {
@@ -177,7 +177,7 @@ void NVFlinger::CloseLayer(u64 layer_id) {
}
}
-std::optional<u32> NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) {
+std::optional<u32> Nvnflinger::FindBufferQueueId(u64 display_id, u64 layer_id) {
const auto lock_guard = Lock();
const auto* const layer = FindOrCreateLayer(display_id, layer_id);
@@ -188,7 +188,7 @@ std::optional<u32> NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) {
return layer->GetBinderId();
}
-ResultVal<Kernel::KReadableEvent*> NVFlinger::FindVsyncEvent(u64 display_id) {
+ResultVal<Kernel::KReadableEvent*> Nvnflinger::FindVsyncEvent(u64 display_id) {
const auto lock_guard = Lock();
auto* const display = FindDisplay(display_id);
@@ -199,7 +199,7 @@ ResultVal<Kernel::KReadableEvent*> NVFlinger::FindVsyncEvent(u64 display_id) {
return display->GetVSyncEvent();
}
-VI::Display* NVFlinger::FindDisplay(u64 display_id) {
+VI::Display* Nvnflinger::FindDisplay(u64 display_id) {
const auto itr =
std::find_if(displays.begin(), displays.end(),
[&](const VI::Display& display) { return display.GetID() == display_id; });
@@ -211,7 +211,7 @@ VI::Display* NVFlinger::FindDisplay(u64 display_id) {
return &*itr;
}
-const VI::Display* NVFlinger::FindDisplay(u64 display_id) const {
+const VI::Display* Nvnflinger::FindDisplay(u64 display_id) const {
const auto itr =
std::find_if(displays.begin(), displays.end(),
[&](const VI::Display& display) { return display.GetID() == display_id; });
@@ -223,7 +223,7 @@ const VI::Display* NVFlinger::FindDisplay(u64 display_id) const {
return &*itr;
}
-VI::Layer* NVFlinger::FindLayer(u64 display_id, u64 layer_id) {
+VI::Layer* Nvnflinger::FindLayer(u64 display_id, u64 layer_id) {
auto* const display = FindDisplay(display_id);
if (display == nullptr) {
@@ -233,7 +233,7 @@ VI::Layer* NVFlinger::FindLayer(u64 display_id, u64 layer_id) {
return display->FindLayer(layer_id);
}
-const VI::Layer* NVFlinger::FindLayer(u64 display_id, u64 layer_id) const {
+const VI::Layer* Nvnflinger::FindLayer(u64 display_id, u64 layer_id) const {
const auto* const display = FindDisplay(display_id);
if (display == nullptr) {
@@ -243,7 +243,7 @@ const VI::Layer* NVFlinger::FindLayer(u64 display_id, u64 layer_id) const {
return display->FindLayer(layer_id);
}
-VI::Layer* NVFlinger::FindOrCreateLayer(u64 display_id, u64 layer_id) {
+VI::Layer* Nvnflinger::FindOrCreateLayer(u64 display_id, u64 layer_id) {
auto* const display = FindDisplay(display_id);
if (display == nullptr) {
@@ -253,7 +253,7 @@ VI::Layer* NVFlinger::FindOrCreateLayer(u64 display_id, u64 layer_id) {
auto* layer = display->FindLayer(layer_id);
if (layer == nullptr) {
- LOG_DEBUG(Service_NVFlinger, "Layer at id {} not found. Trying to create it.", layer_id);
+ LOG_DEBUG(Service_Nvnflinger, "Layer at id {} not found. Trying to create it.", layer_id);
CreateLayerAtId(*display, layer_id);
return display->FindLayer(layer_id);
}
@@ -261,7 +261,7 @@ VI::Layer* NVFlinger::FindOrCreateLayer(u64 display_id, u64 layer_id) {
return layer;
}
-void NVFlinger::Compose() {
+void Nvnflinger::Compose() {
for (auto& display : displays) {
// Trigger vsync for this display at the end of drawing
SCOPE_EXIT({ display.SignalVSyncEvent(); });
@@ -311,7 +311,7 @@ void NVFlinger::Compose() {
}
}
-s64 NVFlinger::GetNextTicks() const {
+s64 Nvnflinger::GetNextTicks() const {
const auto& settings = Settings::values;
auto speed_scale = 1.f;
if (settings.use_multi_core.GetValue()) {
@@ -332,4 +332,4 @@ s64 NVFlinger::GetNextTicks() const {
return static_cast<s64>(speed_scale * (1000000000.f / effective_fps));
}
-} // namespace Service::NVFlinger
+} // namespace Service::Nvnflinger
diff --git a/src/core/hle/service/nvflinger/nvflinger.h b/src/core/hle/service/nvnflinger/nvnflinger.h
index 3828cf272..a043cceb2 100644
--- a/src/core/hle/service/nvflinger/nvflinger.h
+++ b/src/core/hle/service/nvnflinger/nvnflinger.h
@@ -42,12 +42,12 @@ class BufferQueueCore;
class BufferQueueProducer;
} // namespace Service::android
-namespace Service::NVFlinger {
+namespace Service::Nvnflinger {
-class NVFlinger final {
+class Nvnflinger final {
public:
- explicit NVFlinger(Core::System& system_, HosBinderDriverServer& hos_binder_driver_server_);
- ~NVFlinger();
+ explicit Nvnflinger(Core::System& system_, HosBinderDriverServer& hos_binder_driver_server_);
+ ~Nvnflinger();
void ShutdownLayers();
@@ -152,4 +152,4 @@ private:
HosBinderDriverServer& hos_binder_driver_server;
};
-} // namespace Service::NVFlinger
+} // namespace Service::Nvnflinger
diff --git a/src/core/hle/service/nvflinger/parcel.h b/src/core/hle/service/nvnflinger/parcel.h
index d1b6201e0..d1b6201e0 100644
--- a/src/core/hle/service/nvflinger/parcel.h
+++ b/src/core/hle/service/nvnflinger/parcel.h
diff --git a/src/core/hle/service/nvflinger/pixel_format.h b/src/core/hle/service/nvnflinger/pixel_format.h
index f77d0acfb..f77d0acfb 100644
--- a/src/core/hle/service/nvflinger/pixel_format.h
+++ b/src/core/hle/service/nvnflinger/pixel_format.h
diff --git a/src/core/hle/service/nvflinger/producer_listener.h b/src/core/hle/service/nvnflinger/producer_listener.h
index 6bf8aaf1e..6bf8aaf1e 100644
--- a/src/core/hle/service/nvflinger/producer_listener.h
+++ b/src/core/hle/service/nvnflinger/producer_listener.h
diff --git a/src/core/hle/service/nvflinger/status.h b/src/core/hle/service/nvnflinger/status.h
index 7af166c40..7af166c40 100644
--- a/src/core/hle/service/nvflinger/status.h
+++ b/src/core/hle/service/nvnflinger/status.h
diff --git a/src/core/hle/service/nvflinger/ui/fence.h b/src/core/hle/service/nvnflinger/ui/fence.h
index 536e8156d..536e8156d 100644
--- a/src/core/hle/service/nvflinger/ui/fence.h
+++ b/src/core/hle/service/nvnflinger/ui/fence.h
diff --git a/src/core/hle/service/nvflinger/ui/graphic_buffer.h b/src/core/hle/service/nvnflinger/ui/graphic_buffer.h
index 9a27f8f02..75d1705a8 100644
--- a/src/core/hle/service/nvflinger/ui/graphic_buffer.h
+++ b/src/core/hle/service/nvnflinger/ui/graphic_buffer.h
@@ -8,7 +8,7 @@
#include "common/common_funcs.h"
#include "common/common_types.h"
-#include "core/hle/service/nvflinger/pixel_format.h"
+#include "core/hle/service/nvnflinger/pixel_format.h"
namespace Service::android {
diff --git a/src/core/hle/service/nvflinger/window.h b/src/core/hle/service/nvnflinger/window.h
index 61cca5b01..61cca5b01 100644
--- a/src/core/hle/service/nvflinger/window.h
+++ b/src/core/hle/service/nvnflinger/window.h