Merge "commonsys-intf: display: Add frame extension interface" into display-android-commonsys.lnx.1.1
diff --git a/config/display-interfaces-product.mk b/config/display-interfaces-product.mk
new file mode 100644
index 0000000..dfcabdb
--- /dev/null
+++ b/config/display-interfaces-product.mk
@@ -0,0 +1,22 @@
+PRODUCT_PACKAGES += vendor.qti.hardware.display.allocator@1.0.vendor \
+ vendor.qti.hardware.display.allocator@3.0.vendor \
+ vendor.qti.hardware.display.composer@1.0.vendor \
+ vendor.qti.hardware.display.composer@2.0.vendor \
+ vendor.display.config@1.0.vendor \
+ vendor.display.config@1.1.vendor \
+ vendor.display.config@1.2.vendor \
+ vendor.display.config@1.3.vendor \
+ vendor.display.config@1.4.vendor \
+ vendor.display.config@1.5.vendor \
+ vendor.display.config@1.6.vendor \
+ vendor.display.config@1.7.vendor \
+ vendor.display.config@1.8.vendor \
+ vendor.display.config@1.9.vendor \
+ vendor.display.config@1.10.vendor \
+ vendor.display.config@1.11.vendor \
+ vendor.qti.hardware.display.mapper@1.0.vendor \
+ vendor.qti.hardware.display.mapper@1.1.vendor \
+ vendor.qti.hardware.display.mapper@2.0.vendor \
+ vendor.qti.hardware.display.mapper@3.0.vendor \
+ vendor.qti.hardware.display.mapperextensions@1.0.vendor \
+ vendor.qti.hardware.display.mapperextensions@1.1.vendor
diff --git a/include/smomo_interface.h b/include/smomo_interface.h
index ac78575..ed13de5 100644
--- a/include/smomo_interface.h
+++ b/include/smomo_interface.h
@@ -39,6 +39,15 @@
namespace smomo {
+#define SMOMO_LIBRARY_NAME "libsmomo.qti.so"
+#define CREATE_SMOMO_INTERFACE_NAME "CreateSmomoInterface"
+#define DESTROY_SMOMO_INTERFACE_NAME "DestroySmomoInterface"
+
+#define SMOMO_REVISION_MAJOR (1)
+#define SMOMO_REVISION_MINOR (0)
+#define SMOMO_VERSION_TAG ((uint16_t) ((SMOMO_REVISION_MAJOR << 8) \
+ | SMOMO_REVISION_MINOR))
+
typedef int64_t nsecs_t;
/*! @brief This structure defines the layer stats required by SmoMo.
@@ -47,7 +56,7 @@
*/
struct SmomoLayerStats {
std::string name; // layer full name
- int32_t id; // layer ID
+ int32_t id; // layer ID
};
/*! @brief This structure defines the buffer stats required by SmoMo.
@@ -56,10 +65,11 @@
@sa SmomoIntf::ShouldPresentNow
*/
struct SmomoBufferStats {
- int32_t id; // layer ID
+ int32_t id; // layer ID
int32_t queued_frames; // queued frame count of this layer
bool auto_timestamp; // whether timestamp was generated automatically
nsecs_t timestamp; // layer buffer's timestamp
+ nsecs_t dequeue_latency; // last dequeue duration
};
/*! @brief SmoMo interface implemented by SmoMo library.
@@ -128,13 +138,16 @@
@details This function is called to tell SmoMo what refresh rates this display can suport.
- @param[in] refresh_rates The refresh rates list supported by the display
+ @param[in] refresh_rates The refresh rates supported by the display
@return \link void \endlink
*/
virtual void SetDisplayRefreshRates(const std::vector<float> &refresh_rates) = 0;
};
+typedef bool (*CreateSmomoInterface)(uint16_t version, SmomoIntf **interface);
+typedef void (*DestroySmomoInterface)(SmomoIntf *interface);
+
} // namespace smomo
#endif // __SMOMO_INTERFACE_H__
diff --git a/libqdmetadata/qdMetaData.cpp b/libqdmetadata/qdMetaData.cpp
index 0f3cd1e..6434ea3 100644
--- a/libqdmetadata/qdMetaData.cpp
+++ b/libqdmetadata/qdMetaData.cpp
@@ -155,6 +155,9 @@
cvpMetadata->size);
data->cvpMetadata.capture_frame_rate = cvpMetadata->capture_frame_rate;
data->cvpMetadata.cvp_frame_rate = cvpMetadata->cvp_frame_rate;
+ data->cvpMetadata.flags = cvpMetadata->flags;
+ memcpy(data->cvpMetadata.reserved, cvpMetadata->reserved,
+ (8 * sizeof(uint32_t)));
} else {
data->operation &= ~(paramType);
ALOGE("%s: cvp metadata length %d is more than max size %d",
@@ -345,6 +348,9 @@
data->cvpMetadata.size);
cvpMetadata->capture_frame_rate = data->cvpMetadata.capture_frame_rate;
cvpMetadata->cvp_frame_rate = data->cvpMetadata.cvp_frame_rate;
+ cvpMetadata->flags = data->cvpMetadata.flags;
+ memcpy(cvpMetadata->reserved, data->cvpMetadata.reserved,
+ (8 * sizeof(uint32_t)));
ret = 0;
}
}
diff --git a/libqdmetadata/qdMetaData.h b/libqdmetadata/qdMetaData.h
index c8b3446..ca16a94 100644
--- a/libqdmetadata/qdMetaData.h
+++ b/libqdmetadata/qdMetaData.h
@@ -120,6 +120,12 @@
uint32_t reserved[12];
};
+enum CVPMetadataFlags {
+ /* bit wise flags */
+ CVP_METADATA_FLAG_NONE = 0x00000000,
+ CVP_METADATA_FLAG_REPEAT = 0x00000001,
+};
+
typedef struct CVPMetadata {
uint32_t size; /* payload size in bytes */
uint8_t payload[CVP_METADATA_SIZE];
@@ -132,6 +138,8 @@
If size > 0, framerate is valid
If size = 0, invalid data, so ignore all parameters */
uint32_t cvp_frame_rate;
+ enum CVPMetadataFlags flags;
+ uint32_t reserved[8];
} CVPMetadata;
struct MetaData_t {