sdm : Add support for dynamic BW limit management
Read if device need to support dynamic bandwidth limit and
provide framework for applying a new total bandwidth limit and
per pipe bandwidth limit based on application scenario. Also
provide an API to query the status of bandwidth limit transaction.
Change-Id: Iaf9676a45c8c0c0c4af00c81ce4f5d70759c02ba
diff --git a/libqservice/IQService.h b/libqservice/IQService.h
index 422ddb2..2d7dddc 100644
--- a/libqservice/IQService.h
+++ b/libqservice/IQService.h
@@ -71,6 +71,7 @@
SET_DISPLAY_MODE = 29, // Set display mode to command or video mode
SET_CAMERA_STATUS = 30, // To notify display when camera is on and off
MIN_HDCP_ENCRYPTION_LEVEL_CHANGED = 31,
+ GET_BW_TRANSACTION_STATUS = 32, //Client can query BW transaction status.
COMMAND_LIST_END = 400,
};
diff --git a/libqservice/QServiceUtils.h b/libqservice/QServiceUtils.h
index 73b2b18..8f25253 100644
--- a/libqservice/QServiceUtils.h
+++ b/libqservice/QServiceUtils.h
@@ -83,4 +83,20 @@
return sendSingleParam(qService::IQService::SET_CAMERA_STATUS, on);
}
+inline bool displayBWTransactionPending() {
+ android::status_t err = (android::status_t) android::FAILED_TRANSACTION;
+ bool ret = false;
+ android::sp<qService::IQService> binder = getBinder();
+ android::Parcel inParcel, outParcel;
+ if(binder != NULL) {
+ err = binder->dispatch(qService::IQService::GET_BW_TRANSACTION_STATUS,
+ &inParcel , &outParcel);
+ if(err != android::NO_ERROR){
+ ALOGE("GET_BW_TRANSACTION_STATUS binder call failed err=%d", err);
+ return ret;
+ }
+ }
+ ret = outParcel.readInt32();
+ return ret;
+}
#endif /* end of include guard: QSERVICEUTILS_H */