sdm: Add support to get/set DSI clk.
CRs-Fixed: 2314107
Change-Id: I213edcaa61b33731b920b500a170e5a265909e47
diff --git a/sdm/libs/hwc2/hwc_display_builtin.cpp b/sdm/libs/hwc2/hwc_display_builtin.cpp
index a1999c4..0806241 100644
--- a/sdm/libs/hwc2/hwc_display_builtin.cpp
+++ b/sdm/libs/hwc2/hwc_display_builtin.cpp
@@ -41,6 +41,7 @@
#include "hwc_display_builtin.h"
#include "hwc_debugger.h"
+#include "hwc_session.h"
#define __CLASS__ "HWCDisplayBuiltIn"
@@ -779,4 +780,37 @@
return error;
}
+DisplayError HWCDisplayBuiltIn::SetDynamicDSIClock(uint64_t bitclk) {
+ {
+ SEQUENCE_WAIT_SCOPE_LOCK(HWCSession::locker_[type_]);
+ DisplayError error = display_intf_->SetDynamicDSIClock(bitclk);
+ if (error != kErrorNone) {
+ DLOGE(" failed: Clk: %llu Error: %d", bitclk, error);
+ return error;
+ }
+ }
+
+ callbacks_->Refresh(id_);
+ validated_ = false;
+
+ return kErrorNone;
+}
+
+DisplayError HWCDisplayBuiltIn::GetDynamicDSIClock(uint64_t *bitclk) {
+ SEQUENCE_WAIT_SCOPE_LOCK(HWCSession::locker_[type_]);
+ if (display_intf_) {
+ return display_intf_->GetDynamicDSIClock(bitclk);
+ }
+
+ return kErrorNotSupported;
+}
+
+DisplayError HWCDisplayBuiltIn::GetSupportedDSIClock(std::vector<uint64_t> *bitclk_rates) {
+ if (display_intf_) {
+ return display_intf_->GetSupportedDSIClock(bitclk_rates);
+ }
+
+ return kErrorNotSupported;
+}
+
} // namespace sdm