hwc: Support for reading FB format from driver
- Instead of assuming the default format(RGBA_8888),
read FB format from driver and pass the info to SF
- For now, this is limited to primary and HDMI only.
WB FBformat is assumed to be in RGBA_8888
- If FB doesn't have alpha channel, disable mixed mode
Change-Id: Iefc0080819749b541483ea47357bb37ec150c544
diff --git a/libhwcomposer/hwc_fbupdate.cpp b/libhwcomposer/hwc_fbupdate.cpp
index ef83008..3ac04a8 100644
--- a/libhwcomposer/hwc_fbupdate.cpp
+++ b/libhwcomposer/hwc_fbupdate.cpp
@@ -56,7 +56,7 @@
yres = ctx->dpyAttr[mDpy].yres_new;
}
getBufferAttributes((int)xres, (int)yres,
- HAL_PIXEL_FORMAT_RGBA_8888,
+ ctx->dpyAttr[mDpy].fbformat,
0,
mAlignedFBWidth,
mAlignedFBHeight,
@@ -136,7 +136,7 @@
int flags = mTileEnabled ?
private_handle_t::PRIV_FLAGS_TILE_RENDERED : 0;
ovutils::Whf info(mAlignedFBWidth, mAlignedFBHeight,
- ovutils::getMdpFormat(HAL_PIXEL_FORMAT_RGBA_8888, flags));
+ ovutils::getMdpFormat(ctx->dpyAttr[mDpy].fbformat, flags));
Overlay::PipeSpecs pipeSpecs;
pipeSpecs.formatClass = Overlay::FORMAT_RGB;