display: Enable clang for all display modules
Change-Id: I71e3fa3f7d44253b8e01d1eafe086b1898d65a8e
This commit is contained in:
@@ -8,7 +8,8 @@ LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_C_INCLUDES := $(common_includes)
|
||||
LOCAL_SHARED_LIBRARIES := $(common_libs) libqservice libbinder libqdutils
|
||||
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdhdmi_cec\"
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdhdmi_cec\" -Wno-sign-conversion
|
||||
LOCAL_CLANG := true
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
|
||||
LOCAL_SRC_FILES := qhdmi_cec.cpp \
|
||||
QHDMIClient.cpp
|
||||
|
||||
@@ -26,8 +26,9 @@ LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
|
||||
LOCAL_SHARED_LIBRARIES := $(common_libs) libdl libmemalloc
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdcopybit\"
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdcopybit\" -Wno-sign-conversion
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
|
||||
LOCAL_CLANG := true
|
||||
|
||||
ifeq ($(TARGET_USES_C2D_COMPOSITION),true)
|
||||
LOCAL_CFLAGS += -DCOPYBIT_Z180=1 -DC2D_SUPPORT_DISPLAY=1
|
||||
|
||||
@@ -194,22 +194,22 @@ static int open_copybit(const struct hw_module_t* module, const char* name,
|
||||
struct hw_device_t** device);
|
||||
|
||||
static struct hw_module_methods_t copybit_module_methods = {
|
||||
open: open_copybit
|
||||
.open = open_copybit,
|
||||
};
|
||||
|
||||
/*
|
||||
* The COPYBIT Module
|
||||
*/
|
||||
struct copybit_module_t HAL_MODULE_INFO_SYM = {
|
||||
common: {
|
||||
tag: HARDWARE_MODULE_TAG,
|
||||
version_major: 1,
|
||||
version_minor: 0,
|
||||
id: COPYBIT_HARDWARE_MODULE_ID,
|
||||
name: "QCT COPYBIT C2D 2.0 Module",
|
||||
author: "Qualcomm",
|
||||
methods: ©bit_module_methods
|
||||
}
|
||||
.common = {
|
||||
.tag = HARDWARE_MODULE_TAG,
|
||||
.version_major = 1,
|
||||
.version_minor = 0,
|
||||
.id = COPYBIT_HARDWARE_MODULE_ID,
|
||||
.name = "QCT COPYBIT C2D 2.0 Module",
|
||||
.author = "Qualcomm",
|
||||
.methods = ©bit_module_methods
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -925,27 +925,6 @@ static int get(struct copybit_device_t *dev, int name)
|
||||
return value;
|
||||
}
|
||||
|
||||
static int is_alpha(int cformat)
|
||||
{
|
||||
int alpha = 0;
|
||||
switch (cformat & 0xFF) {
|
||||
case C2D_COLOR_FORMAT_8888_ARGB:
|
||||
case C2D_COLOR_FORMAT_8888_RGBA:
|
||||
case C2D_COLOR_FORMAT_5551_RGBA:
|
||||
case C2D_COLOR_FORMAT_4444_ARGB:
|
||||
alpha = 1;
|
||||
break;
|
||||
default:
|
||||
alpha = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if(alpha && (cformat&C2D_FORMAT_DISABLE_ALPHA))
|
||||
alpha = 0;
|
||||
|
||||
return alpha;
|
||||
}
|
||||
|
||||
/* Function to check if we need a temporary buffer for the blit.
|
||||
* This would happen if the requested destination stride and the
|
||||
* C2D stride do not match. We ignore RGB buffers, since their
|
||||
|
||||
@@ -23,7 +23,8 @@ LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
|
||||
LOCAL_SHARED_LIBRARIES := $(common_libs) libmemalloc libqdMetaData
|
||||
LOCAL_SHARED_LIBRARIES += libqdutils libGLESv1_CM
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdgralloc\"
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdgralloc\" -Wno-sign-conversion
|
||||
LOCAL_CLANG := true
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) $(kernel_deps)
|
||||
LOCAL_SRC_FILES := gpu.cpp gralloc.cpp framebuffer.cpp mapper.cpp
|
||||
LOCAL_COPY_HEADERS_TO := $(common_header_export_path)
|
||||
@@ -38,7 +39,8 @@ LOCAL_MODULE := libmemalloc
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
|
||||
LOCAL_SHARED_LIBRARIES := $(common_libs) libqdutils libdl
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdmemalloc\"
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdmemalloc\" -Wno-sign-conversion
|
||||
LOCAL_CLANG := true
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) $(kernel_deps)
|
||||
LOCAL_SRC_FILES := ionalloc.cpp alloc_controller.cpp
|
||||
LOCAL_COPY_HEADERS := alloc_controller.h memalloc.h
|
||||
|
||||
@@ -646,7 +646,7 @@ unsigned int getSize(int format, int width, int height, int usage,
|
||||
size = alignedw * alignedh * ASTC_BLOCK_SIZE;
|
||||
break;
|
||||
default:
|
||||
ALOGE("Unrecognized pixel format: 0x%x", __FUNCTION__, format);
|
||||
ALOGE("%s: Unrecognized pixel format: 0x%x", __FUNCTION__, format);
|
||||
return 0;
|
||||
}
|
||||
return size;
|
||||
|
||||
@@ -43,14 +43,6 @@
|
||||
#include <profiler.h>
|
||||
|
||||
#define EVEN_OUT(x) if (x & 0x0001) {x--;}
|
||||
/** min of int a, b */
|
||||
static inline int min(int a, int b) {
|
||||
return (a<b) ? a : b;
|
||||
}
|
||||
/** max of int a, b */
|
||||
static inline int max(int a, int b) {
|
||||
return (a>b) ? a : b;
|
||||
}
|
||||
|
||||
enum {
|
||||
PAGE_FLIP = 0x00000001,
|
||||
|
||||
@@ -61,36 +61,36 @@ extern int gralloc_perform(struct gralloc_module_t const* module,
|
||||
|
||||
// HAL module methods
|
||||
static struct hw_module_methods_t gralloc_module_methods = {
|
||||
open: gralloc_device_open
|
||||
.open = gralloc_device_open
|
||||
};
|
||||
|
||||
// HAL module initialize
|
||||
struct private_module_t HAL_MODULE_INFO_SYM = {
|
||||
base: {
|
||||
common: {
|
||||
tag: HARDWARE_MODULE_TAG,
|
||||
version_major: 1,
|
||||
version_minor: 0,
|
||||
id: GRALLOC_HARDWARE_MODULE_ID,
|
||||
name: "Graphics Memory Allocator Module",
|
||||
author: "The Android Open Source Project",
|
||||
methods: &gralloc_module_methods,
|
||||
dso: 0,
|
||||
reserved: {0},
|
||||
.base = {
|
||||
.common = {
|
||||
.tag = HARDWARE_MODULE_TAG,
|
||||
.version_major = 1,
|
||||
.version_minor = 0,
|
||||
.id = GRALLOC_HARDWARE_MODULE_ID,
|
||||
.name = "Graphics Memory Allocator Module",
|
||||
.author = "The Android Open Source Project",
|
||||
.methods = &gralloc_module_methods,
|
||||
.dso = 0,
|
||||
.reserved = {0},
|
||||
},
|
||||
registerBuffer: gralloc_register_buffer,
|
||||
unregisterBuffer: gralloc_unregister_buffer,
|
||||
lock: gralloc_lock,
|
||||
unlock: gralloc_unlock,
|
||||
perform: gralloc_perform,
|
||||
lock_ycbcr: gralloc_lock_ycbcr,
|
||||
.registerBuffer = gralloc_register_buffer,
|
||||
.unregisterBuffer = gralloc_unregister_buffer,
|
||||
.lock = gralloc_lock,
|
||||
.unlock = gralloc_unlock,
|
||||
.perform = gralloc_perform,
|
||||
.lock_ycbcr = gralloc_lock_ycbcr,
|
||||
},
|
||||
framebuffer: 0,
|
||||
fbFormat: 0,
|
||||
flags: 0,
|
||||
numBuffers: 0,
|
||||
bufferMask: 0,
|
||||
lock: PTHREAD_MUTEX_INITIALIZER,
|
||||
.framebuffer = 0,
|
||||
.fbFormat = 0,
|
||||
.flags = 0,
|
||||
.numBuffers = 0,
|
||||
.bufferMask = 0,
|
||||
.lock = PTHREAD_MUTEX_INITIALIZER,
|
||||
};
|
||||
|
||||
// Open Gralloc device
|
||||
|
||||
@@ -118,7 +118,7 @@ static int gralloc_unmap(gralloc_module_t const* module,
|
||||
if(hnd->base) {
|
||||
err = memalloc->unmap_buffer((void*)hnd->base, hnd->size, hnd->offset);
|
||||
if (err) {
|
||||
ALOGE("Could not unmap memory at address %p, %s", hnd->base,
|
||||
ALOGE("Could not unmap memory at address %p, %s", (void*) hnd->base,
|
||||
strerror(errno));
|
||||
return -errno;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ static int gralloc_unmap(gralloc_module_t const* module,
|
||||
size, hnd->offset_metadata);
|
||||
if (err) {
|
||||
ALOGE("Could not unmap memory at address %p, %s",
|
||||
hnd->base_metadata, strerror(errno));
|
||||
(void*) hnd->base_metadata, strerror(errno));
|
||||
return -errno;
|
||||
}
|
||||
hnd->base_metadata = 0;
|
||||
|
||||
@@ -21,6 +21,7 @@ LOCAL_SRC_FILES := lights.c
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_SHARED_LIBRARIES := liblog
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdlights\"
|
||||
LOCAL_CLANG := true
|
||||
LOCAL_MODULE := lights.$(TARGET_BOARD_PLATFORM)
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_C_INCLUDES += hardware/libhardware/include
|
||||
LOCAL_CFAGS := -Wconversion -Wall -Werror
|
||||
LOCAL_CFLAGS := -Wconversion -Wall -Werror -Wno-sign-conversion
|
||||
LOCAL_CLANG := true
|
||||
LOCAL_SHARED_LIBRARIES := liblog
|
||||
LOCAL_SRC_FILES := memtrack_msm.c kgsl.c
|
||||
LOCAL_MODULE := memtrack.$(TARGET_BOARD_PLATFORM)
|
||||
|
||||
@@ -45,14 +45,12 @@ int kgsl_memtrack_get_memory(pid_t pid, enum memtrack_type type,
|
||||
size_t *num_records)
|
||||
{
|
||||
size_t allocated_records = min(*num_records, ARRAY_SIZE(record_templates));
|
||||
int i;
|
||||
FILE *fp;
|
||||
char line[1024];
|
||||
char tmp[128];
|
||||
bool is_surfaceflinger = false;
|
||||
size_t accounted_size = 0;
|
||||
size_t unaccounted_size = 0;
|
||||
unsigned long smaps_addr = 0;
|
||||
|
||||
*num_records = ARRAY_SIZE(record_templates);
|
||||
|
||||
|
||||
@@ -47,17 +47,17 @@ static struct hw_module_methods_t memtrack_module_methods = {
|
||||
};
|
||||
|
||||
struct memtrack_module HAL_MODULE_INFO_SYM = {
|
||||
common: {
|
||||
tag: HARDWARE_MODULE_TAG,
|
||||
module_api_version: MEMTRACK_MODULE_API_VERSION_0_1,
|
||||
hal_api_version: HARDWARE_HAL_API_VERSION,
|
||||
id: MEMTRACK_HARDWARE_MODULE_ID,
|
||||
name: "MSM Memory Tracker HAL",
|
||||
author: "The Android Open Source Project",
|
||||
methods: &memtrack_module_methods,
|
||||
.common = {
|
||||
.tag = HARDWARE_MODULE_TAG,
|
||||
.module_api_version = MEMTRACK_MODULE_API_VERSION_0_1,
|
||||
.hal_api_version = HARDWARE_HAL_API_VERSION,
|
||||
.id = MEMTRACK_HARDWARE_MODULE_ID,
|
||||
.name = "MSM Memory Tracker HAL",
|
||||
.author = "The Android Open Source Project",
|
||||
.methods = &memtrack_module_methods,
|
||||
},
|
||||
|
||||
init: msm_memtrack_init,
|
||||
getMemory: msm_memtrack_get_memory,
|
||||
.init = msm_memtrack_init,
|
||||
.getMemory = msm_memtrack_get_memory,
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@ LOCAL_MODULE := libqdutils
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_SHARED_LIBRARIES := $(common_libs) libui libbinder libqservice
|
||||
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdutils\"
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdutils\" -Wno-sign-conversion
|
||||
LOCAL_CLANG := true
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
|
||||
LOCAL_COPY_HEADERS_TO := $(common_header_export_path)
|
||||
LOCAL_COPY_HEADERS := display_config.h
|
||||
@@ -23,8 +24,9 @@ LOCAL_SHARED_LIBRARIES := liblog libcutils
|
||||
LOCAL_C_INCLUDES := $(common_includes)
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
|
||||
LOCAL_SRC_FILES := qdMetaData.cpp
|
||||
LOCAL_CFLAGS := $(common_flags)
|
||||
LOCAL_CFLAGS := $(common_flags) -Wno-sign-conversion
|
||||
LOCAL_CFLAGS += -DLOG_TAG=\"DisplayMetaData\"
|
||||
LOCAL_CLANG := true
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE := libqdMetaData
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
@@ -6,7 +6,8 @@ LOCAL_MODULE := libqservice
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
|
||||
LOCAL_SHARED_LIBRARIES := $(common_libs) libbinder
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdqservice\"
|
||||
LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdqservice\" -Wno-sign-conversion
|
||||
LOCAL_CLANG := true
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps)
|
||||
LOCAL_SRC_FILES := QService.cpp \
|
||||
IQService.cpp \
|
||||
|
||||
Reference in New Issue
Block a user