hwc: Add vpu client
Stub implementation of VPU in HWC.
This commit passes through binder calls from HWC
to the VPU library. It also has stub prepare/draw calls
in the VPU client object which can be used to configure
VPU in the composition cycle.
Change-Id: I2606f2884e870448d29ef26e02faac92e157e2c6
diff --git a/libhwcomposer/hwc_qclient.cpp b/libhwcomposer/hwc_qclient.cpp
index 12a9f32..a17565b 100644
--- a/libhwcomposer/hwc_qclient.cpp
+++ b/libhwcomposer/hwc_qclient.cpp
@@ -30,6 +30,7 @@
#include <hwc_qclient.h>
#include <IQService.h>
#include <hwc_utils.h>
+#include <hwc_vpuclient.h>
#define QCLIENT_DEBUG 0
@@ -51,6 +52,12 @@
}
status_t QClient::notifyCallback(uint32_t msg, uint32_t value) {
+
+ if (msg > IQService::VPU_COMMAND_LIST_START &&
+ msg < IQService::VPU_COMMAND_LIST_END) {
+ return vpuCommand(msg, value);
+ }
+
switch(msg) {
case IQService::SECURING:
securing(value);
@@ -117,6 +124,16 @@
return result;
}
+android::status_t QClient::vpuCommand(uint32_t command, uint32_t setting) {
+ status_t result = NO_INIT;
+#ifdef QCOM_BSP
+#ifdef VPU_TARGET
+ result = mHwcContext->mVPUClient->processCommand(command, setting);
+#endif
+#endif
+ return result;
+}
+
void QClient::setExtOrientation(uint32_t orientation) {
mHwcContext->mExtOrientation = orientation;
}