config: add APIs needed for supporting IDisplayConfig 2.0
Change-Id: I9f75b2a3288cf5ccdde4ce7ba12f65a85d4c995d
CRs-Fixed: 2608292
diff --git a/display/config/2.0/IDisplayConfig.hal b/display/config/2.0/IDisplayConfig.hal
new file mode 100644
index 0000000..33d5be3
--- /dev/null
+++ b/display/config/2.0/IDisplayConfig.hal
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2020 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@2.0;
+
+import IDisplayConfigCallback;
+
+interface IDisplayConfig {
+ /*
+ * Registers a client with the IDisplayConfig service. The client name will be a combination
+ * of the original name of the client and possibly the client's PID. This is needed to ensure
+ * unique identification of the client by the service. This can happen in cases where the
+ * client restarts and re-registers which causes multiple registration with the service.
+ *
+ * @param clientName String representing the unique name of the client.
+ * @param callback is the HIDL callback if any, for the callback operations to the client.
+ * @return error is the error code of the RegisterClient call to the service.
+ * @return clientHandle is a unique unsigned integer assigned to the client by service.
+ */
+ @callflow(next="*")
+ registerClient(string clientName, IDisplayConfigCallback callback)
+ generates (int32_t error, uint64_t clientHandle);
+
+ /*
+ * Perform API for the client to handle multiple requests by the IDisplayConfig service.
+ *
+ * @param clientHandle the unique unsigned integer assigned to client by service.
+ * @param opCode is the identifier for the operation requested by client.
+ * @param inputParams vector of input data structures.
+ * @param inputHandles vector of input buffer handles, if any.
+ * @return error is the error code of the requested operation.
+ * @return outputParams is vector of output data as part of sync API execution, if any.
+ * @return outputHandles is vector of output buffer handles, if any.
+ */
+ @callflow(next="*")
+ perform(uint64_t clientHandle, uint32_t opCode, vec<uint8_t> inputParams,
+ vec<handle> inputHandles) generates (int32_t error, vec<uint8_t> outputParams,
+ vec<handle> outputHandles);
+};
diff --git a/display/config/2.0/IDisplayConfigCallback.hal b/display/config/2.0/IDisplayConfigCallback.hal
new file mode 100644
index 0000000..ff145fc
--- /dev/null
+++ b/display/config/2.0/IDisplayConfigCallback.hal
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2020 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@2.0;
+
+interface IDisplayConfigCallback {
+ /*
+ * Notifies the client with the output data and handles as part of async API execution.
+ * This callback is registered with the service as part of the registerClient API.
+ *
+ * @param opCode is the identifier of the Perform request for which the callback is performed.
+ * @param callbackParams is the vector of data passed to the client, if any.
+ * @param callbackHandles is the vector of buffer handles passed to the client, if any.
+ */
+ @callflow(next="*")
+ oneway perform(uint32_t opCode, vec<uint8_t> callbackParams, vec<handle> callbackHandles);
+};
diff --git a/display/current.txt b/display/current.txt
index 84afd81..9df322a 100644
--- a/display/current.txt
+++ b/display/current.txt
@@ -62,4 +62,6 @@
13eca267916c940ad44e08ee5e43e22bb24fa6afe7f2b824ea9d6c753d17e1d9 vendor.qti.hardware.display.mapperextensions@1.0::IQtiMapperExtensions
cc81da1cfc8f045fa4183a7ab2f5f34cb863b310b8d04bf7db661a58ec9ea5c3 vendor.display.config@1.15::IDisplayConfig
be4de6eea1098375e80d26bd86d0e239a3d739ec7dfa43b1b2fa5e6f75c86966 vendor.display.config@1.15::IDisplayQsyncCallback
+5862c0c085c9e0b6d8b8a11e4a9765a6a9250874d7c1a9b0f6b566598da31593 vendor.display.config@2.0::IDisplayConfig
+14fcf170f04a9878bf085b2aa4d75ef5e3d241926bef18e58d6d254e000ff689 vendor.display.config@2.0::IDisplayConfigCallback