display: add APIs to register callback for Qsync mode
- Add callback API for reporting changes in Qsync mode
and API to register the callback.
Change-Id: I882b6cd4346adb20ba5fc6ef3f37bfdb14862ded
CRs-Fixed: 2572380
diff --git a/display/config/1.15/IDisplayConfig.hal b/display/config/1.15/IDisplayConfig.hal
new file mode 100644
index 0000000..f4d84e3
--- /dev/null
+++ b/display/config/1.15/IDisplayConfig.hal
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2019 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:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package vendor.display.config@1.15;
+
+import @1.14::IDisplayConfig;
+import IDisplayQsyncCallback;
+
+interface IDisplayConfig extends @1.14::IDisplayConfig {
+ /*
+ * Register a callback which will be invoked when there is a change
+ * in the Qsync configuration.
+ *
+ * @param callback is the IDisplayQsyncCallback object.
+ *
+ * @return error is NONE upon success.
+ */
+ @callflow(next="*")
+ registerQsyncCallback(IDisplayQsyncCallback callback) generates (int32_t error);
+};
diff --git a/display/config/1.15/IDisplayQsyncCallback.hal b/display/config/1.15/IDisplayQsyncCallback.hal
new file mode 100644
index 0000000..1da47f7
--- /dev/null
+++ b/display/config/1.15/IDisplayQsyncCallback.hal
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2019 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:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package vendor.display.config@1.15;
+
+interface IDisplayQsyncCallback {
+ /*
+ * Notifies the client that Qsync has been re-configured.
+ *
+ * @param enabled specifies if qsync is enabled/disabled.
+ * @param fps specifies the current fps of the display.
+ * @param qsync_fps specifies the minimum qsync fps.
+ */
+ @callflow(next="*")
+ oneway onQsyncReconfigured(bool enabled, int32_t fps, int32_t qsync_fps);
+};
diff --git a/display/current.txt b/display/current.txt
index 72205a9..345ca65 100644
--- a/display/current.txt
+++ b/display/current.txt
@@ -58,4 +58,6 @@
9e960ad971bfeb1ccc3102caf0a2d94e95457a1ff9ff0c72156faa94f2500c5d vendor.qti.hardware.display.mapperextensions@1.1::IQtiMapperExtensions
b750c6dd2233e7d102f0a4f3d5124e358d134b80dfc86066d84e6f0722615881 vendor.qti.hardware.display.mapperextensions@1.0::types
13eca267916c940ad44e08ee5e43e22bb24fa6afe7f2b824ea9d6c753d17e1d9 vendor.qti.hardware.display.mapperextensions@1.0::IQtiMapperExtensions
+cc81da1cfc8f045fa4183a7ab2f5f34cb863b310b8d04bf7db661a58ec9ea5c3 vendor.display.config@1.15::IDisplayConfig
+be4de6eea1098375e80d26bd86d0e239a3d739ec7dfa43b1b2fa5e6f75c86966 vendor.display.config@1.15::IDisplayQsyncCallback