Merge "display: remove compiler warnings"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
995d0a8ac9
@@ -962,7 +962,7 @@ static void populate_buffer_info(struct copybit_image_t const *img, bufferInfo&
|
||||
/* Function to get the required size for a particular format, inorder for C2D to perform
|
||||
* the blit operation.
|
||||
*/
|
||||
static size_t get_size(const bufferInfo& info)
|
||||
static int get_size(const bufferInfo& info)
|
||||
{
|
||||
int size = 0;
|
||||
int w = info.width;
|
||||
|
||||
@@ -191,7 +191,7 @@ void ExternalDisplay::readCEUnderscanInfo()
|
||||
return;
|
||||
} else {
|
||||
len = read(hdmiScanInfoFile, scanInfo, sizeof(scanInfo)-1);
|
||||
ALOGD("%s: Scan Info string: %s length = %zu",
|
||||
ALOGD("%s: Scan Info string: %s length = %zd",
|
||||
__FUNCTION__, scanInfo, len);
|
||||
if (len <= 0) {
|
||||
close(hdmiScanInfoFile);
|
||||
@@ -313,7 +313,7 @@ bool ExternalDisplay::readResolution()
|
||||
return false;
|
||||
} else {
|
||||
len = read(hdmiEDIDFile, edidStr, sizeof(edidStr)-1);
|
||||
ALOGD_IF(DEBUG, "%s: EDID string: %s length = %zu",
|
||||
ALOGD_IF(DEBUG, "%s: EDID string: %s length = %zd",
|
||||
__FUNCTION__, edidStr, len);
|
||||
if ( len <= 0) {
|
||||
ALOGE("%s: edid_modes file empty '%s'",
|
||||
|
||||
@@ -237,7 +237,7 @@ int gpu_context_t::gralloc_alloc_framebuffer_locked(int usage,
|
||||
// find a free slot
|
||||
for (uint32_t i=0 ; i<numBuffers ; i++) {
|
||||
if ((bufferMask & (1LU<<i)) == 0) {
|
||||
m->bufferMask |= (1LU<<i);
|
||||
m->bufferMask |= (uint32_t)(1LU<<i);
|
||||
break;
|
||||
}
|
||||
vaddr += bufferSize;
|
||||
@@ -327,7 +327,7 @@ int gpu_context_t::free_impl(private_handle_t const* hnd) {
|
||||
const unsigned int bufferSize = m->finfo.line_length * m->info.yres;
|
||||
unsigned int index = (unsigned int) ((hnd->base - m->framebuffer->base)
|
||||
/ bufferSize);
|
||||
m->bufferMask &= ~(1LU<<index);
|
||||
m->bufferMask &= (uint32_t)~(1LU<<index);
|
||||
} else {
|
||||
|
||||
terminateBuffer(&m->base, const_cast<private_handle_t*>(hnd));
|
||||
|
||||
@@ -261,7 +261,7 @@ struct private_handle_t : public native_handle {
|
||||
hnd->magic != sMagic)
|
||||
{
|
||||
ALOGD("Invalid gralloc handle (at %p): "
|
||||
"ver(%d/%u) ints(%d/%d) fds(%d/%d)"
|
||||
"ver(%d/%zu) ints(%d/%d) fds(%d/%d)"
|
||||
"magic(%c%c%c%c/%c%c%c%c)",
|
||||
h,
|
||||
h ? h->version : -1, sizeof(native_handle),
|
||||
|
||||
@@ -114,7 +114,7 @@ int IonAlloc::alloc_buffer(alloc_data& data)
|
||||
data.base = base;
|
||||
data.fd = fd_data.fd;
|
||||
ioctl(mIonFd, ION_IOC_FREE, &handle_data);
|
||||
ALOGD_IF(DEBUG, "ion: Allocated buffer base:%p size:%u fd:%d",
|
||||
ALOGD_IF(DEBUG, "ion: Allocated buffer base:%p size:%zu fd:%d",
|
||||
data.base, ionAllocData.len, data.fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -335,9 +335,9 @@ static int hwc_prepare(hwc_composer_device_1 *dev, size_t numDisplays,
|
||||
|
||||
//Will be unlocked at the end of set
|
||||
ctx->mDrawLock.lock();
|
||||
setPaddingRound(ctx,numDisplays,displays);
|
||||
setDMAState(ctx,numDisplays,displays);
|
||||
setNumActiveDisplays(ctx,numDisplays,displays);
|
||||
setPaddingRound(ctx, (int)numDisplays, displays);
|
||||
setDMAState(ctx, (int)numDisplays, displays);
|
||||
setNumActiveDisplays(ctx, (int)numDisplays, displays);
|
||||
reset(ctx, (int)numDisplays, displays);
|
||||
|
||||
ctx->mOverlay->configBegin();
|
||||
|
||||
@@ -384,7 +384,7 @@ bool CopyBit::drawUsingAppBufferComposition(hwc_context_t *ctx,
|
||||
hwc_display_contents_1_t *list,
|
||||
int dpy, int *copybitFd) {
|
||||
int layerCount = 0;
|
||||
uint32_t last = list->numHwLayers - 1;
|
||||
uint32_t last = (uint32_t)list->numHwLayers - 1;
|
||||
hwc_layer_1_t *fbLayer = &list->hwLayers[last];
|
||||
private_handle_t *fbhnd = (private_handle_t *)fbLayer->handle;
|
||||
|
||||
@@ -501,7 +501,6 @@ bool CopyBit::draw(hwc_context_t *ctx, hwc_display_contents_1_t *list,
|
||||
|
||||
// numAppLayers-1, as we iterate from 0th layer index with HWC_COPYBIT flag
|
||||
for (int i = 0; i <= (ctx->listStats[dpy].numAppLayers-1); i++) {
|
||||
hwc_layer_1_t *layer = &list->hwLayers[i];
|
||||
if(!(layerProp[i].mFlags & HWC_COPYBIT)) {
|
||||
ALOGD_IF(DEBUG_COPYBIT, "%s: Not Marked for copybit", __FUNCTION__);
|
||||
continue;
|
||||
@@ -1054,8 +1053,8 @@ struct copybit_device_t* CopyBit::getCopyBitDevice() {
|
||||
return mEngine;
|
||||
}
|
||||
|
||||
CopyBit::CopyBit(hwc_context_t *ctx, const int& dpy) : mIsModeOn(false),
|
||||
mCopyBitDraw(false), mCurRenderBufferIndex(0), mEngine(0) {
|
||||
CopyBit::CopyBit(hwc_context_t *ctx, const int& dpy) : mEngine(0),
|
||||
mIsModeOn(false), mCopyBitDraw(false), mCurRenderBufferIndex(0) {
|
||||
|
||||
getBufferSizeAndDimensions(ctx->dpyAttr[dpy].xres,
|
||||
ctx->dpyAttr[dpy].yres,
|
||||
|
||||
@@ -1702,6 +1702,8 @@ void MDPCompNonSplit::adjustForSourceSplit(hwc_context_t *ctx,
|
||||
//fbz is above 4k2k layer, increment fb zorder by 1
|
||||
//as we split 4k2k layer and increment zorder for right half
|
||||
//of the layer
|
||||
if(!ctx)
|
||||
return;
|
||||
if(mCurrentFrame.fbZ >= 0) {
|
||||
for (int index = 0, mdpNextZOrder = 0; index < mCurrentFrame.layerCount;
|
||||
index++) {
|
||||
|
||||
@@ -481,10 +481,10 @@ void getAspectRatioPosition(hwc_context_t* ctx, int dpy, int extOrientation,
|
||||
width = float(rect.right - rect.left);
|
||||
height = float(rect.bottom - rect.top);
|
||||
}
|
||||
xRatio = (float)(inPos.x/actualWidth);
|
||||
yRatio = (float)(inPos.y/actualHeight);
|
||||
wRatio = (float)(inPos.w/actualWidth);
|
||||
hRatio = (float)(inPos.h/actualHeight);
|
||||
xRatio = (float)((float)inPos.x/actualWidth);
|
||||
yRatio = (float)((float)inPos.y/actualHeight);
|
||||
wRatio = (float)((float)inPos.w/actualWidth);
|
||||
hRatio = (float)((float)inPos.h/actualHeight);
|
||||
|
||||
//Calculate the pos9ition...
|
||||
outPos.x = uint32_t((xRatio * width) + (float)xPos);
|
||||
@@ -1373,10 +1373,7 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy,
|
||||
|
||||
//Waits for acquire fences, returns a release fence
|
||||
if(LIKELY(!swapzero)) {
|
||||
uint64_t start = systemTime();
|
||||
ret = ioctl(fbFd, MSMFB_BUFFER_SYNC, &data);
|
||||
ALOGD_IF(HWC_UTILS_DEBUG, "%s: time taken for MSMFB_BUFFER_SYNC IOCTL = %d",
|
||||
__FUNCTION__, (size_t) ns2ms(systemTime() - start));
|
||||
}
|
||||
|
||||
if(ret < 0) {
|
||||
|
||||
@@ -71,8 +71,8 @@ static void handle_vsync_event(hwc_context_t* ctx, int dpy, char *data)
|
||||
static void handle_blank_event(hwc_context_t* ctx, int dpy, char *data)
|
||||
{
|
||||
if (!strncmp(data, PANEL_ON_STR, strlen(PANEL_ON_STR))) {
|
||||
uint32_t poweron = strtoul(data + strlen(PANEL_ON_STR), NULL, 0);
|
||||
ALOGI("%s: dpy:%d panel power state: %d", __FUNCTION__, dpy, poweron);
|
||||
unsigned long int poweron = strtoul(data + strlen(PANEL_ON_STR), NULL, 0);
|
||||
ALOGI("%s: dpy:%d panel power state: %ld", __FUNCTION__, dpy, poweron);
|
||||
ctx->dpyAttr[dpy].isActive = poweron ? true: false;
|
||||
}
|
||||
}
|
||||
@@ -151,7 +151,7 @@ static void *vsync_loop(void *param)
|
||||
|
||||
if (LIKELY(!ctx->vstate.fakevsync)) {
|
||||
do {
|
||||
int err = poll(*pfd, num_displays * num_events, -1);
|
||||
int err = poll(*pfd, (int)(num_displays * num_events), -1);
|
||||
if(err > 0) {
|
||||
for (int dpy = HWC_DISPLAY_PRIMARY; dpy < num_displays; dpy++) {
|
||||
for(size_t ev = 0; ev < num_events; ev++) {
|
||||
|
||||
@@ -33,7 +33,7 @@ MdpRot::~MdpRot() { close(); }
|
||||
|
||||
bool MdpRot::enabled() const { return mRotImgInfo.enable; }
|
||||
|
||||
void MdpRot::setRotations(uint32_t r) { mRotImgInfo.rotations = r; }
|
||||
void MdpRot::setRotations(uint32_t r) { mRotImgInfo.rotations = (uint8_t)r; }
|
||||
|
||||
int MdpRot::getDstMemId() const {
|
||||
return mRotDataInfo.dst.memory_id;
|
||||
|
||||
@@ -103,7 +103,7 @@ bool IdleInvalidator::threadLoop() {
|
||||
char data[64];
|
||||
// Consume the node by reading it
|
||||
ssize_t len = pread(pFd.fd, data, 64, 0);
|
||||
ALOGD_IF(II_DEBUG, "IdleInvalidator::%s Idle Timeout fired len %zu",
|
||||
ALOGD_IF(II_DEBUG, "IdleInvalidator::%s Idle Timeout fired len %zd",
|
||||
__FUNCTION__, len);
|
||||
mHandler((void*)mHwcContext);
|
||||
}
|
||||
|
||||
@@ -137,7 +137,6 @@ void MDPVersion::updatePanelInfo() {
|
||||
FILE *panelInfoNodeFP = NULL;
|
||||
const int MAX_FRAME_BUFFER_NAME_SIZE = 128;
|
||||
char fbType[MAX_FRAME_BUFFER_NAME_SIZE];
|
||||
char panelInfo[MAX_FRAME_BUFFER_NAME_SIZE];
|
||||
const char *strCmdPanel = "mipi dsi cmd panel";
|
||||
const char *strVideoPanel = "mipi dsi video panel";
|
||||
const char *strLVDSPanel = "lvds panel";
|
||||
|
||||
Reference in New Issue
Block a user