summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Hu <austin.hu@intel.com>2016-06-14 11:24:55 +0800
committerNick Desaulniers <ndesaulniers@google.com>2016-06-17 10:19:59 -0700
commit8d2f0025fc6c15c3fe0e4ecab89c54c34a63eefb (patch)
tree99b8875faad1711258e911f8daf0c98e019c61b8
parent8084f43a0a1011a70a016755fcb15041e466a9f4 (diff)
downloadhwcomposer-8d2f0025fc6c15c3fe0e4ecab89c54c34a63eefb.tar.gz
Don't support for standard HAL_PIXEL_FORMAT_YV12 format.
Bug: 29160724 Bug: IMINAN-49451 Otherwise gralloc HAL has to hack the buffer allocation for the format, with 128 bytes alignment requirement by overlay plane of Intel display controller. Change-Id: I26960cf12f59d1233787d8f9dee69949a0582090 Signed-off-by: Austin Hu <austin.hu@intel.com>
-rwxr-xr-xmoorefield_hdmi/common/planes/DisplayPlane.cpp5
-rwxr-xr-xmoorefield_hdmi/ips/anniedale/PlaneCapabilities.cpp2
-rwxr-xr-xmoorefield_hdmi/ips/tangier/TngDisplayQuery.cpp1
3 files changed, 4 insertions, 4 deletions
diff --git a/moorefield_hdmi/common/planes/DisplayPlane.cpp b/moorefield_hdmi/common/planes/DisplayPlane.cpp
index 1251c29..a748b13 100755
--- a/moorefield_hdmi/common/planes/DisplayPlane.cpp
+++ b/moorefield_hdmi/common/planes/DisplayPlane.cpp
@@ -217,7 +217,10 @@ bool DisplayPlane::setDataBuffer(uint32_t handle)
if (index < 0) {
VLOGTRACE("unmapped buffer, mapping...");
mapper = mapBuffer(buffer);
- if (!mapper) {
+ // Skip the unsupported format in case that a new gralloc buffer was
+ // created and added into the mapped list, triggered by SoftwareRender
+ // with color conversion from known formats to YV12.
+ if (!mapper || mapper->getFormat() == HAL_PIXEL_FORMAT_YV12) {
ELOGTRACE("failed to map buffer %#x", handle);
bm->unlockDataBuffer(buffer);
return false;
diff --git a/moorefield_hdmi/ips/anniedale/PlaneCapabilities.cpp b/moorefield_hdmi/ips/anniedale/PlaneCapabilities.cpp
index 71def21..a7fbe48 100755
--- a/moorefield_hdmi/ips/anniedale/PlaneCapabilities.cpp
+++ b/moorefield_hdmi/ips/anniedale/PlaneCapabilities.cpp
@@ -58,7 +58,6 @@ bool PlaneCapabilities::isFormatSupported(int planeType, HwcLayer *hwcLayer)
WLOGTRACE("180 degree rotation is not supported yet");
}
return trans ? false : true;
- case HAL_PIXEL_FORMAT_YV12:
case HAL_PIXEL_FORMAT_INTEL_YV12:
return trans ? false: true;
case HAL_PIXEL_FORMAT_NV12:
@@ -102,7 +101,6 @@ bool PlaneCapabilities::isSizeSupported(int planeType, HwcLayer *hwcLayer)
}
} else if (planeType == DisplayPlane::PLANE_OVERLAY) {
switch (format) {
- case HAL_PIXEL_FORMAT_YV12:
case HAL_PIXEL_FORMAT_INTEL_YV12:
case HAL_PIXEL_FORMAT_I420:
case HAL_PIXEL_FORMAT_NV12:
diff --git a/moorefield_hdmi/ips/tangier/TngDisplayQuery.cpp b/moorefield_hdmi/ips/tangier/TngDisplayQuery.cpp
index 8ba7e6d..1a8adb2 100755
--- a/moorefield_hdmi/ips/tangier/TngDisplayQuery.cpp
+++ b/moorefield_hdmi/ips/tangier/TngDisplayQuery.cpp
@@ -32,7 +32,6 @@ bool DisplayQuery::isVideoFormat(uint32_t format)
case OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar_Tiled:
// Expand format to support the case: Software decoder + HW rendering
// Only VP9 use this foramt now
- case HAL_PIXEL_FORMAT_YV12:
case HAL_PIXEL_FORMAT_INTEL_YV12:
return true;
default: