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
This commit is contained in:
Zohaib Alam
2013-09-28 03:38:20 -04:00
parent ac06730570
commit 1bb656178e
8 changed files with 1084 additions and 89 deletions

View File

@@ -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 @@ static android::status_t screenRefresh(hwc_context_t *ctx) {
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 @@ status_t QClient::notifyCallback(uint32_t command, const Parcel* inParcel,
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: