diff --git a/sdm/include/core/sdm_types.h b/sdm/include/core/sdm_types.h index 367ab380..fae11531 100644 --- a/sdm/include/core/sdm_types.h +++ b/sdm/include/core/sdm_types.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2014 - 2015, 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 @@ -54,6 +54,7 @@ enum DisplayError { kErrorTimeOut, //!< The operation has timed out to prevent client from waiting forever. kErrorShutDown, //!< Driver is processing shutdown sequence kErrorPerfValidation, //!< Bandwidth or Clock requirement validation failure. + kErrorNoAppLayers, //!< No App layer(s) in the draw cycle. }; /*! @brief This structure is defined for client and library compatibility check purpose only. This diff --git a/sdm/libs/core/display_base.cpp b/sdm/libs/core/display_base.cpp index 33785599..c6501bf9 100644 --- a/sdm/libs/core/display_base.cpp +++ b/sdm/libs/core/display_base.cpp @@ -156,8 +156,8 @@ DisplayError DisplayBase::BuildLayerStackStats(LayerStack *layer_stack) { hw_layers_info.gpu_target_index, display_type_); if (!hw_layers_info.app_layer_count) { - DLOGE("Layer count is zero"); - return kErrorParameters; + DLOGW("Layer count is zero"); + return kErrorNoAppLayers; } if (hw_layers_info.gpu_target_index) { diff --git a/sdm/libs/hwc/hwc_display.cpp b/sdm/libs/hwc/hwc_display.cpp index b0d2c7c0..9484b358 100644 --- a/sdm/libs/hwc/hwc_display.cpp +++ b/sdm/libs/hwc/hwc_display.cpp @@ -716,13 +716,13 @@ int HWCDisplay::PrepareLayerStack(hwc_display_contents_1_t *content_list) { if (error != kErrorNone) { if (error == kErrorShutDown) { shutdown_pending_ = true; - } else if (error != kErrorPermission) { + } else if ((error != kErrorPermission) && (error != kErrorNoAppLayers)) { DLOGE("Prepare failed. Error = %d", error); // To prevent surfaceflinger infinite wait, flush the previous frame during Commit() // so that previous buffer and fences are released, and override the error. flush_ = true; } else { - DLOGI("Prepare failed for Display = %d Error = %d", type_, error); + DLOGV("Prepare failed for Display = %d Error = %d", type_, error); } return 0; } diff --git a/sdm/libs/hwc/hwc_display_primary.cpp b/sdm/libs/hwc/hwc_display_primary.cpp index 8b0a6f2b..ba351b5b 100644 --- a/sdm/libs/hwc/hwc_display_primary.cpp +++ b/sdm/libs/hwc/hwc_display_primary.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 @@ -208,14 +208,7 @@ int HWCDisplayPrimary::Prepare(hwc_display_contents_1_t *content_list) { } if (content_list->numHwLayers <= 1) { - DisplayConfigFixedInfo display_config; - display_intf_->GetConfig(&display_config); - if (display_config.is_cmdmode) { - DLOGV("Skipping null commit on cmd mode panel"); - } else { - flush_ = true; - } - return 0; + flush_ = true; } status = PrepareLayerStack(content_list); @@ -233,6 +226,7 @@ int HWCDisplayPrimary::Commit(hwc_display_contents_1_t *content_list) { display_intf_->GetConfig(&display_config); if (content_list->numHwLayers <= 1 && display_config.is_cmdmode) { DLOGV("Skipping null commit on cmd mode panel"); + flush_ = false; return 0; }