本文整理汇总了C++中ALOGD_IF函数的典型用法代码示例。如果您正苦于以下问题:C++ ALOGD_IF函数的具体用法?C++ ALOGD_IF怎么用?C++ ALOGD_IF使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ALOGD_IF函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ALOGD_IF
int ExynosHWCService::setForceMirrorMode(unsigned int mode)
{
ALOGD_IF(HWC_SERVICE_DEBUG, "%s::mode=%d", __func__, mode);
mHWCCtx->force_mirror_mode = mode;
mHWCCtx->procs->invalidate(mHWCCtx->procs);
return NO_ERROR;
}
开发者ID:childofthehorn,项目名称:android_hardware_samsung_slsi_exynos5-insignal,代码行数:7,代码来源:ExynosHWCService.cpp
示例2: initResolution
void VirtualDisplay::setAttributes() {
if(mHwcContext) {
uint32_t &extW = mHwcContext->dpyAttr[HWC_DISPLAY_VIRTUAL].xres;
uint32_t &extH = mHwcContext->dpyAttr[HWC_DISPLAY_VIRTUAL].yres;
uint32_t priW = mHwcContext->dpyAttr[HWC_DISPLAY_PRIMARY].xres;
uint32_t priH = mHwcContext->dpyAttr[HWC_DISPLAY_PRIMARY].yres;
initResolution(extW, extH);
// Dynamic Resolution Change depends on MDP downscaling.
// MDP downscale property will be ignored to exercise DRC use case.
// If DRC is in progress, ext WxH will have non-zero values.
bool isDRC = (extW > 0) && (extH > 0);
if(!qdutils::MDPVersion::getInstance().is8x26()
&& (mHwcContext->mMDPDownscaleEnabled || isDRC)) {
// maxArea represents the maximum resolution between
// primary and virtual display.
uint32_t maxArea = max((extW * extH), (priW * priH));
setToPrimary(maxArea, priW, priH, extW, extH);
setDownScaleMode(maxArea);
}
mHwcContext->dpyAttr[HWC_DISPLAY_VIRTUAL].vsync_period =
1000000000l /60;
ALOGD_IF(DEBUG,"%s: Setting Virtual Attr: res(%d x %d)",__FUNCTION__,
mVInfo.xres, mVInfo.yres);
}
}
示例3: ALOGD_IF
bool IntelHWComposer::handleDynamicModeSetting(void *data)
{
bool ret = false;
ALOGD_IF(ALLOW_HWC_PRINT, "%s: handle Dynamic mode setting!\n", __func__);
// check HDMI timing
if (!mDrm->isDrmModeChanged((intel_display_mode_t*)data)){
ALOGD("Same HDMI timing, ignore this setting");
return true;
}
// send plug-out to SF for mode changing on the same device
// otherwise SF will bypass the plug-in message as there is
// no connection change;
ret = handleHotplugEvent(0, NULL);
if (!ret) {
ALOGW("%s: send fake unplug event failed!\n", __func__);
goto out;
}
// then change the mode and send plug-in to SF
ret = handleHotplugEvent(1, data);
if (!ret) {
ALOGW("%s: send plug in event failed!\n", __func__);
goto out;
}
out:
return ret;
}
示例4: if
/* Do this only on brightness ADC. */
void LightSensor::configureRange(uint16_t adc_count)
{
if (!settings.allow_reconfig)
return;
bool increase;
if (adc_count <= RANGE_DEC_THRESHOLD)
increase = false;
else if (adc_count >= RANGE_INC_THRESHOLD)
increase = true;
else
return;
if (increase && settings.range != APS_12D_RANGE_15P36_TO_64000)
settings.range = static_cast<aps_12d_range>(settings.range + 1);
else if (!increase && settings.range != APS_12D_RANGE_0P24_TO_1000)
settings.range = static_cast<aps_12d_range>(settings.range - 1);
else
return;
ALOGD_IF(LIGHT_DEBUG, "LightSensor: New range %d", settings.range);
if (ioctl(dev_fd, APS_IOCTL_SET_SETTINGS, &settings))
ALOGE("LightSensor: Failed to set settings");
}
示例5: ALOGD_IF
void ExtDisplayObserver::setHwcContext(hwc_context_t* hwcCtx) {
ALOGD_IF(EXT_OBSERVER_DEBUG, "%s", __FUNCTION__);
if(hwcCtx) {
mHwcContext = hwcCtx;
}
return;
}
示例6: _l
void SensorDevice::enableAllSensors() {
Mutex::Autolock _l(mLock);
mDisabledClients.clear();
const int halVersion = getHalDeviceVersion();
for (size_t i = 0; i< mActivationCount.size(); ++i) {
Info& info = mActivationCount.editValueAt(i);
if (info.batchParams.isEmpty()) continue;
info.selectBatchParams();
const int sensor_handle = mActivationCount.keyAt(i);
ALOGD_IF(DEBUG_CONNECTIONS, "\t>> reenable actuating h/w sensor enable handle=%d ",
sensor_handle);
status_t err(NO_ERROR);
if (halVersion > SENSORS_DEVICE_API_VERSION_1_0) {
err = mSensorDevice->batch(mSensorDevice, sensor_handle,
info.bestBatchParams.flags, info.bestBatchParams.batchDelay,
info.bestBatchParams.batchTimeout);
ALOGE_IF(err, "Error calling batch on sensor %d (%s)", sensor_handle, strerror(-err));
}
if (err == NO_ERROR) {
err = mSensorDevice->activate(
reinterpret_cast<struct sensors_poll_device_t *>(mSensorDevice),
sensor_handle, 1);
ALOGE_IF(err, "Error activating sensor %d (%s)", sensor_handle, strerror(-err));
}
if (halVersion <= SENSORS_DEVICE_API_VERSION_1_0) {
err = mSensorDevice->setDelay(
reinterpret_cast<struct sensors_poll_device_t *>(mSensorDevice),
sensor_handle, info.bestBatchParams.batchDelay);
ALOGE_IF(err, "Error calling setDelay sensor %d (%s)", sensor_handle, strerror(-err));
}
}
}
示例7: getInstance
bool CopyBit::canUseCopybitForRGB(hwc_context_t *ctx,
hwc_display_contents_1_t *list,
int dpy) {
int compositionType = qdutils::QCCompositionType::
getInstance().getCompositionType();
if (compositionType & qdutils::COMPOSITION_TYPE_DYN) {
// DYN Composition:
// use copybit, if (TotalRGBRenderArea < threashold * FB Area)
// this is done based on perf inputs in ICS
// TODO: Above condition needs to be re-evaluated in JB
int fbWidth = ctx->dpyAttr[dpy].xres;
int fbHeight = ctx->dpyAttr[dpy].yres;
unsigned int fbArea = (fbWidth * fbHeight);
unsigned int renderArea = getRGBRenderingArea(list);
ALOGD_IF (DEBUG_COPYBIT, "%s:renderArea %u, fbArea %u",
__FUNCTION__, renderArea, fbArea);
if (renderArea < (mDynThreshold * fbArea))
return true;
} else if ((compositionType & qdutils::COMPOSITION_TYPE_MDP)) {
// MDP composition, use COPYBIT always
return true;
} else if ((compositionType & qdutils::COMPOSITION_TYPE_C2D)) {
// C2D composition, use COPYBIT
return true;
}
return false;
}
示例8: ALOGD_IF
status_t SensorDevice::flush(void* ident, int handle) {
if (getHalDeviceVersion() < SENSORS_DEVICE_API_VERSION_1_1) {
return INVALID_OPERATION;
}
ALOGD_IF(DEBUG_CONNECTIONS, "\t>>> actuating h/w flush %d", handle);
return mSensorDevice->flush(mSensorDevice, handle);
}
示例9: ALOGE_IF
bool GenericPipe::init()
{
ALOGE_IF(DEBUG_OVERLAY, "GenericPipe init");
mRotDownscaleOpt = false;
int fbNum = Overlay::getFbForDpy(mDpy);
if( fbNum < 0 ) {
ALOGE("%s: Invalid FB for the display: %d",__FUNCTION__, mDpy);
return false;
}
ALOGD_IF(DEBUG_OVERLAY,"%s: mFbNum:%d",__FUNCTION__, fbNum);
if(!mCtrlData.ctrl.init(fbNum)) {
ALOGE("GenericPipe failed to init ctrl");
return false;
}
if(!mCtrlData.data.init(fbNum)) {
ALOGE("GenericPipe failed to init data");
return false;
}
return true;
}
示例10: sprintf
bool ExternalDisplay::writeHPDOption(int userOption) const
{
bool ret = true;
char sysFsHPDFilePath[255];
sprintf(sysFsHPDFilePath ,"/sys/devices/virtual/graphics/fb%d/hpd",
mHdmiFbNum);
int hdmiHPDFile = open(sysFsHPDFilePath,O_RDWR, 0);
if (hdmiHPDFile < 0) {
ALOGE("%s: state file '%s' not found : ret%d err str: %s", __FUNCTION__,
sysFsHPDFilePath, hdmiHPDFile, strerror(errno));
ret = false;
} else {
int err = -1;
ALOGD_IF(DEBUG, "%s: option = %d", __FUNCTION__, userOption);
if(userOption)
err = write(hdmiHPDFile, "1", 2);
else
err = write(hdmiHPDFile, "0" , 2);
if (err <= 0) {
ALOGE("%s: file write failed '%s'", __FUNCTION__, sysFsHPDFilePath);
ret = false;
}
close(hdmiHPDFile);
}
return ret;
}
示例11: open
bool ExternalDisplay::writeHPDOption(int userOption) const
{
bool ret = true;
int hdmiHPDFile = open(SYSFS_HPD,O_RDWR, 0);
if (hdmiHPDFile < 0) {
ALOGE("%s: state file '%s' not found : ret%d"
"err str: %s", __FUNCTION__, SYSFS_HPD, hdmiHPDFile,
strerror(errno));
ret = false;
} else {
int err = -1;
ALOGD_IF(DEBUG, "%s: option = %d", __FUNCTION__,
userOption);
if(userOption)
err = write(hdmiHPDFile, "1", 2);
else
err = write(hdmiHPDFile, "0" , 2);
if (err <= 0) {
ALOGE("%s: file write failed '%s'",
__FUNCTION__, SYSFS_HPD);
ret = false;
}
close(hdmiHPDFile);
}
return ret;
}
示例12: ALOGD_IF
void ExternalDisplay::setExternalDisplay(int connected)
{
hwc_context_t* ctx = mHwcContext;
if(ctx) {
ALOGD_IF(DEBUG, "%s: status = %d", __FUNCTION__,
connected);
if(connected) {
readResolution();
//Get the best mode and set
// TODO: Move this to activate
setResolution(getBestMode());
setDpyAttr();
//enable hdmi vsync
} else {
// Disable the hdmi vsync
closeFrameBuffer();
resetInfo();
}
// Store the external display
mExternalDisplay = connected;
const char* prop = (connected) ? "1" : "0";
// set system property
property_set("hw.hdmiON", prop);
}
return;
}
示例13: getOutputConnection
bool IntelHWComposerDrm::detectMDSModeChange()
{
#ifdef TARGET_HAS_MULTIPLE_DISPLAY
drmModeConnection hdmi = getOutputConnection(OUTPUT_HDMI);
int mdsMode = 0;
if (mMonitor != 0) {
mdsMode = mMonitor->getDisplayMode();
ALOGD_IF(ALLOW_MONITOR_PRINT, "%s: get MDS Mode %d", __func__, mdsMode);
//TODO: overlay only support OVERLAY_EXTEND and OVERLAY_MIPI0
if (mdsMode == OVERLAY_EXTEND && hdmi == DRM_MODE_CONNECTED)
setDisplayMode(OVERLAY_EXTEND);
else if (mdsMode == OVERLAY_CLONE_MIPI0)
setDisplayMode(OVERLAY_CLONE_MIPI0);
else
setDisplayMode(OVERLAY_MIPI0);
} else
#endif
{
setDisplayMode(OVERLAY_MIPI0);
}
return true;
}
示例14: ALOGD_IF
// Connection and Mode setting
bool IntelHWComposerDrm::detectDisplayConnection(int disp)
{
ALOGD_IF(ALLOW_MONITOR_PRINT,
"%s: detecting display %d drm mode info...\n", __func__, disp);
//get mipi0 info
drmModeConnectorPtr connector = NULL;
drmModeModeInfoPtr mode = NULL;
uint32_t connector_type;
connector = getConnector(disp);
if (!connector) {
ALOGW("%s: fail to get drm connector\n", __func__);
return false;
}
//update connection status
setOutputConnection(disp, connector->connection);
if (connector->connection != DRM_MODE_CONNECTED) {
freeConnector(connector);
return false;
}
//update mode info
mode = getSelectMode(NULL, connector);
if (mode)
setOutputMode(disp, mode, 1);
freeConnector(connector);
return true;
}
示例15: mWbFd
AssertiveDisplay::AssertiveDisplay(hwc_context_t *ctx) : mWbFd(-1),
mDoable(false), mFeatureEnabled(false),
mDest(overlay::utils::OV_INVALID) {
int fd = openWbFb();
if(fd >= 0) {
//Values in ad node:
//-1 means feature is disabled on device
// 0 means feature exists but turned off, will be turned on by hwc
// 1 means feature is turned on by hwc
// Plus, we do this feature only on split primary displays.
// Plus, we do this feature only if ro.qcom.ad=2
char property[PROPERTY_VALUE_MAX];
const int ENABLED = 2;
int val = 0;
if(property_get("ro.qcom.ad", property, "0") > 0) {
val = atoi(property);
}
if(adRead() >= 0 && isDisplaySplit(ctx, HWC_DISPLAY_PRIMARY) &&
val == ENABLED) {
ALOGD_IF(DEBUG, "Assertive display feature supported");
mFeatureEnabled = true;
}
closeWbFb(fd);
}
}