summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Rassieur <rassb@google.com>2019-04-02 18:34:15 +0000
committerBill Rassieur <rassb@google.com>2019-04-02 18:34:15 +0000
commit36cca1b4319ffe40e4abea1a2cba414829212967 (patch)
treeb7fcaedb4a1f1c0a9c495d910e43eca7d8edd8ec
parent965961d0fca31d11bdc1fcbcfc3c65cebb3d65d0 (diff)
parentae6c99073bb9241fb428688ef8b70b5592e9e604 (diff)
downloadandroid_hardware_qcom_sdm845_display-36cca1b4319ffe40e4abea1a2cba414829212967.tar.gz
android_hardware_qcom_sdm845_display-36cca1b4319ffe40e4abea1a2cba414829212967.tar.bz2
android_hardware_qcom_sdm845_display-36cca1b4319ffe40e4abea1a2cba414829212967.zip
Merge master@5428150 into git_qt-dev-plus-aosp.
Change-Id: Iaf62d93834ed800cd57eb0fff55638b2cffea2d7 BUG: 129345239
-rw-r--r--config/sdm710.mk1
-rw-r--r--sdm/libs/core/display_base.cpp10
-rw-r--r--sdm/libs/hwc2/hwc_session_services.cpp17
3 files changed, 20 insertions, 8 deletions
diff --git a/config/sdm710.mk b/config/sdm710.mk
index 4e5c11b3..83ba1437 100644
--- a/config/sdm710.mk
+++ b/config/sdm710.mk
@@ -44,6 +44,7 @@ endif
PRODUCT_PROPERTY_OVERRIDES += \
persist.demo.hdmirotationlock=false \
+ persist.sys.sf.color_saturation=1.0 \
ro.vendor.display.cabl=2 \
debug.sf.latch_unsignaled=1 \
vendor.display.enable_default_color_mode=1 \
diff --git a/sdm/libs/core/display_base.cpp b/sdm/libs/core/display_base.cpp
index 917c07b5..f0efc2d5 100644
--- a/sdm/libs/core/display_base.cpp
+++ b/sdm/libs/core/display_base.cpp
@@ -1290,7 +1290,8 @@ void DisplayBase::CommitLayerParams(LayerStack *layer_stack) {
uint32_t hw_layers_count = UINT32(hw_layers_.info.hw_layers.size());
for (uint32_t i = 0; i < hw_layers_count; i++) {
- Layer *sdm_layer = layer_stack->layers.at(hw_layers_.info.index.at(i));
+ uint32_t sdm_layer_index = hw_layers_.info.index.at(i);
+ Layer *sdm_layer = layer_stack->layers.at(sdm_layer_index);
Layer &hw_layer = hw_layers_.info.hw_layers.at(i);
hw_layer.input_buffer.planes[0].fd = sdm_layer->input_buffer.planes[0].fd;
@@ -1299,7 +1300,12 @@ void DisplayBase::CommitLayerParams(LayerStack *layer_stack) {
hw_layer.input_buffer.size = sdm_layer->input_buffer.size;
hw_layer.input_buffer.acquire_fence_fd = sdm_layer->input_buffer.acquire_fence_fd;
hw_layer.input_buffer.handle_id = sdm_layer->input_buffer.handle_id;
- hw_layer.input_buffer.buffer_id = sdm_layer->input_buffer.buffer_id;
+ // TODO(user): Other FBT layer attributes like surface damage, dataspace, secure camera and
+ // secure display flags are also updated during SetClientTarget() called between validate and
+ // commit. Need to revist this and update it accordingly for FBT layer.
+ if (hw_layers_.info.gpu_target_index == sdm_layer_index) {
+ hw_layer.input_buffer.flags.secure = sdm_layer->input_buffer.flags.secure;
+ }
}
return;
diff --git a/sdm/libs/hwc2/hwc_session_services.cpp b/sdm/libs/hwc2/hwc_session_services.cpp
index 90ed00b4..7600fc85 100644
--- a/sdm/libs/hwc2/hwc_session_services.cpp
+++ b/sdm/libs/hwc2/hwc_session_services.cpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
+* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -158,7 +158,8 @@ Return<int32_t> HWCSession::configureDynRefeshRate(IDisplayConfig::DisplayDynRef
}
int32_t HWCSession::GetConfigCount(int disp_id, uint32_t *count) {
- if (disp_id < 0) {
+ if (disp_id < HWC_DISPLAY_PRIMARY || disp_id >= HWC_NUM_DISPLAY_TYPES) {
+ DLOGE("Invalid display = %d", disp_id);
return -EINVAL;
}
@@ -182,7 +183,8 @@ Return<void> HWCSession::getConfigCount(IDisplayConfig::DisplayType dpy,
}
int32_t HWCSession::GetActiveConfigIndex(int disp_id, uint32_t *config) {
- if (disp_id < 0) {
+ if (disp_id < HWC_DISPLAY_PRIMARY || disp_id >= HWC_NUM_DISPLAY_TYPES) {
+ DLOGE("Invalid display = %d", disp_id);
return -EINVAL;
}
@@ -206,7 +208,8 @@ Return<void> HWCSession::getActiveConfig(IDisplayConfig::DisplayType dpy,
}
int32_t HWCSession::SetActiveConfigIndex(int disp_id, uint32_t config) {
- if (disp_id < 0) {
+ if (disp_id < HWC_DISPLAY_PRIMARY || disp_id >= HWC_NUM_DISPLAY_TYPES) {
+ DLOGE("Invalid display = %d", disp_id);
return -EINVAL;
}
@@ -295,7 +298,8 @@ Return<void> HWCSession::getPanelBrightness(getPanelBrightness_cb _hidl_cb) {
int32_t HWCSession::MinHdcpEncryptionLevelChanged(int disp_id, uint32_t min_enc_level) {
DLOGI("Display %d", disp_id);
- if (disp_id < 0) {
+ if (disp_id < HWC_DISPLAY_PRIMARY || disp_id >= HWC_NUM_DISPLAY_TYPES) {
+ DLOGE("Invalid display = %d", disp_id);
return -EINVAL;
}
@@ -324,7 +328,8 @@ Return<int32_t> HWCSession::refreshScreen() {
}
int32_t HWCSession::ControlPartialUpdate(int disp_id, bool enable) {
- if (disp_id < 0) {
+ if (disp_id < HWC_DISPLAY_PRIMARY || disp_id >= HWC_NUM_DISPLAY_TYPES) {
+ DLOGE("Invalid display = %d", disp_id);
return -EINVAL;
}