hwc: vpuclient: vpuClient implementation
Vpuclient is the client side for VFM in hwc. It follows the
similar pattern of prepare and draw. It has 2 step prepare
including: setVpuSession and prepare. The setVpuSession function
passes all the layers from the SF list to VFM, which marks
the layers that it can support. After this, the layer
allocation/configuration is done, and finally in prepare the
allocated pipes are passed down to VFM. The draw function
passes the handle to the VFM to draw the video layer.
Change-Id: I5d8795de35ed98716f7fa4cd48506b488cb3cb5d
diff --git a/libhwcomposer/hwc_qclient.cpp b/libhwcomposer/hwc_qclient.cpp
index 8c99d64..8c5b079 100644
--- a/libhwcomposer/hwc_qclient.cpp
+++ b/libhwcomposer/hwc_qclient.cpp
@@ -31,6 +31,7 @@
#include <IQService.h>
#include <hwc_utils.h>
#include <hwc_vpuclient.h>
+#include <mdp_version.h>
#define QCLIENT_DEBUG 0
@@ -94,16 +95,19 @@
return result;
}
+#ifdef VPU_TARGET
static android::status_t vpuCommand(hwc_context_t *ctx,
uint32_t command,
const Parcel* inParcel,
Parcel* outParcel) {
status_t result = NO_INIT;
-#ifdef VPU_TARGET
- result = ctx->mVPUClient->processCommand(command, inParcel, outParcel);
+#ifdef QCOM_BSP
+ if(qdutils::MDPVersion::getInstance().is8092())
+ result = ctx->mVPUClient->processCommand(command, inParcel, outParcel);
#endif
return result;
}
+#endif
static void setExtOrientation(hwc_context_t *ctx, uint32_t orientation) {
ctx->mExtOrientation = orientation;
@@ -181,10 +185,12 @@
Parcel* outParcel) {
status_t ret = NO_ERROR;
+#ifdef VPU_TARGET
if (command > IQService::VPU_COMMAND_LIST_START &&
command < IQService::VPU_COMMAND_LIST_END) {
return vpuCommand(mHwcContext, command, inParcel, outParcel);
}
+#endif
switch(command) {
case IQService::SECURING: