Loading cmds/servicemanager/ServiceManager.cpp +33 −12 Original line number Diff line number Diff line Loading @@ -49,14 +49,28 @@ static bool isVintfDeclared(const std::string& name) { const std::string iface = name.substr(lastDot+1, firstSlash-lastDot-1); const std::string instance = name.substr(firstSlash+1); for (const auto& manifest : { vintf::VintfObject::GetDeviceHalManifest(), vintf::VintfObject::GetFrameworkHalManifest() struct ManifestWithDescription { std::shared_ptr<const vintf::HalManifest> manifest; const char* description; }; for (const ManifestWithDescription& mwd : { ManifestWithDescription{ vintf::VintfObject::GetDeviceHalManifest(), "device" }, ManifestWithDescription{ vintf::VintfObject::GetFrameworkHalManifest(), "framework" }, }) { if (manifest != nullptr && manifest->hasAidlInstance(package, iface, instance)) { if (mwd.manifest == nullptr) { LOG(ERROR) << "NULL VINTF MANIFEST!: " << mwd.description; // note, we explicitly do not retry here, so that we can detect VINTF // or other bugs (b/151696835) continue; } if (mwd.manifest->hasAidlInstance(package, iface, instance)) { LOG(INFO) << "Found " << name << " in " << mwd.description << " VINTF manifest."; return true; } } // Although it is tested, explicitly rebuilding qualified name, in case it // becomes something unexpected. LOG(ERROR) << "Could not find " << package << "." << iface << "/" << instance << " in the VINTF manifest."; return false; Loading @@ -72,13 +86,20 @@ static bool meetsDeclarationRequirements(const sp<IBinder>& binder, const std::s #endif // !VENDORSERVICEMANAGER ServiceManager::ServiceManager(std::unique_ptr<Access>&& access) : mAccess(std::move(access)) { #ifndef VENDORSERVICEMANAGER // can process these at any times, don't want to delay first VINTF client std::thread([] { vintf::VintfObject::GetDeviceHalManifest(); vintf::VintfObject::GetFrameworkHalManifest(); }).detach(); #endif // !VENDORSERVICEMANAGER // TODO(b/151696835): reenable performance hack when we solve bug, since with // this hack and other fixes, it is unlikely we will see even an ephemeral // failure when the manifest parse fails. The goal is that the manifest will // be read incorrectly and cause the process trying to register a HAL to // fail. If this is in fact an early boot kernel contention issue, then we // will get no failure, and by its absence, be signalled to invest more // effort in re-adding this performance hack. // #ifndef VENDORSERVICEMANAGER // // can process these at any times, don't want to delay first VINTF client // std::thread([] { // vintf::VintfObject::GetDeviceHalManifest(); // vintf::VintfObject::GetFrameworkHalManifest(); // }).detach(); // #endif // !VENDORSERVICEMANAGER } ServiceManager::~ServiceManager() { // this should only happen in tests Loading libs/renderengine/gl/filters/BlurFilter.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -68,6 +68,8 @@ BlurFilter::BlurFilter(GLESRenderEngine& engine) status_t BlurFilter::setAsDrawTarget(const DisplaySettings& display, uint32_t radius) { ATRACE_NAME("BlurFilter::setAsDrawTarget"); mRadius = radius; mDisplayX = display.physicalDisplay.left; mDisplayY = display.physicalDisplay.top; if (mDisplayWidth < display.physicalDisplay.width() || mDisplayHeight < display.physicalDisplay.height()) { Loading Loading @@ -182,8 +184,8 @@ status_t BlurFilter::render(bool multiPass) { if (mix >= 1 || multiPass) { mLastDrawTarget->bindAsReadBuffer(); glBlitFramebuffer(0, 0, mLastDrawTarget->getBufferWidth(), mLastDrawTarget->getBufferHeight(), 0, 0, mDisplayWidth, mDisplayHeight, GL_COLOR_BUFFER_BIT, GL_LINEAR); mLastDrawTarget->getBufferHeight(), mDisplayX, mDisplayY, mDisplayWidth, mDisplayHeight, GL_COLOR_BUFFER_BIT, GL_LINEAR); return NO_ERROR; } Loading libs/renderengine/gl/filters/BlurFilter.h +2 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,8 @@ private: GLFramebuffer mPongFbo; uint32_t mDisplayWidth = 0; uint32_t mDisplayHeight = 0; uint32_t mDisplayX = 0; uint32_t mDisplayY = 0; // Buffer holding the final blur pass. GLFramebuffer* mLastDrawTarget; Loading vulkan/libvulkan/swapchain.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1478,7 +1478,7 @@ VkResult AcquireNextImageKHR(VkDevice device, ANativeWindowBuffer* buffer; int fence_fd; err = window->dequeueBuffer(window, &buffer, &fence_fd); if (err == android::TIMED_OUT) { if (err == android::TIMED_OUT || err == android::INVALID_OPERATION) { ALOGW("dequeueBuffer timed out: %s (%d)", strerror(-err), err); return timeout ? VK_TIMEOUT : VK_NOT_READY; } else if (err != android::OK) { Loading Loading
cmds/servicemanager/ServiceManager.cpp +33 −12 Original line number Diff line number Diff line Loading @@ -49,14 +49,28 @@ static bool isVintfDeclared(const std::string& name) { const std::string iface = name.substr(lastDot+1, firstSlash-lastDot-1); const std::string instance = name.substr(firstSlash+1); for (const auto& manifest : { vintf::VintfObject::GetDeviceHalManifest(), vintf::VintfObject::GetFrameworkHalManifest() struct ManifestWithDescription { std::shared_ptr<const vintf::HalManifest> manifest; const char* description; }; for (const ManifestWithDescription& mwd : { ManifestWithDescription{ vintf::VintfObject::GetDeviceHalManifest(), "device" }, ManifestWithDescription{ vintf::VintfObject::GetFrameworkHalManifest(), "framework" }, }) { if (manifest != nullptr && manifest->hasAidlInstance(package, iface, instance)) { if (mwd.manifest == nullptr) { LOG(ERROR) << "NULL VINTF MANIFEST!: " << mwd.description; // note, we explicitly do not retry here, so that we can detect VINTF // or other bugs (b/151696835) continue; } if (mwd.manifest->hasAidlInstance(package, iface, instance)) { LOG(INFO) << "Found " << name << " in " << mwd.description << " VINTF manifest."; return true; } } // Although it is tested, explicitly rebuilding qualified name, in case it // becomes something unexpected. LOG(ERROR) << "Could not find " << package << "." << iface << "/" << instance << " in the VINTF manifest."; return false; Loading @@ -72,13 +86,20 @@ static bool meetsDeclarationRequirements(const sp<IBinder>& binder, const std::s #endif // !VENDORSERVICEMANAGER ServiceManager::ServiceManager(std::unique_ptr<Access>&& access) : mAccess(std::move(access)) { #ifndef VENDORSERVICEMANAGER // can process these at any times, don't want to delay first VINTF client std::thread([] { vintf::VintfObject::GetDeviceHalManifest(); vintf::VintfObject::GetFrameworkHalManifest(); }).detach(); #endif // !VENDORSERVICEMANAGER // TODO(b/151696835): reenable performance hack when we solve bug, since with // this hack and other fixes, it is unlikely we will see even an ephemeral // failure when the manifest parse fails. The goal is that the manifest will // be read incorrectly and cause the process trying to register a HAL to // fail. If this is in fact an early boot kernel contention issue, then we // will get no failure, and by its absence, be signalled to invest more // effort in re-adding this performance hack. // #ifndef VENDORSERVICEMANAGER // // can process these at any times, don't want to delay first VINTF client // std::thread([] { // vintf::VintfObject::GetDeviceHalManifest(); // vintf::VintfObject::GetFrameworkHalManifest(); // }).detach(); // #endif // !VENDORSERVICEMANAGER } ServiceManager::~ServiceManager() { // this should only happen in tests Loading
libs/renderengine/gl/filters/BlurFilter.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -68,6 +68,8 @@ BlurFilter::BlurFilter(GLESRenderEngine& engine) status_t BlurFilter::setAsDrawTarget(const DisplaySettings& display, uint32_t radius) { ATRACE_NAME("BlurFilter::setAsDrawTarget"); mRadius = radius; mDisplayX = display.physicalDisplay.left; mDisplayY = display.physicalDisplay.top; if (mDisplayWidth < display.physicalDisplay.width() || mDisplayHeight < display.physicalDisplay.height()) { Loading Loading @@ -182,8 +184,8 @@ status_t BlurFilter::render(bool multiPass) { if (mix >= 1 || multiPass) { mLastDrawTarget->bindAsReadBuffer(); glBlitFramebuffer(0, 0, mLastDrawTarget->getBufferWidth(), mLastDrawTarget->getBufferHeight(), 0, 0, mDisplayWidth, mDisplayHeight, GL_COLOR_BUFFER_BIT, GL_LINEAR); mLastDrawTarget->getBufferHeight(), mDisplayX, mDisplayY, mDisplayWidth, mDisplayHeight, GL_COLOR_BUFFER_BIT, GL_LINEAR); return NO_ERROR; } Loading
libs/renderengine/gl/filters/BlurFilter.h +2 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,8 @@ private: GLFramebuffer mPongFbo; uint32_t mDisplayWidth = 0; uint32_t mDisplayHeight = 0; uint32_t mDisplayX = 0; uint32_t mDisplayY = 0; // Buffer holding the final blur pass. GLFramebuffer* mLastDrawTarget; Loading
vulkan/libvulkan/swapchain.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1478,7 +1478,7 @@ VkResult AcquireNextImageKHR(VkDevice device, ANativeWindowBuffer* buffer; int fence_fd; err = window->dequeueBuffer(window, &buffer, &fence_fd); if (err == android::TIMED_OUT) { if (err == android::TIMED_OUT || err == android::INVALID_OPERATION) { ALOGW("dequeueBuffer timed out: %s (%d)", strerror(-err), err); return timeout ? VK_TIMEOUT : VK_NOT_READY; } else if (err != android::OK) { Loading