Merge "Add "clear" command." into nyc-dev
diff --git a/include/hardware/gps.h b/include/hardware/gps.h
index a54948c..4fc06bc 100644
--- a/include/hardware/gps.h
+++ b/include/hardware/gps.h
@@ -1469,7 +1469,7 @@
/**
* Leap second data.
* The sign of the value is defined by the following equation:
- * utc_time_ns = time_ns + (full_bias_ns + bias_ns) - leap_second *
+ * utc_time_ns = time_ns - (full_bias_ns + bias_ns) - leap_second *
* 1,000,000,000
*
* If the data is available 'flags' must contain GNSS_CLOCK_HAS_LEAP_SECOND.
@@ -1483,8 +1483,9 @@
* For local hardware clock, this value is expected to be monotonically
* increasing while the hardware clock remains power on. (For the case of a
* HW clock that is not continuously on, see the
- * hw_clock_discontinuity_count field). The real GPS time can be derived by
- * adding the 'full_bias_ns + bias_ns' (when it is available) to this value.
+ * hw_clock_discontinuity_count field). The receiver's estimate of GPS time
+ * can be derived by substracting the sum of full_bias_ns and bias_ns (when
+ * available) from this value.
*
* This GPS time is expected to be the best estimate of current GPS time
* that GNSS receiver can achieve.
@@ -1513,20 +1514,22 @@
* and the true GPS time since 0000Z, January 6, 1980, in nanoseconds.
*
* The sign of the value is defined by the following equation:
- * local estimate of GPS time = time_ns + (full_bias_ns + bias_ns)
+ * local estimate of GPS time = time_ns - (full_bias_ns + bias_ns)
*
* This value is mandatory if the receiver has estimated GPS time. If the
* computed time is for a non-GPS constellation, the time offset of that
- * constellation to GPS has to be applied to fill this value. The value
- * contains the 'bias uncertainty' in it, and the caller is responsible of
- * using the uncertainty. If the data is available 'flags' must contain
- * GNSS_CLOCK_HAS_FULL_BIAS.
+ * constellation to GPS has to be applied to fill this value. The error
+ * estimate for the sum of this and the bias_ns is the bias_uncertainty_ns,
+ * and the caller is responsible for using this uncertainty (it can be very
+ * large before the GPS time has been solved for.) If the data is available
+ * 'flags' must contain GNSS_CLOCK_HAS_FULL_BIAS.
*/
int64_t full_bias_ns;
/**
* Sub-nanosecond bias.
- * The value contains the 'bias uncertainty' in it.
+ * The error estimate for the sum of this and the full_bias_ns is the
+ * bias_uncertainty_ns
*
* If the data is available 'flags' must contain GNSS_CLOCK_HAS_BIAS. If GPS
* has computed a position fix. This value is mandatory if the receiver has
@@ -1549,7 +1552,8 @@
* The clock's drift in nanoseconds (per second).
*
* A positive value means that the frequency is higher than the nominal
- * frequency.
+ * frequency, and that the (full_bias_ns + bias_ns) is growing more positive
+ * over time.
*
* The value contains the 'drift uncertainty' in it.
* If the data is available 'flags' must contain GNSS_CLOCK_HAS_DRIFT.
diff --git a/include/hardware/hwcomposer2.h b/include/hardware/hwcomposer2.h
index 9650ae1..095557a 100644
--- a/include/hardware/hwcomposer2.h
+++ b/include/hardware/hwcomposer2.h
@@ -206,6 +206,7 @@
HWC2_FUNCTION_GET_DISPLAY_REQUESTS,
HWC2_FUNCTION_GET_DISPLAY_TYPE,
HWC2_FUNCTION_GET_DOZE_SUPPORT,
+ HWC2_FUNCTION_GET_HDR_CAPABILITIES,
HWC2_FUNCTION_GET_MAX_VIRTUAL_DISPLAY_COUNT,
HWC2_FUNCTION_GET_RELEASE_FENCES,
HWC2_FUNCTION_PRESENT_DISPLAY,
@@ -234,7 +235,7 @@
HWC2_FUNCTION_VALIDATE_DISPLAY,
} hwc2_function_descriptor_t;
-/* Layer requests returned from getDisplayRequests. */
+/* Layer requests returned from getDisplayRequests */
typedef enum {
/* The client should clear its target with transparent pixels where this
* layer would be. The client may ignore this request if the layer must be
@@ -412,6 +413,7 @@
case HWC2_FUNCTION_GET_DISPLAY_REQUESTS: return "GetDisplayRequests";
case HWC2_FUNCTION_GET_DISPLAY_TYPE: return "GetDisplayType";
case HWC2_FUNCTION_GET_DOZE_SUPPORT: return "GetDozeSupport";
+ case HWC2_FUNCTION_GET_HDR_CAPABILITIES: return "GetHdrCapabilities";
case HWC2_FUNCTION_GET_MAX_VIRTUAL_DISPLAY_COUNT:
return "GetMaxVirtualDisplayCount";
case HWC2_FUNCTION_GET_RELEASE_FENCES: return "GetReleaseFences";
@@ -603,6 +605,7 @@
GetDisplayRequests = HWC2_FUNCTION_GET_DISPLAY_REQUESTS,
GetDisplayType = HWC2_FUNCTION_GET_DISPLAY_TYPE,
GetDozeSupport = HWC2_FUNCTION_GET_DOZE_SUPPORT,
+ GetHdrCapabilities = HWC2_FUNCTION_GET_HDR_CAPABILITIES,
GetMaxVirtualDisplayCount = HWC2_FUNCTION_GET_MAX_VIRTUAL_DISPLAY_COUNT,
GetReleaseFences = HWC2_FUNCTION_GET_RELEASE_FENCES,
PresentDisplay = HWC2_FUNCTION_PRESENT_DISPLAY,
@@ -1244,6 +1247,42 @@
typedef int32_t /*hwc2_error_t*/ (*HWC2_PFN_GET_DOZE_SUPPORT)(
hwc2_device_t* device, hwc2_display_t display, int32_t* outSupport);
+/* getHdrCapabilities(..., outNumTypes, outTypes, outMaxLuminance,
+ * outMaxAverageLuminance, outMinLuminance)
+ * Descriptor: HWC2_FUNCTION_GET_HDR_CAPABILITIES
+ * Must be provided by all HWC2 devices
+ *
+ * Returns the high dynamic range (HDR) capabilities of the given display, which
+ * are invariant with regard to the active configuration.
+ *
+ * Displays which are not HDR-capable must return no types in outTypes and set
+ * outNumTypes to 0.
+ *
+ * If outTypes is NULL, the required number of HDR types must be returned in
+ * outNumTypes.
+ *
+ * Parameters:
+ * outNumTypes - if outTypes was NULL, the number of types which would have
+ * been returned; if it was not NULL, the number of types stored in
+ * outTypes, which must not exceed the value stored in outNumTypes prior
+ * to the call; pointer will be non-NULL
+ * outTypes - an array of HDR types, may have 0 elements if the display is not
+ * HDR-capable
+ * outMaxLuminance - the desired content maximum luminance for this display in
+ * cd/m^2; pointer will be non-NULL
+ * outMaxAverageLuminance - the desired content maximum frame-average
+ * luminance for this display in cd/m^2; pointer will be non-NULL
+ * outMinLuminance - the desired content minimum luminance for this display in
+ * cd/m^2; pointer will be non-NULL
+ *
+ * Returns HWC2_ERROR_NONE or one of the following errors:
+ * HWC2_ERROR_BAD_DISPLAY - an invalid display handle was passed in
+ */
+typedef int32_t /*hwc2_error_t*/ (*HWC2_PFN_GET_HDR_CAPABILITIES)(
+ hwc2_device_t* device, hwc2_display_t display, uint32_t* outNumTypes,
+ int32_t* /*android_hdr_t*/ outTypes, float* outMaxLuminance,
+ float* outMaxAverageLuminance, float* outMinLuminance);
+
/* getReleaseFences(..., outNumElements, outLayers, outFences)
* Descriptor: HWC2_FUNCTION_GET_RELEASE_FENCES
* Must be provided by all HWC2 devices