diff options
author | Baldev Sahu <bsahu@codeaurora.org> | 2021-02-19 15:53:22 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2021-03-16 22:39:40 -0700 |
commit | 7b4fa9794c65141f00a3434f5d8b1780afe8852c (patch) | |
tree | 58cd614d67eb3245406b6def821484dbbcdc87f0 | |
parent | 0a38f67f7c7e38f7c25b873796a303fd96ce7745 (diff) |
hwc2 : Add scaling rgb layer flag to layer stack
Add scaling rgb layer flag to layer stack. This flag is
used to avoid idle fallback which causes flicker due
to mdp vs gpu output difference
Change-Id: I9318e407fd1b56359c2f98de0d62784ee9803ed1
-rw-r--r-- | sdm/include/core/layer_stack.h | 4 | ||||
-rw-r--r-- | sdm/libs/hwc2/hwc_display.cpp | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sdm/include/core/layer_stack.h b/sdm/include/core/layer_stack.h index b49c425c..81ecfd6d 100644 --- a/sdm/include/core/layer_stack.h +++ b/sdm/include/core/layer_stack.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2014 - 2019, The Linux Foundation. All rights reserved. +* Copyright (c) 2014 - 2019, 2021 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: @@ -277,6 +277,8 @@ struct LayerStackFlags { uint32_t config_changed : 1; //!< This flag indicates Display config must be validated. uint32_t mask_present : 1; //!< Set if layer stack has mask layers. + + uint32_t scaling_rgb_layer_present : 1; //!< Set if scaling rgb layer is present }; uint32_t flags = 0; //!< For initialization purpose only. diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp index 894d9224..937c0a78 100644 --- a/sdm/libs/hwc2/hwc_display.cpp +++ b/sdm/libs/hwc2/hwc_display.cpp @@ -709,6 +709,10 @@ void HWCDisplay::BuildLayerStack() { is_secure = true; } + if (IS_RGB_FORMAT(layer->input_buffer.format) && hwc_layer->IsScalingPresent()) { + layer_stack_.flags.scaling_rgb_layer_present = true; + } + if (hwc_layer->IsSingleBuffered() && !(hwc_layer->IsRotationPresent() || hwc_layer->IsScalingPresent())) { layer->flags.single_buffer = true; |