From ce1f0fe1c0d6e6a94a35f8b57a0a19833a167e80 Mon Sep 17 00:00:00 2001 From: Jeykumar Sankaran Date: Thu, 6 Sep 2012 11:23:33 -0700 Subject: [PATCH] libgralloc: Set alpha mode for MDP base pipe. This change configures default alpha mode for MDP base pipe during intialization. Change-Id: Ibbc7185c4c57979584a5ce66bd4eef8e521165b5 --- libgralloc/framebuffer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libgralloc/framebuffer.cpp b/libgralloc/framebuffer.cpp index 48f3bb0..9565127 100644 --- a/libgralloc/framebuffer.cpp +++ b/libgralloc/framebuffer.cpp @@ -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;