sdm: LLVM SA enablement
CRs-Fixed: 2077191 Change-Id: I23066befa5034523788a78edac9b335494d43019
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
78b2086266
commit
80a15d7484
@@ -36,6 +36,10 @@ ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
|
|||||||
common_flags += -DUSER_DEBUG
|
common_flags += -DUSER_DEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(LLVM_SA), true)
|
||||||
|
common_flags += --compile-and-analyze --analyzer-perf --analyzer-Werror
|
||||||
|
endif
|
||||||
|
|
||||||
common_includes := system/core/base/include
|
common_includes := system/core/base/include
|
||||||
CHECK_VERSION_LE = $(shell if [ $(1) -le $(2) ] ; then echo true ; else echo false ; fi)
|
CHECK_VERSION_LE = $(shell if [ $(1) -le $(2) ] ; then echo true ; else echo false ; fi)
|
||||||
PLATFORM_SDK_NOUGAT = 25
|
PLATFORM_SDK_NOUGAT = 25
|
||||||
|
|||||||
@@ -9,4 +9,8 @@ LOCAL_SRC_FILES := DisplayConfig.cpp
|
|||||||
LOCAL_SHARED_LIBRARIES := libhidlbase libhidltransport libutils \
|
LOCAL_SHARED_LIBRARIES := libhidlbase libhidltransport libutils \
|
||||||
vendor.display.config@1.0 android.hidl.base@1.0
|
vendor.display.config@1.0 android.hidl.base@1.0
|
||||||
|
|
||||||
|
ifeq ($(LLVM_SA), true)
|
||||||
|
LOCAL_CFLAGS += --compile-and-analyze --analyzer-perf --analyzer-Werror
|
||||||
|
endif
|
||||||
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ LOCAL_SRC_FILES := lights.c lights_prv.cpp
|
|||||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||||
LOCAL_SHARED_LIBRARIES := liblog libcutils libsdm-disp-vndapis
|
LOCAL_SHARED_LIBRARIES := liblog libcutils libsdm-disp-vndapis
|
||||||
LOCAL_CFLAGS := -DLOG_TAG=\"qdlights\"
|
LOCAL_CFLAGS := -DLOG_TAG=\"qdlights\"
|
||||||
|
ifeq ($(LLVM_SA), true)
|
||||||
|
LOCAL_CFLAGS += --compile-and-analyze --analyzer-perf --analyzer-Werror
|
||||||
|
endif
|
||||||
LOCAL_CLANG := true
|
LOCAL_CLANG := true
|
||||||
LOCAL_MODULE := lights.$(TARGET_BOARD_PLATFORM)
|
LOCAL_MODULE := lights.$(TARGET_BOARD_PLATFORM)
|
||||||
LOCAL_MODULE_TAGS := optional
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
|||||||
@@ -264,6 +264,7 @@ int getDPTestConfig(uint32_t *panelBpp, uint32_t *patternType) {
|
|||||||
|
|
||||||
while (getline(&line, &len, configFile) != -1) {
|
while (getline(&line, &len, configFile) != -1) {
|
||||||
if (!parseLine(line, tokens, maxCount, &tokenCount)) {
|
if (!parseLine(line, tokens, maxCount, &tokenCount)) {
|
||||||
|
if (tokens[0] != NULL) {
|
||||||
if (!strncmp(tokens[0], "bpp", strlen("bpp"))) {
|
if (!strncmp(tokens[0], "bpp", strlen("bpp"))) {
|
||||||
*panelBpp = static_cast<uint32_t>(atoi(tokens[1]));
|
*panelBpp = static_cast<uint32_t>(atoi(tokens[1]));
|
||||||
} else if (!strncmp(tokens[0], "pattern", strlen("pattern"))) {
|
} else if (!strncmp(tokens[0], "pattern", strlen("pattern"))) {
|
||||||
@@ -271,6 +272,7 @@ int getDPTestConfig(uint32_t *panelBpp, uint32_t *patternType) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fclose(configFile);
|
fclose(configFile);
|
||||||
|
|
||||||
|
|||||||
@@ -619,14 +619,15 @@ void DisplayBase::AppendDump(char *buffer, uint32_t length) {
|
|||||||
HWRotateInfo &rotate = hw_rotator_session.hw_rotate_info[count];
|
HWRotateInfo &rotate = hw_rotator_session.hw_rotate_info[count];
|
||||||
LayerRect &src_roi = rotate.src_roi;
|
LayerRect &src_roi = rotate.src_roi;
|
||||||
LayerRect &dst_roi = rotate.dst_roi;
|
LayerRect &dst_roi = rotate.dst_roi;
|
||||||
const char *rotate_split[2] = { "Rot-1", "Rot-2" };
|
char rot[8] = { 0 };
|
||||||
int pipe_id = 0;
|
int pipe_id = 0;
|
||||||
|
|
||||||
if (hw_rotator_session.mode == kRotatorOffline) {
|
if (hw_rotator_session.mode == kRotatorOffline) {
|
||||||
snprintf(writeback_id, sizeof(writeback_id), "%d", rotate.writeback_id);
|
snprintf(writeback_id, sizeof(writeback_id), "%d", rotate.writeback_id);
|
||||||
pipe_id = rotate.pipe_id;
|
pipe_id = rotate.pipe_id;
|
||||||
}
|
}
|
||||||
DumpImpl::AppendString(buffer, length, format, idx, comp_type, rotate_split[count],
|
snprintf(rot, sizeof(rot), "Rot-%d", count + 1);
|
||||||
|
DumpImpl::AppendString(buffer, length, format, idx, comp_type, rot,
|
||||||
writeback_id, pipe_id, input_buffer->width,
|
writeback_id, pipe_id, input_buffer->width,
|
||||||
input_buffer->height, buffer_format, INT(src_roi.left),
|
input_buffer->height, buffer_format, INT(src_roi.left),
|
||||||
INT(src_roi.top), INT(src_roi.right), INT(src_roi.bottom),
|
INT(src_roi.top), INT(src_roi.right), INT(src_roi.bottom),
|
||||||
|
|||||||
@@ -861,7 +861,7 @@ DisplayError HWColorManagerDrm::GetDrmGamut(const PPFeatureInfo &in_data,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DLOGE("Invalid gamut mode %d", sde_gamut->mode);
|
DLOGE("Invalid gamut mode %d", sde_gamut->mode);
|
||||||
free(mdp_gamut);
|
delete mdp_gamut;
|
||||||
return kErrorParameters;
|
return kErrorParameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -813,12 +813,14 @@ void HWDevice::GetHWPanelNameByNode(int device_node, HWPanelInfo *panel_info) {
|
|||||||
const uint32_t max_count = 10;
|
const uint32_t max_count = 10;
|
||||||
char *tokens[max_count] = { NULL };
|
char *tokens[max_count] = { NULL };
|
||||||
if (!ParseLine(line.c_str(), "=\n", tokens, max_count, &token_count)) {
|
if (!ParseLine(line.c_str(), "=\n", tokens, max_count, &token_count)) {
|
||||||
|
if (tokens[0] != NULL) {
|
||||||
if (!strncmp(tokens[0], "panel_name", strlen("panel_name"))) {
|
if (!strncmp(tokens[0], "panel_name", strlen("panel_name"))) {
|
||||||
snprintf(panel_info->panel_name, sizeof(panel_info->panel_name), "%s", tokens[1]);
|
snprintf(panel_info->panel_name, sizeof(panel_info->panel_name), "%s", tokens[1]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HWDevice::GetHWPanelInfoByNode(int device_node, HWPanelInfo *panel_info) {
|
void HWDevice::GetHWPanelInfoByNode(int device_node, HWPanelInfo *panel_info) {
|
||||||
|
|||||||
@@ -411,6 +411,7 @@ DisplayError HWInfo::GetV4L2RotatorInfo(HWResourceInfo *hw_resource) {
|
|||||||
string caps;
|
string caps;
|
||||||
while (Sys::getline_(caps_fs, caps)) {
|
while (Sys::getline_(caps_fs, caps)) {
|
||||||
if (!ParseString(caps.c_str(), tokens, max_count, ":, =\n", &token_count)) {
|
if (!ParseString(caps.c_str(), tokens, max_count, ":, =\n", &token_count)) {
|
||||||
|
if (tokens[0] != NULL) {
|
||||||
if (!strncmp(tokens[0], "downscale_compression", strlen("downscale_compression"))) {
|
if (!strncmp(tokens[0], "downscale_compression", strlen("downscale_compression"))) {
|
||||||
hw_resource->hw_rot_info.downscale_compression = UINT8(atoi(tokens[1]));
|
hw_resource->hw_rot_info.downscale_compression = UINT8(atoi(tokens[1]));
|
||||||
} else if (!strncmp(tokens[0], "min_downscale", strlen("min_downscale"))) {
|
} else if (!strncmp(tokens[0], "min_downscale", strlen("min_downscale"))) {
|
||||||
@@ -419,6 +420,7 @@ DisplayError HWInfo::GetV4L2RotatorInfo(HWResourceInfo *hw_resource) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// We support only 1 rotator
|
// We support only 1 rotator
|
||||||
found = true;
|
found = true;
|
||||||
|
|||||||
@@ -271,6 +271,8 @@ int HWCSession::Open(const hw_module_t *module, const char *name, hw_device_t **
|
|||||||
|
|
||||||
int status = hwc_session->Init();
|
int status = hwc_session->Init();
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
|
delete hwc_session;
|
||||||
|
hwc_session = NULL;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user