summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--hwc2/common/devices/PhysicalDevice.cpp15
-rw-r--r--hwc2/include/PhysicalDevice.h1
2 files changed, 11 insertions, 5 deletions
diff --git a/hwc2/common/devices/PhysicalDevice.cpp b/hwc2/common/devices/PhysicalDevice.cpp
index 338b83a..bfd535f 100644
--- a/hwc2/common/devices/PhysicalDevice.cpp
+++ b/hwc2/common/devices/PhysicalDevice.cpp
@@ -29,7 +29,9 @@
#include <tvp/OmxUtil.h>
#include <framebuffer.h>
#include <AmVideo.h>
-#define FBIOPUT_OSD_CURSOR 0x451a
+
+#define FB_IOC_MAGIC 'O'
+#define FBIOPUT_OSD_CURSOR _IOWR(FB_IOC_MAGIC, 0x0, struct fb_cursor)
namespace android {
namespace amlogic {
@@ -1254,7 +1256,7 @@ int32_t PhysicalDevice::preValidate() {
bool bScale = (mReverseScaleX >= 0.01f && mReverseScaleX >= 0.01f) ? true : false;
HwcLayer* layer = NULL;
int videoPresentFlags = 0; //0: no video, 1: video presetn, 2: omx video present;
-
+ mOmxSideBandPresent = false;
//find out video layer first.
for (uint32_t i=0; i<mHwcLayers.size(); i++) {
hwc2_layer_t layerId = mHwcLayers.keyAt(i);
@@ -1282,7 +1284,10 @@ int32_t PhysicalDevice::preValidate() {
}
mVideoOverlayLayerId = layerId;
}
-
+ if (layer->getCompositionType() == HWC2_COMPOSITION_SIDEBAND) {
+ //ALOGD("SIDEBAND");
+ mOmxSideBandPresent = true;
+ }
if (hnd && (hnd->flags & private_handle_t::PRIV_FLAGS_VIDEO_OMX)) {
videoPresentFlags = 2;
} else if (hnd && (hnd->flags & private_handle_t::PRIV_FLAGS_VIDEO_OVERLAY)) {
@@ -1421,8 +1426,8 @@ int32_t PhysicalDevice::validateDisplay(uint32_t* outNumTypes,
if (mOmxKeepLastFrame == 1) {
int is_disable_video = -1;
AmVideo::getInstance()->getvideodisable(&is_disable_video);
- //ALOGD("is_disable_video %d, mOmxVideoPresent %d",is_disable_video,mOmxVideoPresent);
- if (mOmxVideoPresent) {
+ //ALOGD("is_disable_video %d, mOmxVideoPresent %d, mOmxSideBandPresent %d, mVideoLayerOpenByOMX %d",is_disable_video,mOmxVideoPresent,mOmxSideBandPresent,mVideoLayerOpenByOMX);
+ if (mOmxVideoPresent || mOmxSideBandPresent) {
//enable video layer
if (is_disable_video == 1) {
ALOGI("video layer present, enable video layer");
diff --git a/hwc2/include/PhysicalDevice.h b/hwc2/include/PhysicalDevice.h
index 6c5fa5c..762f5cc 100644
--- a/hwc2/include/PhysicalDevice.h
+++ b/hwc2/include/PhysicalDevice.h
@@ -294,6 +294,7 @@ private:
bool mOmxVideoPresent;
uint32_t mOmxKeepLastFrame;
bool mVideoLayerOpenByOMX;
+ bool mOmxSideBandPresent;
};