Merge "sdm: Reset the H/W layers of display"

This commit is contained in:
Linux Build Service Account
2017-03-19 03:35:59 -07:00
committed by Gerrit - the friendly Code Review server
4 changed files with 9 additions and 14 deletions

View File

@@ -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

View File

@@ -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) {

View File

@@ -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;
}

View File

@@ -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,15 +208,8 @@ 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;
}
status = PrepareLayerStack(content_list);
if (status) {
@@ -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;
}