diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-08-30 07:25:38 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-08-30 07:25:38 +0000 |
commit | 731a7df4aaf0384981df1e3c2bea4a6718494995 (patch) | |
tree | 8d39cdc9078d7d33f245bc8955b2a6a83a616dd3 | |
parent | 2bf984885c9ddaa2a40cb21a73b3c82dae924a38 (diff) | |
parent | f9b32af0575a253d7167db14ec5ea4de146fac46 (diff) | |
download | display-731a7df4aaf0384981df1e3c2bea4a6718494995.tar.gz |
release-request-81b48854-d0e0-49af-bcf2-857273cbb8dc-for-git_oc-mr1-release-4306444 snap-temp-L17300000097872583
Change-Id: I08804ff5b164e752766fe938a525382d4f5904b5
-rw-r--r-- | msm8996/libgralloc1/gr_device_impl.cpp | 18 | ||||
-rw-r--r-- | msm8996/sdm/libs/core/display_base.cpp | 8 |
2 files changed, 10 insertions, 16 deletions
diff --git a/msm8996/libgralloc1/gr_device_impl.cpp b/msm8996/libgralloc1/gr_device_impl.cpp index 33e6cd5a..a6a7f3d4 100644 --- a/msm8996/libgralloc1/gr_device_impl.cpp +++ b/msm8996/libgralloc1/gr_device_impl.cpp @@ -174,25 +174,13 @@ gralloc1_function_pointer_t GrallocImpl::GetFunction(gralloc1_device_t *device, } gralloc1_error_t GrallocImpl::Dump(gralloc1_device_t *device, uint32_t *out_size, - char *out_buffer) { + char *out_buffer __unused) { if (!device) { ALOGE("Gralloc Error : device=%p", (void *)device); return GRALLOC1_ERROR_BAD_DESCRIPTOR; } - const size_t max_dump_size = 8192; - if (out_buffer == nullptr) { - *out_size = max_dump_size; - } else { - std::ostringstream os; - os << "-------------------------------" << std::endl; - os << "QTI gralloc dump:" << std::endl; - os << "-------------------------------" << std::endl; - GrallocImpl const *dev = GRALLOC_IMPL(device); - dev->buf_mgr_->Dump(&os); - os << "-------------------------------" << std::endl; - auto copied = os.str().copy(out_buffer, std::min(os.str().size(), max_dump_size), 0); - *out_size = UINT(copied); - } + // nothing to dump + *out_size = 0; return GRALLOC1_ERROR_NONE; } diff --git a/msm8996/sdm/libs/core/display_base.cpp b/msm8996/sdm/libs/core/display_base.cpp index ea4aedec..7d3f0894 100644 --- a/msm8996/sdm/libs/core/display_base.cpp +++ b/msm8996/sdm/libs/core/display_base.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2014 - 2016, The Linux Foundation. All rights reserved. +* Copyright (c) 2014 - 2017, 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 met: @@ -578,6 +578,12 @@ void DisplayBase::AppendDump(char *buffer, uint32_t length) { for (uint32_t i = 0; i < num_hw_layers; i++) { uint32_t layer_index = hw_layers_.info.index[i]; Layer *layer = hw_layers_.info.stack->layers.at(layer_index); + + if (layer == NULL || layer->input_buffer == NULL) { + DumpImpl::AppendString(buffer, length, "\n| Invalid Layer |"); //NOLINT + DumpImpl::AppendString(buffer, length, newline); + continue; + } LayerBuffer *input_buffer = layer->input_buffer; HWLayerConfig &layer_config = hw_layers_.config[i]; HWRotatorSession &hw_rotator_session = layer_config.hw_rotator_session; |