aboutsummaryrefslogtreecommitdiffstats
path: root/drm/ResourceManager.cpp
diff options
context:
space:
mode:
authorRoman Stratiienko <roman.o.stratiienko@globallogic.com>2022-01-21 15:12:56 +0200
committerRoman Stratiienko <roman.o.stratiienko@globallogic.com>2022-02-04 11:16:32 +0200
commitd0c035b44a844af5017c0c3b2507af2f3907c36c (patch)
tree0204a64b0bf4d16f320678377be9620143dd0119 /drm/ResourceManager.cpp
parent099c31156d4d916c1e18ec00ab163de77bd17a94 (diff)
downloaddrm-hwcomposer-d0c035b44a844af5017c0c3b2507af2f3907c36c.tar.gz
drm-hwcomposer-d0c035b44a844af5017c0c3b2507af2f3907c36c.tar.bz2
drm-hwcomposer-d0c035b44a844af5017c0c3b2507af2f3907c36c.zip
drm_hwcomposer: Implement SetActiveConfigWithConstraints
Enough to get 100% passes in Composer 2.4 VTS. Some SOCs require a VTS fix to pass [1] [1]: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1954544 Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Diffstat (limited to 'drm/ResourceManager.cpp')
-rw-r--r--drm/ResourceManager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/drm/ResourceManager.cpp b/drm/ResourceManager.cpp
index 789eca3..b294180 100644
--- a/drm/ResourceManager.cpp
+++ b/drm/ResourceManager.cpp
@@ -21,6 +21,7 @@
#include <fcntl.h>
#include <sys/stat.h>
+#include <ctime>
#include <sstream>
#include "bufferinfo/BufferInfoGetter.h"
@@ -114,6 +115,13 @@ int ResourceManager::AddDrmDevice(const std::string &path) {
return ret;
}
+auto ResourceManager::GetTimeMonotonicNs() -> int64_t {
+ struct timespec ts {};
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ constexpr int64_t kNsInSec = 1000000000LL;
+ return int64_t(ts.tv_sec) * kNsInSec + int64_t(ts.tv_nsec);
+}
+
void ResourceManager::UpdateFrontendDisplays() {
auto ordered_connectors = GetOrderedConnectors();