libhwcomposer: Reset composition types on idle timeout.
SurfaceFlinger re-creates HWC worklist only for new frame and on layer geometry change. Invalidate triggered by idle timeout refreshes the existing worklist retaining its previous composition type. So its MDP comp's responsibility to clear layer composition types to HWC_FRAMEBUFFER on timeout. Change-Id: Ibf11dd6c12c647c75d36d8cbad408c3ea70588bd
This commit is contained in:
parent
2d0ecf80e6
commit
7c86dfe139
@ -125,6 +125,15 @@ void MDPComp::timeout_handler(void *udata) {
|
||||
proc->invalidate(proc);
|
||||
}
|
||||
|
||||
void MDPComp::reset_comp_type(hwc_layer_list_t* list) {
|
||||
for(uint32_t i = 0 ; i < list->numHwLayers; i++ ) {
|
||||
hwc_layer_t* l = &list->hwLayers[i];
|
||||
|
||||
if(l->compositionType == HWC_OVERLAY)
|
||||
l->compositionType = HWC_FRAMEBUFFER;
|
||||
}
|
||||
}
|
||||
|
||||
void MDPComp::reset( hwc_context_t *ctx, hwc_layer_list_t* list ) {
|
||||
sCurrentFrame.count = 0;
|
||||
free(sCurrentFrame.pipe_layer);
|
||||
@ -333,8 +342,7 @@ int MDPComp::prepare(hwc_context_t *ctx, hwc_layer_t *layer,
|
||||
* 5. Overlay in use
|
||||
*/
|
||||
|
||||
bool MDPComp::is_doable(hwc_composer_device_t *dev,
|
||||
const hwc_layer_list_t* list) {
|
||||
bool MDPComp::is_doable(hwc_composer_device_t *dev, hwc_layer_list_t* list) {
|
||||
hwc_context_t* ctx = (hwc_context_t*)(dev);
|
||||
|
||||
if(!ctx) {
|
||||
@ -355,6 +363,7 @@ bool MDPComp::is_doable(hwc_composer_device_t *dev,
|
||||
|
||||
//FB composition on idle timeout
|
||||
if(sIdleFallBack) {
|
||||
reset_comp_type(list);
|
||||
ALOGD_IF(isDebug(), "%s: idle fallback",__FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
|
@ -180,8 +180,7 @@ private:
|
||||
mdp_pipe_info& mdp_info);
|
||||
|
||||
/* checks for conditions where mdpcomp is not possible */
|
||||
static bool is_doable(hwc_composer_device_t *dev,
|
||||
const hwc_layer_list_t* list);
|
||||
static bool is_doable(hwc_composer_device_t *dev, hwc_layer_list_t* list);
|
||||
|
||||
static bool setup(hwc_context_t* ctx, hwc_layer_list_t* list);
|
||||
|
||||
@ -210,6 +209,8 @@ private:
|
||||
|
||||
/* reset state */
|
||||
static void reset( hwc_context_t *ctx, hwc_layer_list_t* list );
|
||||
/* reset compostiion type to default */
|
||||
static void reset_comp_type(hwc_layer_list_t* list);
|
||||
|
||||
/* Is feature enabled */
|
||||
static bool isEnabled() { return sMaxLayers ? true : false; };
|
||||
|
Loading…
Reference in New Issue
Block a user