Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Commit

Permalink
display: Remove VPU related code
Browse files Browse the repository at this point in the history
Targets in which VPU interacts with display through HWC are no
longer supported.

Change-Id: I65a5348a375ad0c193a8659d0cdfb37c2db6f38e
(cherry picked from commit 330a282)
  • Loading branch information
naseer authored and Piyush Gupta committed Mar 25, 2014
1 parent c5d8c2e commit 01cbeba
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 1,245 deletions.
5 changes: 0 additions & 5 deletions msm8084/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ ifeq ($(call is-board-platform-in-list, msm8974 msm8226 msm8610 apq8084 \
common_flags += -DMDSS_TARGET
endif

ifeq ($(call is-board-platform-in-list, mpq8092), true)
common_flags += -DVPU_TARGET
endif


common_deps :=
kernel_includes :=

Expand Down
4 changes: 0 additions & 4 deletions msm8084/libhwcomposer/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,4 @@ LOCAL_SRC_FILES := hwc.cpp \
hwc_dump_layers.cpp \
hwc_ad.cpp \
hwc_virtual.cpp
ifeq ($(call is-board-platform-in-list, mpq8092), true)
LOCAL_SRC_FILES += hwc_vpuclient.cpp
endif

include $(BUILD_SHARED_LIBRARY)
19 changes: 2 additions & 17 deletions msm8084/libhwcomposer/hwc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "hwc_copybit.h"
#include "hwc_ad.h"
#include "profiler.h"
#include "hwc_vpuclient.h"
#include "hwc_virtual.h"

using namespace qhwc;
Expand Down Expand Up @@ -202,12 +201,7 @@ static int hwc_prepare_primary(hwc_composer_device_1 *dev,
reset_layer_prop(ctx, dpy, list->numHwLayers - 1);
setListStats(ctx, list, dpy);

if (ctx->mVPUClient == NULL)
fbComp = (ctx->mMDPComp[dpy]->prepare(ctx, list) < 0);
#ifdef VPU_TARGET
else
fbComp = (ctx->mVPUClient->prepare(ctx, dpy, list) < 0);
#endif
fbComp = (ctx->mMDPComp[dpy]->prepare(ctx, list) < 0);

if (fbComp) {
const int fbZ = 0;
Expand Down Expand Up @@ -513,12 +507,7 @@ static int hwc_set_primary(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
if(ctx->mHwcDebug[dpy])
ctx->mHwcDebug[dpy]->dumpLayers(list);

if (ctx->mVPUClient != NULL) {
#ifdef VPU_TARGET
ctx->mVPUClient->predraw(ctx, dpy, list);
#endif
}
else if (!ctx->mMDPComp[dpy]->draw(ctx, list)) {
if (!ctx->mMDPComp[dpy]->draw(ctx, list)) {
ALOGE("%s: MDPComp draw failed", __FUNCTION__);
ret = -1;
}
Expand All @@ -543,10 +532,6 @@ static int hwc_set_primary(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
ret = -1;
}

#ifdef VPU_TARGET
if (ctx->mVPUClient != NULL)
ctx->mVPUClient->draw(ctx, dpy, list);
#endif
}

closeAcquireFds(list);
Expand Down
21 changes: 0 additions & 21 deletions msm8084/libhwcomposer/hwc_qclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <hwc_qclient.h>
#include <IQService.h>
#include <hwc_utils.h>
#include <hwc_vpuclient.h>
#include <mdp_version.h>

#define QCLIENT_DEBUG 0
Expand Down Expand Up @@ -95,20 +94,6 @@ 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 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;
}
Expand Down Expand Up @@ -186,12 +171,6 @@ 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:
securing(mHwcContext, inParcel->readInt32());
Expand Down
44 changes: 2 additions & 42 deletions msm8084/libhwcomposer/hwc_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "mdp_version.h"
#include "hwc_copybit.h"
#include "hwc_dump_layers.h"
#include "hwc_vpuclient.h"
#include "external.h"
#include "virtual.h"
#include "hwc_qclient.h"
Expand Down Expand Up @@ -236,7 +235,6 @@ void initContext(hwc_context_t *ctx)
// Initialize device orientation to its default orientation
ctx->deviceOrientation = 0;
ctx->mBufferMirrorMode = false;
ctx->mVPUClient = NULL;

// Read the system property to determine if downscale feature is enabled.
ctx->mMDPDownscaleEnabled = false;
Expand All @@ -246,11 +244,6 @@ void initContext(hwc_context_t *ctx)
ctx->mMDPDownscaleEnabled = true;
}

#ifdef VPU_TARGET
if(qdutils::MDPVersion::getInstance().is8092())
ctx->mVPUClient = new VPUClient(ctx);
#endif

ALOGI("Initializing Qualcomm Hardware Composer");
ALOGI("MDP version: %d", ctx->mMDP.version);
}
Expand Down Expand Up @@ -284,11 +277,6 @@ void closeContext(hwc_context_t *ctx)
ctx->mExtDisplay = NULL;
}

#ifdef VPU_TARGET
if(ctx->mVPUClient != NULL)
delete ctx->mVPUClient;
#endif

for(int i = 0; i < HWC_NUM_DISPLAY_TYPES; i++) {
if(ctx->mFBUpdate[i]) {
delete ctx->mFBUpdate[i];
Expand Down Expand Up @@ -1356,10 +1344,8 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy,
// Release all the app layer fds immediately,
// if animation is in progress.
list->hwLayers[i].releaseFenceFd = -1;
} else if(list->hwLayers[i].releaseFenceFd < 0 &&
!(layerProp[i].mFlags & HWC_VPUCOMP)) {
} else if(list->hwLayers[i].releaseFenceFd < 0 ) {
//If rotator has not already populated this field
// & if it's a not VPU layer
if(list->hwLayers[i].compositionType == HWC_BLIT) {
//For Blit, the app layers should be released when the Blit is
//complete. This fd was passed from copybit->draw
Expand Down Expand Up @@ -1403,19 +1389,13 @@ void setMdpFlags(hwc_layer_1_t *layer,
ovutils::OV_MDP_BLEND_FG_PREMULT);
}

if (layer->flags & HWC_VPU_PIPE) {
ovutils::setMdpFlags(mdpFlags, ovutils::OV_MDP_VPU_PIPE);
}

if(isYuvBuffer(hnd)) {
if(isSecureBuffer(hnd)) {
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_SECURE_OVERLAY_SESSION);
}
// in mpq, deinterlacing is done in vpu
if(metadata && (metadata->operation & PP_PARAM_INTERLACED) &&
metadata->interlaced &&
(!qdutils::MDPVersion::getInstance().is8092())) {
metadata->interlaced) {
ovutils::setMdpFlags(mdpFlags,
ovutils::OV_MDP_DEINTERLACE);
}
Expand Down Expand Up @@ -1603,16 +1583,6 @@ int configureNonSplit(hwc_context_t *ctx, hwc_layer_1_t *layer,
uint32_t format = ovutils::getMdpFormat(hnd->format, isTileRendered(hnd));
Whf whf(getWidth(hnd), getHeight(hnd), format, hnd->size);

#ifdef VPU_TARGET
if(ctx->mVPUClient != NULL &&
ctx->mVPUClient->supportedVPULayer(dpy, layer)) {
whf.format = getMdpFormat(
ctx->mVPUClient->getLayerFormat(dpy, layer));
whf.w = ctx->mVPUClient->getWidth(dpy, layer);
whf.h = ctx->mVPUClient->getHeight(dpy, layer);
}
#endif

// Handle R/B swap
if (layer->flags & HWC_FORMAT_RB_SWAP) {
if (hnd->format == HAL_PIXEL_FORMAT_RGBA_8888)
Expand Down Expand Up @@ -1720,16 +1690,6 @@ int configureSplit(hwc_context_t *ctx, hwc_layer_1_t *layer,
uint32_t format = ovutils::getMdpFormat(hnd->format, isTileRendered(hnd));
Whf whf(getWidth(hnd), getHeight(hnd), format, hnd->size);

#ifdef VPU_TARGET
if(ctx->mVPUClient != NULL &&
ctx->mVPUClient->supportedVPULayer(dpy, layer)) {
whf.format = getMdpFormat(
ctx->mVPUClient->getLayerFormat(dpy, layer));
whf.w = ctx->mVPUClient->getWidth(dpy, layer);
whf.h = ctx->mVPUClient->getHeight(dpy, layer);
}
#endif

// Handle R/B swap
if (layer->flags & HWC_FORMAT_RB_SWAP) {
if (hnd->format == HAL_PIXEL_FORMAT_RGBA_8888)
Expand Down
4 changes: 0 additions & 4 deletions msm8084/libhwcomposer/hwc_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class MDPComp;
class CopyBit;
class HwcDebug;
class AssertiveDisplay;
class VPUClient;
class HWCVirtualBase;


Expand Down Expand Up @@ -145,14 +144,12 @@ struct BwcPM {
enum {
HWC_MDPCOMP = 0x00000001,
HWC_COPYBIT = 0x00000002,
HWC_VPUCOMP = 0x00000004,
};

// HAL specific features
enum {
HWC_COLOR_FILL = 0x00000008,
HWC_FORMAT_RB_SWAP = 0x00000040,
HWC_VPU_PIPE = 0x00000200,
};

class LayerRotMap {
Expand Down Expand Up @@ -474,7 +471,6 @@ struct hwc_context_t {
qhwc::HwcDebug *mHwcDebug[HWC_NUM_DISPLAY_TYPES];
hwc_rect_t mViewFrame[HWC_NUM_DISPLAY_TYPES];
qhwc::AssertiveDisplay *mAD;
qhwc::VPUClient *mVPUClient;
eAnimationState mAnimationState[HWC_NUM_DISPLAY_TYPES];
qhwc::HWCVirtualBase *mHWCVirtual;

Expand Down
Loading

0 comments on commit 01cbeba

Please sign in to comment.