sdm: Add support to query Smart Panel attribute
Add support to query Smart Panel attribute of given Display Config,
with the Display Config HIDL API call from SurfaceFlinger to HWC.
SF requires this attribute to populate the list of allowed Refresh
Rate configs to switch Refresh rate among the published Command and
Video mode display configs.
CRs-Fixed: 2535403
Change-Id: I09609ce9aa1987047f9cbe1c3db6392508c59967
diff --git a/composer/hwc_display_builtin.cpp b/composer/hwc_display_builtin.cpp
index e6f33ba..867692b 100644
--- a/composer/hwc_display_builtin.cpp
+++ b/composer/hwc_display_builtin.cpp
@@ -970,4 +970,14 @@
return HWC2::Error::None;
}
+
+bool HWCDisplayBuiltIn::IsSmartPanelConfig(uint32_t config_id) {
+ if (config_id < hwc_config_map_.size()) {
+ uint32_t index = hwc_config_map_.at(config_id);
+ return variable_config_map_.at(index).smart_panel;
+ }
+
+ return false;
+}
+
} // namespace sdm