summaryrefslogtreecommitdiff
path: root/hwc3
diff options
context:
space:
mode:
authorJoen Chen <joenchen@google.com>2023-01-17 03:31:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2023-01-17 03:31:27 +0000
commit833cfbafddbd0c729daacd78ef84f011b875aec5 (patch)
tree533d5fc12393bfe74029e752fcb9896e1d926f8b /hwc3
parentd884cfc9c89b08247a8da1cc44a091c2692a5ffa (diff)
parentacf0fe4dd6c5ea3e633b0e354d3c128c47baa04a (diff)
Merge "hwc3: Primary displays supports MULTI_THREADED_PRESENT"
Diffstat (limited to 'hwc3')
-rw-r--r--hwc3/ComposerClient.cpp10
-rw-r--r--hwc3/impl/HalImpl.cpp7
-rw-r--r--hwc3/impl/HalImpl.h2
-rw-r--r--hwc3/include/IComposerHal.h3
4 files changed, 21 insertions, 1 deletions
diff --git a/hwc3/ComposerClient.cpp b/hwc3/ComposerClient.cpp
index f977f41..8b9e6d6 100644
--- a/hwc3/ComposerClient.cpp
+++ b/hwc3/ComposerClient.cpp
@@ -171,6 +171,16 @@ ndk::ScopedAStatus ComposerClient::getDisplayCapabilities(int64_t display,
caps->push_back(DisplayCapability::DISPLAY_IDLE_TIMER);
}
+ err = mHal->getDisplayMultiThreadedPresentSupport(display, support);
+ if (err != ::android::OK) {
+ LOG(ERROR) << "failed to getDisplayMultiThreadedPresentSupport: " << err;
+ return TO_BINDER_STATUS(err);
+ }
+
+ if (support) {
+ caps->push_back(DisplayCapability::MULTI_THREADED_PRESENT);
+ }
+
return TO_BINDER_STATUS(err);
}
diff --git a/hwc3/impl/HalImpl.cpp b/hwc3/impl/HalImpl.cpp
index 8045bc6..b0f9305 100644
--- a/hwc3/impl/HalImpl.cpp
+++ b/hwc3/impl/HalImpl.cpp
@@ -1049,4 +1049,11 @@ int32_t HalImpl::getDisplayIdleTimerSupport(int64_t display, bool& outSupport) {
return halDisplay->getDisplayIdleTimerSupport(outSupport);
}
+int32_t HalImpl::getDisplayMultiThreadedPresentSupport(const int64_t& display, bool& outSupport) {
+ ExynosDisplay* halDisplay;
+ RET_IF_ERR(getHalDisplay(display, halDisplay));
+
+ return halDisplay->getDisplayMultiThreadedPresentSupport(outSupport);
+}
+
} // namespace aidl::android::hardware::graphics::composer3::impl
diff --git a/hwc3/impl/HalImpl.h b/hwc3/impl/HalImpl.h
index 21af64e..0f4b182 100644
--- a/hwc3/impl/HalImpl.h
+++ b/hwc3/impl/HalImpl.h
@@ -137,6 +137,8 @@ class HalImpl : public IComposerHal {
const ndk::ScopedFileDescriptor& releaseFence) override;
int32_t setVsyncEnabled(int64_t display, bool enabled) override;
int32_t getDisplayIdleTimerSupport(int64_t display, bool& outSupport) override;
+ int32_t getDisplayMultiThreadedPresentSupport(const int64_t& display,
+ bool& outSupport) override;
int32_t setIdleTimerEnabled(int64_t display, int32_t timeout) override;
int32_t getRCDLayerSupport(int64_t display, bool& outSupport) override;
int32_t setLayerBlockingRegion(
diff --git a/hwc3/include/IComposerHal.h b/hwc3/include/IComposerHal.h
index 7183dec..8e336dd 100644
--- a/hwc3/include/IComposerHal.h
+++ b/hwc3/include/IComposerHal.h
@@ -122,7 +122,8 @@ class IComposerHal {
DisplayAttribute attribute, int32_t* outValue) = 0;
virtual int32_t getDisplayBrightnessSupport(int64_t display, bool& outSupport) = 0;
virtual int32_t getDisplayIdleTimerSupport(int64_t display, bool& outSupport) = 0;
-
+ virtual int32_t getDisplayMultiThreadedPresentSupport(const int64_t& display,
+ bool& outSupport) = 0;
virtual int32_t getDisplayCapabilities(int64_t display,
std::vector<DisplayCapability>* caps) = 0;
virtual int32_t getDisplayConfigs(int64_t display, std::vector<int32_t>* configs) = 0;