sde-drm: update bitclk rates after panel mode switch
Change-Id: I3a1d38fa367b0f45058ed6cf79dafcc4c7d0eb70
diff --git a/sdm/libs/core/drm/hw_peripheral_drm.cpp b/sdm/libs/core/drm/hw_peripheral_drm.cpp
index e0ebad4..06b4b99 100644
--- a/sdm/libs/core/drm/hw_peripheral_drm.cpp
+++ b/sdm/libs/core/drm/hw_peripheral_drm.cpp
@@ -118,6 +118,18 @@
return kErrorNone;
}
+DisplayError HWPeripheralDRM::SetDisplayMode(const HWDisplayMode hw_display_mode) {
+ DisplayError error = HWDeviceDRM::SetDisplayMode(hw_display_mode);
+ if (error != kErrorNone) {
+ return error;
+ }
+
+ // update bit clk rates.
+ hw_panel_info_.bitclk_rates = bitclk_rates_;
+
+ return kErrorNone;
+}
+
DisplayError HWPeripheralDRM::Validate(HWLayers *hw_layers) {
HWLayersInfo &hw_layer_info = hw_layers->info;
SetDestScalarData(hw_layer_info, true);
diff --git a/sdm/libs/core/drm/hw_peripheral_drm.h b/sdm/libs/core/drm/hw_peripheral_drm.h
index 5df95dd..5a8993d 100644
--- a/sdm/libs/core/drm/hw_peripheral_drm.h
+++ b/sdm/libs/core/drm/hw_peripheral_drm.h
@@ -61,6 +61,7 @@
virtual DisplayError SetDynamicDSIClock(uint64_t bit_clk_rate);
virtual DisplayError GetDynamicDSIClock(uint64_t *bit_clk_rate);
virtual DisplayError SetDisplayAttributes(uint32_t index);
+ virtual DisplayError SetDisplayMode(const HWDisplayMode hw_display_mode);
virtual DisplayError TeardownConcurrentWriteback(void);
virtual DisplayError SetPanelBrightness(int level);
virtual DisplayError GetPanelBrightness(int *level);