Merge "sdm: Reset the H/W layers of display"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
ad1e7dd2ed
@@ -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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* 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.
|
kErrorTimeOut, //!< The operation has timed out to prevent client from waiting forever.
|
||||||
kErrorShutDown, //!< Driver is processing shutdown sequence
|
kErrorShutDown, //!< Driver is processing shutdown sequence
|
||||||
kErrorPerfValidation, //!< Bandwidth or Clock requirement validation failure.
|
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
|
/*! @brief This structure is defined for client and library compatibility check purpose only. This
|
||||||
|
|||||||
@@ -156,8 +156,8 @@ DisplayError DisplayBase::BuildLayerStackStats(LayerStack *layer_stack) {
|
|||||||
hw_layers_info.gpu_target_index, display_type_);
|
hw_layers_info.gpu_target_index, display_type_);
|
||||||
|
|
||||||
if (!hw_layers_info.app_layer_count) {
|
if (!hw_layers_info.app_layer_count) {
|
||||||
DLOGE("Layer count is zero");
|
DLOGW("Layer count is zero");
|
||||||
return kErrorParameters;
|
return kErrorNoAppLayers;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hw_layers_info.gpu_target_index) {
|
if (hw_layers_info.gpu_target_index) {
|
||||||
|
|||||||
@@ -716,13 +716,13 @@ int HWCDisplay::PrepareLayerStack(hwc_display_contents_1_t *content_list) {
|
|||||||
if (error != kErrorNone) {
|
if (error != kErrorNone) {
|
||||||
if (error == kErrorShutDown) {
|
if (error == kErrorShutDown) {
|
||||||
shutdown_pending_ = true;
|
shutdown_pending_ = true;
|
||||||
} else if (error != kErrorPermission) {
|
} else if ((error != kErrorPermission) && (error != kErrorNoAppLayers)) {
|
||||||
DLOGE("Prepare failed. Error = %d", error);
|
DLOGE("Prepare failed. Error = %d", error);
|
||||||
// To prevent surfaceflinger infinite wait, flush the previous frame during Commit()
|
// To prevent surfaceflinger infinite wait, flush the previous frame during Commit()
|
||||||
// so that previous buffer and fences are released, and override the error.
|
// so that previous buffer and fences are released, and override the error.
|
||||||
flush_ = true;
|
flush_ = true;
|
||||||
} else {
|
} else {
|
||||||
DLOGI("Prepare failed for Display = %d Error = %d", type_, error);
|
DLOGV("Prepare failed for Display = %d Error = %d", type_, error);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* 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) {
|
if (content_list->numHwLayers <= 1) {
|
||||||
DisplayConfigFixedInfo display_config;
|
flush_ = true;
|
||||||
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);
|
status = PrepareLayerStack(content_list);
|
||||||
@@ -233,6 +226,7 @@ int HWCDisplayPrimary::Commit(hwc_display_contents_1_t *content_list) {
|
|||||||
display_intf_->GetConfig(&display_config);
|
display_intf_->GetConfig(&display_config);
|
||||||
if (content_list->numHwLayers <= 1 && display_config.is_cmdmode) {
|
if (content_list->numHwLayers <= 1 && display_config.is_cmdmode) {
|
||||||
DLOGV("Skipping null commit on cmd mode panel");
|
DLOGV("Skipping null commit on cmd mode panel");
|
||||||
|
flush_ = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user