summaryrefslogtreecommitdiff
path: root/display/com/google/hardware/pixel/display/IDisplay.aidl
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2023-12-08 13:14:16 -0800
committerXin Li <delphij@google.com>2023-12-08 13:14:16 -0800
commit44f34394257c781bc0213ff2f089cf06ed9eeddd (patch)
treea2acc0ea146ee79e9f4c3ea12fcdd83425ed9391 /display/com/google/hardware/pixel/display/IDisplay.aidl
parent36e6499a8930d5ab3bce453575bfd284e61944e2 (diff)
parentaa291854af598bdde5d0cb31649c0f41b9465180 (diff)
downloadinterfaces-44f34394257c781bc0213ff2f089cf06ed9eeddd.tar.gz
Merge Android 14 QPR1
Merged-In: If8028bace8cf35ff7525405b31c1ac313f98fc24 Bug: 315507370 Change-Id: Ic0e7a3f26a3e3dfc5ea7c729d1f19031ae79d4ac
Diffstat (limited to 'display/com/google/hardware/pixel/display/IDisplay.aidl')
-rw-r--r--display/com/google/hardware/pixel/display/IDisplay.aidl90
1 files changed, 88 insertions, 2 deletions
diff --git a/display/com/google/hardware/pixel/display/IDisplay.aidl b/display/com/google/hardware/pixel/display/IDisplay.aidl
index e34f779..c23a2b2 100644
--- a/display/com/google/hardware/pixel/display/IDisplay.aidl
+++ b/display/com/google/hardware/pixel/display/IDisplay.aidl
@@ -15,6 +15,8 @@
*/
package com.google.hardware.pixel.display;
+import com.google.hardware.pixel.display.HistogramCapability;
+import com.google.hardware.pixel.display.HistogramConfig;
import com.google.hardware.pixel.display.HistogramErrorCode;
import com.google.hardware.pixel.display.HbmState;
import com.google.hardware.pixel.display.LbeState;
@@ -155,13 +157,16 @@ interface IDisplay {
* BAD_WEIGHT = 2 when weight passed in is not in correct format
* BAD_POSITION = 3 when the histogram sampling position is incorrect
* BAD_PRIORITY = 4 when the priority input is not in correct format
- * ENABLE_HIST_ERROR = 5 when enable histgoram property error
- * DISABLE_HIST_ERROR = 6 when disable histgoram property error
+ * ENABLE_HIST_ERROR = 5 when enable histogram property error
+ * DISABLE_HIST_ERROR = 6 when disable histogram property error
* BAD_HIST_DATA = 7 when there is error to collect histogram data
* DRM_PLAYING = 8 when there is DRM content playing,
* for content protection, no histogram data sampled
* DISPLAY_POWEROFF = 9 when the display is power off,
* no histogram data is sampled
+ * API_DEPRECATED = 10 when the API is deprecated, should use the multi
+ * channel API instead (registerHistogram and
+ * queryHistogram)
*/
HistogramErrorCode histogramSample(in Rect roi, in Weight weight, in HistogramPos pos,
in Priority pri, out char[] histogrambuffer);
@@ -216,4 +221,85 @@ interface IDisplay {
* false if not supported.
*/
boolean isOperationRateSupported();
+
+ /**
+ * Return the histogram capability for the platform.
+ *
+ * @return HistogramCapability which describes the histogram capability for the platform.
+ */
+ HistogramCapability getHistogramCapability();
+
+ /**
+ * Register the histogram sampling configuration, and allocate a histogram hardware channel
+ * from the histogram server. The DPU hardware will continuously sample the histogram
+ * data. The histogram channel can be disabled (see unregisterHistogram) to save
+ * power consumption.
+ *
+ * @param token input from client, is the handle for the following histogram
+ * operations which would be used to identify the client and register
+ * a binderdied callback to release the histogram channel automatically
+ * when client crashes.
+ *
+ * @param histogramConfig input from client, is the histogram configuration.
+ *
+ * @return error NONE, upon success. Otherwise
+ * BAD_TOKEN, when the token passed in has error or already registered
+ * BAD_ROI, when roi passed in is not in correct format
+ * BAD_WEIGHT, when weight passed in is not in correct format
+ * BAD_POSITION, when the histogram sampling position is incorrect
+ * CONFIG_HIST_ERROR, when enable histogram property error
+ * NO_CHANNEL_AVAILABLE, when all of the histogram channels are in used
+ */
+ HistogramErrorCode registerHistogram(in IBinder token, in HistogramConfig histogramConfig);
+
+ /**
+ * Query the latest histogram data.
+ *
+ * @param token input from client, is the handle registered via registerHistogram
+ * which would be used to identify the client.
+ *
+ * @param histogramBuffer output from histogram server, is a 256 * 16 bits buffer to store the
+ * luma counts return by the histogram hardware.
+ *
+ * @return error NONE, upon success. Otherwise
+ * BAD_TOKEN, when the token passed in has error or not registered
+ * before
+ * DISPLAY_POWEROFF, when the display is power off
+ * BAD_HIST_DATA, when there is error to collect histogram data
+ * DRM_PLAYING, when there is secure content playing,
+ * for content protection, no histogram data sampled
+ */
+ HistogramErrorCode queryHistogram(in IBinder token, out char[] histogramBuffer);
+
+ /**
+ * change the histogram channel configuration. The DPU hardware will continuously sample the
+ * histogram data. The histogram channel can be disabled (see unregisterHistogram) to save
+ * power consumption.
+ *
+ * @param token input from client, is the handle registered via registerHistogram
+ * which would be used to identify the client.
+ *
+ * @param histogramConfig input from client, is the histogram configuration.
+ *
+ * @return error NONE, upon success. Otherwise
+ * BAD_TOKEN, when the token passed in has error or not registered
+ * before
+ * BAD_ROI, when roi passed in is not in correct format
+ * BAD_WEIGHT, when weight passed in is not in correct format
+ * BAD_POSITION, when the histogram sampling position is incorrect
+ * CONFIG_HIST_ERROR, when change histogram property error
+ */
+ HistogramErrorCode reconfigHistogram(in IBinder token, in HistogramConfig histogramConfig);
+
+ /**
+ * Disable the histogram channel to release the hardware resource and save power consumption.
+ *
+ * @param token input from client, is the handle registered via registerHistogram
+ * which would be used to identify the client.
+ *
+ * @return error NONE, upon success. Otherwise
+ * BAD_TOKEN, when the token passed in has error or not registered
+ * before
+ */
+ HistogramErrorCode unregisterHistogram(in IBinder token);
}