Skip to content

Commit

Permalink
resolved conflicts for merge of 000cb84 to lmp-mr1-dev-plus-aosp
Browse files Browse the repository at this point in the history
Change-Id: Idb4b55f50e3e0ab7026eed5a5d8b3ce29b5630c1
  • Loading branch information
Simon Wilson committed Jan 9, 2015
2 parents b85206b + 000cb84 commit 6dbc8db
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 12 deletions.
5 changes: 0 additions & 5 deletions msm8226/libhwcomposer/hwc_mdpcomp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ bool MDPComp::init(hwc_context_t *ctx) {
sEnableMixedMode = false;
}

if(property_get("debug.mdpcomp.logs", property, NULL) > 0) {
if(atoi(property) != 0)
sDebugLogs = true;
}

sMaxPipesPerMixer = MAX_PIPES_PER_MIXER;
if(property_get("debug.mdpcomp.maxpermixer", property, "-1") > 0) {
int val = atoi(property);
Expand Down
1 change: 1 addition & 0 deletions msm8226/libhwcomposer/hwc_mdpcomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class MDPComp {
static bool init(hwc_context_t *ctx);
static void resetIdleFallBack() { sIdleFallBack = false; }
static bool isIdleFallback() { return sIdleFallBack; }
static void dynamicDebug(bool enable){ sDebugLogs = enable; }

protected:
enum { MAX_SEC_LAYERS = 1 }; //TODO add property support
Expand Down
24 changes: 24 additions & 0 deletions msm8226/libhwcomposer/hwc_qclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <IQService.h>
#include <hwc_utils.h>
#include <mdp_version.h>
#include <hwc_mdpcomp.h>

#define QCLIENT_DEBUG 0

Expand Down Expand Up @@ -213,6 +214,26 @@ static status_t setViewFrame(hwc_context_t* ctx, const Parcel* inParcel) {
}
}

static void toggleDynamicDebug(hwc_context_t* ctx, const Parcel* inParcel) {
int debug_type = inParcel->readInt32();
bool enable = !!inParcel->readInt32();
ALOGD("%s: debug_type: %d enable:%d",
__FUNCTION__, debug_type, enable);
Locker::Autolock _sl(ctx->mDrawLock);
switch (debug_type) {
//break is ignored for DEBUG_ALL to toggle all of them at once
case IQService::DEBUG_ALL:
case IQService::DEBUG_MDPCOMP:
qhwc::MDPComp::dynamicDebug(enable);
if (debug_type != IQService::DEBUG_ALL)
break;
case IQService::DEBUG_VSYNC:
ctx->vstate.debug = enable;
if (debug_type != IQService::DEBUG_ALL)
break;
}
}

status_t QClient::notifyCallback(uint32_t command, const Parcel* inParcel,
Parcel* outParcel) {
status_t ret = NO_ERROR;
Expand Down Expand Up @@ -255,6 +276,9 @@ status_t QClient::notifyCallback(uint32_t command, const Parcel* inParcel,
case IQService::SET_VIEW_FRAME:
setViewFrame(mHwcContext, inParcel);
break;
case IQService::DYNAMIC_DEBUG:
toggleDynamicDebug(mHwcContext, inParcel);
break;
default:
ret = NO_ERROR;
}
Expand Down
1 change: 1 addition & 0 deletions msm8226/libhwcomposer/hwc_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ struct LayerProp {
struct VsyncState {
bool enable;
bool fakevsync;
bool debug;
};

struct BwcPM {
Expand Down
8 changes: 1 addition & 7 deletions msm8226/libhwcomposer/hwc_vsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ namespace qhwc {
#define PANEL_ON_STR "panel_power_on ="
#define ARRAY_LENGTH(array) (sizeof((array))/sizeof((array)[0]))
const int MAX_DATA = 64;
bool logvsync = false;

int hwc_vsync_control(hwc_context_t* ctx, int dpy, int enable)
{
Expand All @@ -63,7 +62,7 @@ static void handle_vsync_event(hwc_context_t* ctx, int dpy, char *data)
timestamp = strtoull(data + strlen("VSYNC="), NULL, 0);
}
// send timestamp to SurfaceFlinger
ALOGD_IF (logvsync, "%s: timestamp %" PRIu64 " sent to SF for dpy=%d",
ALOGD_IF (ctx->vstate.debug, "%s: timestamp %"PRIu64" sent to SF for dpy=%d",
__FUNCTION__, timestamp, dpy);
ctx->proc->vsync(ctx->proc, dpy, timestamp);
}
Expand Down Expand Up @@ -111,11 +110,6 @@ static void *vsync_loop(void *param)
ctx->vstate.fakevsync = true;
}

if(property_get("debug.hwc.logvsync", property, 0) > 0) {
if(atoi(property) == 1)
logvsync = true;
}

char node_path[MAX_SYSFS_FILE_PATH];
#ifdef VSYNC_FAILURE_FALLBACK
int fake_vsync_switch_cnt = 0;
Expand Down
7 changes: 7 additions & 0 deletions msm8226/libqservice/IQService.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class IQService : public android::IInterface
PAUSE_WFD, // Pause/Resume WFD
SET_WFD_STATUS, // Set if wfd connection is on/off
SET_VIEW_FRAME, // Set view frame of display
DYNAMIC_DEBUG, // Enable more logging on the fly
COMMAND_LIST_END = 400,
};

Expand All @@ -60,6 +61,12 @@ class IQService : public android::IInterface
START,
};

enum {
DEBUG_ALL,
DEBUG_MDPCOMP,
DEBUG_VSYNC,
};

// Register a client that can be notified
virtual void connect(const android::sp<qClient::IQClient>& client) = 0;
// Generic function to dispatch binder commands
Expand Down

0 comments on commit 6dbc8db

Please sign in to comment.