summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2012-09-20 14:13:07 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-20 14:13:07 -0700
commit919e1c45b77b99c0215a53ab93d8032abb6d8c26 (patch)
tree20079f406435dea1a6416824323f6dff683701e4
parent05f49546a9c70805cbd77e71c7998652f91ec535 (diff)
parentd91697ab8fee9b4c55170230f355f5a25eceefaf (diff)
downloadlibhardware-919e1c45b77b99c0215a53ab93d8032abb6d8c26.tar.gz
Merge "Document reentrancy and error conditions" into jb-mr1-dev
-rw-r--r--include/hardware/hwcomposer.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/hardware/hwcomposer.h b/include/hardware/hwcomposer.h
index 0bebb982..f03ac705 100644
--- a/include/hardware/hwcomposer.h
+++ b/include/hardware/hwcomposer.h
@@ -326,6 +326,9 @@ typedef struct hwc_procs {
* other threads may be calling into the h/w composer while the callback
* is in progress.
*
+ * The h/w composer must serialize calls to the hotplug callback; only
+ * one thread may call it at a time.
+ *
* This callback will be NULL if the h/w composer is using
* HWC_DEVICE_API_VERSION_1_0.
*/
@@ -485,7 +488,8 @@ typedef struct hwc_composer_device_1 {
* implementation should choose one and report it as the first config in
* the list. Reporting the not-chosen configs is not required.
*
- * Returns 0 on success or -errno on error.
+ * Returns 0 on success or -errno on error. If disp is a hotpluggable
+ * display type and no display is connected, an error should be returned.
*
* This field is REQUIRED for HWC_DEVICE_API_VERSION_1_1 and later.
* It should be NULL for previous versions.
@@ -506,8 +510,12 @@ typedef struct hwc_composer_device_1 {
*
* This field is REQUIRED for HWC_DEVICE_API_VERSION_1_1 and later.
* It should be NULL for previous versions.
+ *
+ * If disp is a hotpluggable display type and no display is connected,
+ * or if config is not a valid configuration for the display, a negative
+ * value should be returned.
*/
- void (*getDisplayAttributes)(struct hwc_composer_device_1* dev, int disp,
+ int (*getDisplayAttributes)(struct hwc_composer_device_1* dev, int disp,
uint32_t config, const uint32_t* attributes, int32_t* values);
/*