summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaseer Ahmed <naseer@quicinc.com>2019-03-26 19:12:24 -0400
committerPeiyong Lin <lpy@google.com>2019-03-26 17:16:43 -0700
commit1f9c6d40d3e6407d058bfbda0a993343ea26fe50 (patch)
tree29f9b8ce85507911510c26f4fca66bd9a03034b3
parent965961d0fca31d11bdc1fcbcfc3c65cebb3d65d0 (diff)
downloadandroid_hardware_qcom_sdm845_display-1f9c6d40d3e6407d058bfbda0a993343ea26fe50.tar.gz
android_hardware_qcom_sdm845_display-1f9c6d40d3e6407d058bfbda0a993343ea26fe50.tar.bz2
android_hardware_qcom_sdm845_display-1f9c6d40d3e6407d058bfbda0a993343ea26fe50.zip
sdm: Update secure flag of FBT buffer appropriately
Update secure flag of frame buffer target buffer from sdm layer stack to hwlayer stack during commit Change-Id: Ie351fe45434bf918a7d5e41b7d7393c6742344ee CRs-Fixed: 2340051 BUG: b/35315015, b/127862411 Test: Verify with protected video playback Acked-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
-rw-r--r--sdm/libs/core/display_base.cpp10
1 files changed, 8 insertions, 2 deletions
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;