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