libgralloc: Set alpha mode for MDP base pipe.

This change configures default alpha mode for MDP base pipe
during intialization.

Change-Id: Ibbc7185c4c57979584a5ce66bd4eef8e521165b5
This commit is contained in:
Jeykumar Sankaran 2012-09-06 11:23:33 -07:00 committed by Andrew Sutherland
parent d0181d6f7c
commit ce1f0fe1c0

View File

@ -270,6 +270,15 @@ int mapFrameBufferLocked(struct private_module_t* module)
uint32_t line_length = (info.xres * info.bits_per_pixel / 8);
info.yres_virtual = (size * numberOfBuffers) / line_length;
struct msmfb_metadata metadata;
metadata.op = metadata_op_base_blend;
metadata.flags = 0;
metadata.data.blend_cfg.is_premultiplied = 1;
if(ioctl(fd, MSMFB_METADATA_SET, &metadata) == -1) {
ALOGW("MSMFB_METADATA_SET failed to configure alpha mode");
}
uint32_t flags = PAGE_FLIP;
if (ioctl(fd, FBIOPUT_VSCREENINFO, &info) == -1) {
info.yres_virtual = size / line_length;