display: Fix warnings
Treat warnings as errors again Change-Id: Ibd7f484d31ad420b85e82fd5183d70bf7dce4bfa
This commit is contained in:
@@ -19,8 +19,7 @@ common_libs := liblog libutils libcutils libhardware
|
||||
|
||||
#Common C flags
|
||||
common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers
|
||||
#TODO: Add -Werror back once all the current warnings are fixed
|
||||
common_flags += -Wconversion -Wall
|
||||
common_flags += -Wconversion -Wall -Werror
|
||||
|
||||
ifeq ($(ARCH_ARM_HAVE_NEON),true)
|
||||
common_flags += -D__ARM_HAVE_NEON
|
||||
|
||||
@@ -503,7 +503,7 @@ static int set_image(copybit_context_t* ctx, uint32 surfaceId,
|
||||
struct private_handle_t* handle = (struct private_handle_t*)rhs->handle;
|
||||
C2D_SURFACE_TYPE surfaceType;
|
||||
int status = COPYBIT_SUCCESS;
|
||||
uintptr_t gpuaddr = 0;
|
||||
uint64_t gpuaddr = 0;
|
||||
int c2d_format;
|
||||
mapped_idx = -1;
|
||||
|
||||
@@ -1179,7 +1179,7 @@ static int stretch_copybit_internal(
|
||||
return COPYBIT_FAILURE;
|
||||
}
|
||||
if (need_temp_dst) {
|
||||
if (get_size(dst_info) != ctx->temp_dst_buffer.size) {
|
||||
if (get_size(dst_info) != (int) ctx->temp_dst_buffer.size) {
|
||||
free_temp_buffer(ctx->temp_dst_buffer);
|
||||
// Create a temp buffer and set that as the destination.
|
||||
if (COPYBIT_FAILURE == get_temp_buffer(dst_info, ctx->temp_dst_buffer)) {
|
||||
@@ -1261,7 +1261,7 @@ static int stretch_copybit_internal(
|
||||
return COPYBIT_FAILURE;
|
||||
}
|
||||
if (need_temp_src) {
|
||||
if (get_size(src_info) != ctx->temp_src_buffer.size) {
|
||||
if (get_size(src_info) != (int) ctx->temp_src_buffer.size) {
|
||||
free_temp_buffer(ctx->temp_src_buffer);
|
||||
// Create a temp buffer and set that as the destination.
|
||||
if (COPYBIT_SUCCESS != get_temp_buffer(src_info,
|
||||
|
||||
@@ -213,7 +213,7 @@ int convert_yuv_c2d_to_yuv_android(private_handle_t *hnd,
|
||||
return COPYBIT_FAILURE;
|
||||
}
|
||||
|
||||
ret = copy_source_to_destination(hnd->base, dst_hnd->base, info);
|
||||
ret = copy_source_to_destination((uintptr_t) hnd->base, (uintptr_t) dst_hnd->base, info);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -258,6 +258,6 @@ int convert_yuv_android_to_yuv_c2d(private_handle_t *hnd,
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = copy_source_to_destination(hnd->base, dst_hnd->base, info);
|
||||
ret = copy_source_to_destination((uintptr_t) hnd->base, (uintptr_t) dst_hnd->base, info);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
#define DEBUG 0
|
||||
#define ATRACE_TAG (ATRACE_TAG_GRAPHICS | ATRACE_TAG_HAL)
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <stdlib.h>
|
||||
@@ -41,7 +42,6 @@
|
||||
using gralloc::IonAlloc;
|
||||
|
||||
#define ION_DEVICE "/dev/ion"
|
||||
#define ATRACE_TAG (ATRACE_TAG_GRAPHICS | ATRACE_TAG_HAL)
|
||||
|
||||
int IonAlloc::open_device()
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#define ATRACE_TAG (ATRACE_TAG_GRAPHICS | ATRACE_TAG_HAL)
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
@@ -40,7 +41,6 @@
|
||||
#include "memalloc.h"
|
||||
#include <qdMetaData.h>
|
||||
|
||||
#define ATRACE_TAG (ATRACE_TAG_GRAPHICS | ATRACE_TAG_HAL)
|
||||
|
||||
using namespace gralloc;
|
||||
/*****************************************************************************/
|
||||
|
||||
@@ -135,7 +135,7 @@ void AssertiveDisplay::markDoable(hwc_context_t *ctx,
|
||||
const hwc_layer_1_t* layer = &list->hwLayers[nYuvIndex];
|
||||
private_handle_t *hnd = (private_handle_t *)layer->handle;
|
||||
qdutils::MDPVersion& mdpHw = qdutils::MDPVersion::getInstance();
|
||||
if(hnd && hnd->width <= mdpHw.getMaxMixerWidth()) {
|
||||
if(hnd && hnd->width <= (int) mdpHw.getMaxMixerWidth()) {
|
||||
mDoable = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,12 @@
|
||||
#include <sys/stat.h>
|
||||
#include <comptype.h>
|
||||
#ifdef QCOM_BSP
|
||||
// Ignore Wconversion errors for external headers
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
#include <SkBitmap.h>
|
||||
#include <SkImageEncoder.h>
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#ifdef STDC_FORMAT_MACROS
|
||||
#include <inttypes.h>
|
||||
|
||||
@@ -372,7 +372,7 @@ bool MDPComp::isValidDimension(hwc_context_t *ctx, hwc_layer_1_t *layer) {
|
||||
/* On targets that doesnt support Decimation (eg.,8x26)
|
||||
* maximum downscale support is overlay pipe downscale.
|
||||
*/
|
||||
if(crop_w > mdpHw.getMaxMixerWidth() ||
|
||||
if(crop_w > (int) mdpHw.getMaxMixerWidth() ||
|
||||
w_dscale > maxMDPDownscale ||
|
||||
h_dscale > maxMDPDownscale)
|
||||
return false;
|
||||
@@ -383,7 +383,7 @@ bool MDPComp::isValidDimension(hwc_context_t *ctx, hwc_layer_1_t *layer) {
|
||||
* 1. Src crop > Mixer limit on nonsplit MDPComp
|
||||
* 2. exceeds maximum downscale limit
|
||||
*/
|
||||
if(((crop_w > mdpHw.getMaxMixerWidth()) &&
|
||||
if(((crop_w > (int) mdpHw.getMaxMixerWidth()) &&
|
||||
!sSrcSplitEnabled) ||
|
||||
w_dscale > maxMDPDownscale ||
|
||||
h_dscale > maxMDPDownscale) {
|
||||
@@ -712,7 +712,7 @@ bool MDPComp::tryFullFrame(hwc_context_t *ctx,
|
||||
|
||||
MDPVersion& mdpHw = MDPVersion::getInstance();
|
||||
if(mDpy > HWC_DISPLAY_PRIMARY &&
|
||||
(priDispW > mdpHw.getMaxMixerWidth()) &&
|
||||
(priDispW > (int) mdpHw.getMaxMixerWidth()) &&
|
||||
(ctx->dpyAttr[mDpy].xres < mdpHw.getMaxMixerWidth())) {
|
||||
// Disable MDP comp on Secondary when the primary is highres panel and
|
||||
// the secondary is a normal 1080p, because, MDP comp on secondary under
|
||||
@@ -2475,8 +2475,8 @@ bool MDPCompSrcSplit::acquireMDPPipes(hwc_context_t *ctx, hwc_layer_1_t* layer,
|
||||
//pipe line length, we are still using 2 pipes. This is fine just because
|
||||
//this is source split where destination doesn't matter. Evaluate later to
|
||||
//see if going through all the calcs to save a pipe is worth it
|
||||
if(dstWidth > mdpHw.getMaxMixerWidth() or
|
||||
cropWidth > mdpHw.getMaxMixerWidth() or
|
||||
if(dstWidth > (int) mdpHw.getMaxMixerWidth() or
|
||||
cropWidth > (int) mdpHw.getMaxMixerWidth() or
|
||||
(primarySplitAlways and (cropWidth > lSplit))) {
|
||||
pipe_info.rIndex = ctx->mOverlay->getPipe(pipeSpecs);
|
||||
if(pipe_info.rIndex == ovutils::OV_INVALID) {
|
||||
|
||||
@@ -2309,7 +2309,7 @@ void BwcPM::setBwc(const hwc_rect_t& crop, const hwc_rect_t& dst,
|
||||
swap(src_w, src_h);
|
||||
}
|
||||
//src width > MAX mixer supported dim
|
||||
if(src_w > qdutils::MDPVersion::getInstance().getMaxMixerWidth()) {
|
||||
if(src_w > (int) qdutils::MDPVersion::getInstance().getMaxMixerWidth()) {
|
||||
return;
|
||||
}
|
||||
//Decimation necessary, cannot use BWC. H/W requirement.
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <cutils/log.h>
|
||||
#include <utils/Trace.h>
|
||||
#include <overlayWriteback.h>
|
||||
#include "hwc_utils.h"
|
||||
#include "hwc_fbupdate.h"
|
||||
@@ -30,6 +29,7 @@
|
||||
#include "hwc_copybit.h"
|
||||
#include "hwc_virtual.h"
|
||||
#include "sync/sync.h"
|
||||
#include <utils/Trace.h>
|
||||
|
||||
#define HWCVIRTUAL_LOG 0
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_C_INCLUDES += hardware/libhardware/include
|
||||
LOCAL_CFAGS := -Wconversion -Wall -Werror
|
||||
LOCAL_SHARED_LIBRARIES := liblog
|
||||
LOCAL_SRC_FILES := memtrack_msm.c kgsl.c
|
||||
LOCAL_MODULE := memtrack.$(TARGET_BOARD_PLATFORM)
|
||||
|
||||
@@ -99,7 +99,7 @@ int kgsl_memtrack_get_memory(pid_t pid, enum memtrack_type type,
|
||||
* gpuaddr useraddr size id flags type usage sglen
|
||||
* 545ba000 545ba000 4096 1 ----pY gpumem arraybuffer 1
|
||||
*/
|
||||
ret = sscanf(line, "%*x %*lx %lu %*d %6s %6s %18s %*d\n",
|
||||
ret = sscanf(line, "%*x %*x %lu %*d %6s %6s %18s %*d\n",
|
||||
&size, flags, line_type, line_usage);
|
||||
if (ret != 4) {
|
||||
continue;
|
||||
|
||||
@@ -272,7 +272,7 @@ void getDecimationFactor(const int& src_w, const int& src_h,
|
||||
if((int)verDscale)
|
||||
vertDeci = (uint8_t)log2f(verDscale);
|
||||
|
||||
if(src_w > mdpHw.getMaxMixerWidth()) {
|
||||
if(src_w > (int) mdpHw.getMaxMixerWidth()) {
|
||||
//If the client sends us something > what a layer mixer supports
|
||||
//then it means it doesn't want to use split-pipe but wants us to
|
||||
//decimate. A minimum decimation of 2 will ensure that the width is
|
||||
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
bool isDynFpsSupported() { return mPanelInfo.mDynFpsSupported; }
|
||||
uint32_t getMinFpsSupported() { return mPanelInfo.mMinFps; }
|
||||
uint32_t getMaxFpsSupported() { return mPanelInfo.mMaxFps; }
|
||||
int getMaxMixerWidth() const { return mMaxMixerWidth; }
|
||||
uint32_t getMaxMixerWidth() const { return mMaxMixerWidth; }
|
||||
bool isSrcSplit() const;
|
||||
bool isSrcSplitAlways() const;
|
||||
bool isRGBScalarSupported() const;
|
||||
|
||||
Reference in New Issue
Block a user