display: Add APIs to capture concurrent writeback output
- Add IDisplayConfig APIs to specify cropping rectangle,
post processed buffer attributes and capture concurrent
writeback output.
- Add IDisplayConfig APIs to configure bit clock dynamically.
CRs-Fixed: 2476553
Change-Id: I9a33f9683fd3c374f8cda5a35d47cf80742abd94
diff --git a/display/config/1.10/IDisplayCWBCallback.hal b/display/config/1.10/IDisplayCWBCallback.hal
new file mode 100644
index 0000000..c5f6916
--- /dev/null
+++ b/display/config/1.10/IDisplayCWBCallback.hal
@@ -0,0 +1,50 @@
+/*
+ * 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.10;
+
+interface IDisplayCWBCallback {
+ /*
+ * Notifies the client that display has filled concurrent writeback
+ * in the associated buffer successfully.
+ *
+ * @param buffer buffer where concurrent writeback output is written.
+ */
+ @callflow(next="*")
+ oneway onBufferReady(handle buffer);
+
+ /*
+ * Notifies the client that display could not process concurrent writeback
+ * in the associated buffer and buffer is returned without any change.
+ *
+ * @param buffer buffer where concurrent writeback output failed to write.
+ */
+ @callflow(next="*")
+ oneway onBufferError(handle buffer);
+};
diff --git a/display/config/1.10/IDisplayConfig.hal b/display/config/1.10/IDisplayConfig.hal
new file mode 100644
index 0000000..bd9a5bb
--- /dev/null
+++ b/display/config/1.10/IDisplayConfig.hal
@@ -0,0 +1,99 @@
+/*
+ * 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.10;
+
+import @1.9::IDisplayConfig;
+import IDisplayCWBCallback;
+
+interface IDisplayConfig extends @1.9::IDisplayConfig {
+ struct Rect {
+ uint32_t left;
+ uint32_t top;
+ uint32_t right;
+ uint32_t bottom;
+ };
+
+ /*
+ * Sets the output buffer to be filled with the contents of the next
+ * composition performed for this display. Client can specify cropping
+ * rectangle for the partial concurrent writeback.
+ * Buffer must be ready for writeback before this API is called.
+ * If hardware protected content is displayed in next composition cycle,
+ * CWB output buffer will be returned as failure in callback and without
+ * any change in buffer.
+ *
+ * @param callback is the IDisplayCWBCallback object.
+ * @param disp_id display id where concurrent writeback shall be captured.
+ * @param post_processed whether to capture post processed or mixer output.
+ * @param rect cropping rectangle which shall be applied on blended output.
+ * @param buffer buffer where concurrent writeback output shall be written.
+ *
+ * @return error is NONE upon success.
+ */
+ @callflow(next="*")
+ setCWBOutputBuffer(IDisplayCWBCallback callback,
+ uint32_t disp_id,
+ Rect rect,
+ bool post_processed,
+ handle buffer)
+ generates (int32_t error);
+
+ /*
+ * Get supported bit clock values.
+ *
+ * @param disp_id display id.
+ *
+ * @return bit_clks vector of bit clock values.
+ */
+ @callflow(next="*")
+ getSupportedDSIBitClks(uint32_t disp_id)
+ generates (vec<uint64_t> bit_clks);
+
+ /*
+ * Retrieve current bit clock value.
+ *
+ * @param disp_id display id.
+ *
+ * @return current bit clock value.
+ */
+ @callflow(next="*")
+ getDSIClk(uint32_t disp_id) generates (uint64_t bit_clk);
+
+ /*
+ * Retrieve current bit clock value.
+ *
+ * @param disp_id display id.
+ * @param bit_clk desired bit clock value.
+ *
+ * @return error is NONE upon success.
+ */
+ @callflow(next="*")
+ setDSIClk(uint32_t disp_id, uint64_t bit_clk) generates (int32_t error);
+};
diff --git a/display/current.txt b/display/current.txt
index 47dbc31..0d9e59b 100644
--- a/display/current.txt
+++ b/display/current.txt
@@ -45,3 +45,5 @@
ccf20944596b1cd140769257bdb93d10244b256d47e296ec84d41ed1261c1089 vendor.display.config@1.7::IDisplayConfig
a34b984a4eee8b76a123390002843f050288a92f0f0c6b8d576930f738858f4c vendor.display.config@1.8::IDisplayConfig
fd36f8dbe80403d93f0e94651ae4efa1aa22053351e7783f5d99457cff9dbacc vendor.display.config@1.9::IDisplayConfig
+f78bba2991501438ad9ca1a0812f6a2a3991cb178bec4c00bd8eec841777d8d9 vendor.display.config@1.10::IDisplayConfig
+50369a070405a1f0cac44648f39ca32864c1339896d6eb16524b32fff9e95f03 vendor.display.config@1.10::IDisplayCWBCallback
\ No newline at end of file