blob: 7c2e643742be8543e0185b85b844fe0d09a967c1 [file] [log] [blame]
Naseer Ahmed758bfc52012-11-28 17:02:08 -05001/*
2 * Copyright (C) 2010 The Android Open Source Project
3 * Copyright (C) 2012, The Linux Foundation. All rights reserved.
4 *
5 * Not a Contribution, Apache license notifications and license are
6 * retained for attribution purposes only.
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
Saurabh Shahcf053c62012-12-13 12:32:55 -080021#define DEBUG_FBUPDATE 0
Arun Kumar K.Rffef7482013-04-10 14:17:22 -070022#include <cutils/properties.h>
Naseer Ahmed758bfc52012-11-28 17:02:08 -050023#include <gralloc_priv.h>
Saurabh Shahaf5f5972013-07-30 13:56:35 -070024#include <overlay.h>
Arun Kumar K.Rffef7482013-04-10 14:17:22 -070025#include <overlayRotator.h>
Naseer Ahmed758bfc52012-11-28 17:02:08 -050026#include "hwc_fbupdate.h"
Saurabh Shahbd2d0832013-04-04 14:33:08 -070027#include "mdp_version.h"
Arun Kumar K.Rffef7482013-04-10 14:17:22 -070028#include "external.h"
Amara Venkata Mastan Manoj Kumar376d8a82013-03-13 19:18:47 -070029#include "virtual.h"
Saurabh Shahbd2d0832013-04-04 14:33:08 -070030
31using namespace qdutils;
Saurabh Shahaf5f5972013-07-30 13:56:35 -070032using namespace overlay;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -070033using overlay::Rotator;
Amara Venkata Mastan Manoj Kumar376d8a82013-03-13 19:18:47 -070034using namespace overlay::utils;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -070035
Naseer Ahmed758bfc52012-11-28 17:02:08 -050036namespace qhwc {
37
38namespace ovutils = overlay::utils;
39
Saurabh Shah67a38c32013-06-10 16:23:15 -070040IFBUpdate* IFBUpdate::getObject(const int& width, const int& rightSplit,
41 const int& dpy) {
42 if(width > MAX_DISPLAY_DIM || rightSplit) {
Saurabh Shahcf053c62012-12-13 12:32:55 -080043 return new FBUpdateHighRes(dpy);
44 }
45 return new FBUpdateLowRes(dpy);
Naseer Ahmed758bfc52012-11-28 17:02:08 -050046}
47
Saurabh Shahcf053c62012-12-13 12:32:55 -080048inline void IFBUpdate::reset() {
49 mModeOn = false;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -070050 mRot = NULL;
Saurabh Shahcf053c62012-12-13 12:32:55 -080051}
52
53//================= Low res====================================
54FBUpdateLowRes::FBUpdateLowRes(const int& dpy): IFBUpdate(dpy) {}
55
56inline void FBUpdateLowRes::reset() {
57 IFBUpdate::reset();
58 mDest = ovutils::OV_INVALID;
59}
60
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080061bool FBUpdateLowRes::prepare(hwc_context_t *ctx, hwc_display_contents_1 *list,
62 int fbZorder) {
Naseer Ahmed758bfc52012-11-28 17:02:08 -050063 if(!ctx->mMDP.hasOverlay) {
Saurabh Shahcf053c62012-12-13 12:32:55 -080064 ALOGD_IF(DEBUG_FBUPDATE, "%s, this hw doesnt support overlays",
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080065 __FUNCTION__);
66 return false;
Naseer Ahmed758bfc52012-11-28 17:02:08 -050067 }
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080068 mModeOn = configure(ctx, list, fbZorder);
Saurabh Shahcf053c62012-12-13 12:32:55 -080069 return mModeOn;
Naseer Ahmed758bfc52012-11-28 17:02:08 -050070}
71
72// Configure
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080073bool FBUpdateLowRes::configure(hwc_context_t *ctx, hwc_display_contents_1 *list,
74 int fbZorder) {
Naseer Ahmed758bfc52012-11-28 17:02:08 -050075 bool ret = false;
Naseer Ahmed64b81212013-02-14 10:29:47 -050076 hwc_layer_1_t *layer = &list->hwLayers[list->numHwLayers - 1];
Naseer Ahmed758bfc52012-11-28 17:02:08 -050077 if (LIKELY(ctx->mOverlay)) {
Arun Kumar K.Ra2978452013-02-07 01:34:24 -080078 int extOnlyLayerIndex = ctx->listStats[mDpy].extOnlyLayerIndex;
79 // ext only layer present..
80 if(extOnlyLayerIndex != -1) {
81 layer = &list->hwLayers[extOnlyLayerIndex];
82 layer->compositionType = HWC_OVERLAY;
83 }
Naseer Ahmed758bfc52012-11-28 17:02:08 -050084 overlay::Overlay& ov = *(ctx->mOverlay);
85 private_handle_t *hnd = (private_handle_t *)layer->handle;
Saurabh Shahacf10202013-02-26 10:15:15 -080086 ovutils::Whf info(hnd->width, hnd->height,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080087 ovutils::getMdpFormat(hnd->format), hnd->size);
Naseer Ahmed758bfc52012-11-28 17:02:08 -050088
Saurabh Shahd4e65852013-06-17 11:33:53 -070089 //Request a pipe
90 ovutils::eMdpPipeType type = ovutils::OV_MDP_PIPE_ANY;
91 if(qdutils::MDPVersion::getInstance().is8x26() && mDpy) {
92 //For 8x26 external always use DMA pipe
93 type = ovutils::OV_MDP_PIPE_DMA;
94 }
Saurabh Shahaf5f5972013-07-30 13:56:35 -070095 ovutils::eDest dest = ov.nextPipe(type, mDpy, Overlay::MIXER_DEFAULT);
Naseer Ahmed758bfc52012-11-28 17:02:08 -050096 if(dest == ovutils::OV_INVALID) { //None available
Saurabh Shahaa236822013-04-24 18:07:26 -070097 ALOGE("%s: No pipes available to configure fb for dpy %d",
98 __FUNCTION__, mDpy);
Naseer Ahmed758bfc52012-11-28 17:02:08 -050099 return false;
100 }
Saurabh Shahcf053c62012-12-13 12:32:55 -0800101 mDest = dest;
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500102
Ramkumar Radhakrishnan1829d282013-07-23 14:54:36 -0700103 if((mDpy && ctx->deviceOrientation) &&
104 ctx->listStats[mDpy].isDisplayAnimating) {
105 fbZorder = 0;
106 }
107
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800108 ovutils::eMdpFlags mdpFlags = ovutils::OV_MDP_BLEND_FG_PREMULT;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700109 ovutils::eIsFg isFg = ovutils::IS_FG_OFF;
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800110 ovutils::eZorder zOrder = static_cast<ovutils::eZorder>(fbZorder);
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500111
Arun Kumar K.Ra2978452013-02-07 01:34:24 -0800112 hwc_rect_t sourceCrop = layer->sourceCrop;
113 hwc_rect_t displayFrame = layer->displayFrame;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700114 int transform = layer->transform;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700115 int rotFlags = ovutils::ROT_FLAGS_NONE;
116
117 ovutils::eTransform orient =
118 static_cast<ovutils::eTransform>(transform);
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700119
Ramkumar Radhakrishnan59a11072013-04-15 16:14:49 -0700120 // Do not use getNonWormholeRegion() function to calculate the
121 // sourceCrop during animation on external display and
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700122 // Dont do wormhole calculation when extorientation is set on External
Amara Venkata Mastan Manoj Kumar376d8a82013-03-13 19:18:47 -0700123 // Dont do wormhole calculation when extDownscale is enabled on External
Ramkumar Radhakrishnan59a11072013-04-15 16:14:49 -0700124 if(ctx->listStats[mDpy].isDisplayAnimating && mDpy) {
125 sourceCrop = layer->displayFrame;
126 displayFrame = sourceCrop;
Amara Venkata Mastan Manoj Kumar376d8a82013-03-13 19:18:47 -0700127 } else if((!mDpy ||
128 (mDpy && !ctx->mExtOrientation
129 && !ctx->dpyAttr[mDpy].mDownScaleMode))
130 && (extOnlyLayerIndex == -1)) {
Saurabh Shahd4e65852013-06-17 11:33:53 -0700131 if(!qdutils::MDPVersion::getInstance().is8x26()) {
132 getNonWormholeRegion(list, sourceCrop);
133 displayFrame = sourceCrop;
134 }
Arun Kumar K.Ra2978452013-02-07 01:34:24 -0800135 }
Saurabh Shahd4e65852013-06-17 11:33:53 -0700136 if(mDpy && !qdutils::MDPVersion::getInstance().is8x26()) {
Amara Venkata Mastan Manoj Kumar376d8a82013-03-13 19:18:47 -0700137 if(ctx->mExtOrientation || ctx->dpyAttr[mDpy].mDownScaleMode) {
138 calcExtDisplayPosition(ctx, mDpy, sourceCrop, displayFrame);
Arun Kumar K.R5898c652013-07-17 14:20:32 -0700139 // If there is a external orientation set, use that
Amara Venkata Mastan Manoj Kumar376d8a82013-03-13 19:18:47 -0700140 if(ctx->mExtOrientation) {
141 transform = ctx->mExtOrientation;
142 orient =
143 static_cast<ovutils::eTransform >(ctx->mExtOrientation);
144 }
Arun Kumar K.R5898c652013-07-17 14:20:32 -0700145 }
Arun Kumar K.R82f1d282013-05-17 15:37:31 -0700146 // Calculate the actionsafe dimensions for External(dpy = 1 or 2)
Arun Kumar K.R5898c652013-07-17 14:20:32 -0700147 getActionSafePosition(ctx, mDpy, displayFrame);
Amara Venkata Mastan Manoj Kumar376d8a82013-03-13 19:18:47 -0700148 }
Ramkumar Radhakrishnan9d52f432013-05-14 14:46:59 -0700149 setMdpFlags(layer, mdpFlags, 0, transform);
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700150 // For External use rotator if there is a rotation value set
Ramkumar Radhakrishnandc4aeb52013-08-22 13:31:33 -0700151 if(mDpy && (ctx->mExtOrientation & HWC_TRANSFORM_ROT_90)) {
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700152 mRot = ctx->mRotMgr->getNext();
153 if(mRot == NULL) return -1;
154 //Configure rotator for pre-rotation
155 if(configRotator(mRot, info, sourceCrop, mdpFlags, orient, 0) < 0) {
156 ALOGE("%s: configRotator Failed!", __FUNCTION__);
157 mRot = NULL;
158 return -1;
159 }
160 info.format = (mRot)->getDstFormat();
161 updateSource(orient, info, sourceCrop);
162 rotFlags |= ovutils::ROT_PREROTATED;
163 }
164 //For the mdp, since either we are pre-rotating or MDP does flips
165 orient = ovutils::OVERLAY_TRANSFORM_0;
166 transform = 0;
167 ovutils::PipeArgs parg(mdpFlags, info, zOrder, isFg,
168 static_cast<ovutils::eRotFlags>(rotFlags));
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500169 ret = true;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700170 if(configMdp(ctx->mOverlay, parg, orient, sourceCrop, displayFrame,
171 NULL, mDest) < 0) {
Saurabh Shahe2474082013-05-15 16:32:13 -0700172 ALOGE("%s: configMdp failed for dpy %d", __FUNCTION__, mDpy);
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500173 ret = false;
174 }
175 }
176 return ret;
177}
178
Naseer Ahmed64b81212013-02-14 10:29:47 -0500179bool FBUpdateLowRes::draw(hwc_context_t *ctx, private_handle_t *hnd)
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500180{
Saurabh Shahcf053c62012-12-13 12:32:55 -0800181 if(!mModeOn) {
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500182 return true;
183 }
184 bool ret = true;
185 overlay::Overlay& ov = *(ctx->mOverlay);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800186 ovutils::eDest dest = mDest;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700187 int fd = hnd->fd;
188 uint32_t offset = hnd->offset;
189 if(mRot) {
190 if(!mRot->queueBuffer(fd, offset))
191 return false;
192 fd = mRot->getDstMemId();
193 offset = mRot->getDstOffset();
194 }
195 if (!ov.queueBuffer(fd, offset, dest)) {
Amara Venkata Mastan Manoj Kumardc01a532013-01-30 18:34:56 -0800196 ALOGE("%s: queueBuffer failed for FBUpdate", __FUNCTION__);
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500197 ret = false;
198 }
199 return ret;
200}
201
Saurabh Shahcf053c62012-12-13 12:32:55 -0800202//================= High res====================================
203FBUpdateHighRes::FBUpdateHighRes(const int& dpy): IFBUpdate(dpy) {}
204
205inline void FBUpdateHighRes::reset() {
206 IFBUpdate::reset();
207 mDestLeft = ovutils::OV_INVALID;
208 mDestRight = ovutils::OV_INVALID;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700209 mRot = NULL;
Saurabh Shahcf053c62012-12-13 12:32:55 -0800210}
211
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800212bool FBUpdateHighRes::prepare(hwc_context_t *ctx, hwc_display_contents_1 *list,
213 int fbZorder) {
Saurabh Shahcf053c62012-12-13 12:32:55 -0800214 if(!ctx->mMDP.hasOverlay) {
215 ALOGD_IF(DEBUG_FBUPDATE, "%s, this hw doesnt support overlays",
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800216 __FUNCTION__);
217 return false;
Saurabh Shahcf053c62012-12-13 12:32:55 -0800218 }
219 ALOGD_IF(DEBUG_FBUPDATE, "%s, mModeOn = %d", __FUNCTION__, mModeOn);
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800220 mModeOn = configure(ctx, list, fbZorder);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800221 return mModeOn;
222}
223
224// Configure
Naseer Ahmed64b81212013-02-14 10:29:47 -0500225bool FBUpdateHighRes::configure(hwc_context_t *ctx,
Saurabh Shah67a38c32013-06-10 16:23:15 -0700226 hwc_display_contents_1 *list, int fbZorder) {
Saurabh Shahcf053c62012-12-13 12:32:55 -0800227 bool ret = false;
Naseer Ahmed64b81212013-02-14 10:29:47 -0500228 hwc_layer_1_t *layer = &list->hwLayers[list->numHwLayers - 1];
Saurabh Shahcf053c62012-12-13 12:32:55 -0800229 if (LIKELY(ctx->mOverlay)) {
Arun Kumar K.Ra2978452013-02-07 01:34:24 -0800230 int extOnlyLayerIndex = ctx->listStats[mDpy].extOnlyLayerIndex;
231 // ext only layer present..
232 if(extOnlyLayerIndex != -1) {
233 layer = &list->hwLayers[extOnlyLayerIndex];
234 layer->compositionType = HWC_OVERLAY;
235 }
Saurabh Shahcf053c62012-12-13 12:32:55 -0800236 overlay::Overlay& ov = *(ctx->mOverlay);
237 private_handle_t *hnd = (private_handle_t *)layer->handle;
Saurabh Shahacf10202013-02-26 10:15:15 -0800238 ovutils::Whf info(hnd->width, hnd->height,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800239 ovutils::getMdpFormat(hnd->format), hnd->size);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800240
Saurabh Shahc66f54d2013-06-12 15:45:59 -0700241 //Request left pipe
Saurabh Shahaf5f5972013-07-30 13:56:35 -0700242 ovutils::eDest destL = ov.nextPipe(ovutils::OV_MDP_PIPE_ANY, mDpy,
243 Overlay::MIXER_LEFT);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800244 if(destL == ovutils::OV_INVALID) { //None available
Saurabh Shahaa236822013-04-24 18:07:26 -0700245 ALOGE("%s: No pipes available to configure fb for dpy %d's left"
246 " mixer", __FUNCTION__, mDpy);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800247 return false;
248 }
Saurabh Shahc66f54d2013-06-12 15:45:59 -0700249 //Request right pipe
Saurabh Shahaf5f5972013-07-30 13:56:35 -0700250 ovutils::eDest destR = ov.nextPipe(ovutils::OV_MDP_PIPE_ANY, mDpy,
251 Overlay::MIXER_RIGHT);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800252 if(destR == ovutils::OV_INVALID) { //None available
Saurabh Shahaa236822013-04-24 18:07:26 -0700253 ALOGE("%s: No pipes available to configure fb for dpy %d's right"
254 " mixer", __FUNCTION__, mDpy);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800255 return false;
256 }
257
258 mDestLeft = destL;
259 mDestRight = destR;
260
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800261 ovutils::eMdpFlags mdpFlagsL = ovutils::OV_MDP_BLEND_FG_PREMULT;
Sravan Kumar D.V.Nb5ed0292013-03-15 08:51:16 +0530262
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800263 ovutils::eZorder zOrder = static_cast<ovutils::eZorder>(fbZorder);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800264
265 ovutils::PipeArgs pargL(mdpFlagsL,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800266 info,
267 zOrder,
268 ovutils::IS_FG_OFF,
269 ovutils::ROT_FLAGS_NONE);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800270 ov.setSource(pargL, destL);
271
272 ovutils::eMdpFlags mdpFlagsR = mdpFlagsL;
273 ovutils::setMdpFlags(mdpFlagsR, ovutils::OV_MDSS_MDP_RIGHT_MIXER);
274 ovutils::PipeArgs pargR(mdpFlagsR,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800275 info,
276 zOrder,
277 ovutils::IS_FG_OFF,
278 ovutils::ROT_FLAGS_NONE);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800279 ov.setSource(pargR, destR);
280
Arun Kumar K.Ra2978452013-02-07 01:34:24 -0800281 hwc_rect_t sourceCrop = layer->sourceCrop;
282 hwc_rect_t displayFrame = layer->displayFrame;
Saurabh Shah67a38c32013-06-10 16:23:15 -0700283
284 const float xres = ctx->dpyAttr[mDpy].xres;
Saurabh Shah07a8ca82013-08-06 18:45:42 -0700285 const int lSplit = getLeftSplit(ctx, mDpy);
Saurabh Shah67a38c32013-06-10 16:23:15 -0700286 const float lSplitRatio = lSplit / xres;
Saurabh Shah67a38c32013-06-10 16:23:15 -0700287 const float lCropWidth =
288 (sourceCrop.right - sourceCrop.left) * lSplitRatio;
289
290 ovutils::Dim dcropL(
291 sourceCrop.left,
292 sourceCrop.top,
293 lCropWidth,
294 sourceCrop.bottom - sourceCrop.top);
295
Saurabh Shahcf053c62012-12-13 12:32:55 -0800296 ovutils::Dim dcropR(
Saurabh Shah67a38c32013-06-10 16:23:15 -0700297 sourceCrop.left + lCropWidth,
298 sourceCrop.top,
299 (sourceCrop.right - sourceCrop.left) - lCropWidth,
300 sourceCrop.bottom - sourceCrop.top);
301
Saurabh Shahcf053c62012-12-13 12:32:55 -0800302 ov.setCrop(dcropL, destL);
303 ov.setCrop(dcropR, destR);
304
305 int transform = layer->transform;
306 ovutils::eTransform orient =
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800307 static_cast<ovutils::eTransform>(transform);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800308 ov.setTransform(orient, destL);
309 ov.setTransform(orient, destR);
310
Saurabh Shah67a38c32013-06-10 16:23:15 -0700311 const int lWidth = (lSplit - displayFrame.left);
312 const int rWidth = (displayFrame.right - lSplit);
Saurabh Shahce416f02013-04-10 13:33:09 -0700313 const int height = displayFrame.bottom - displayFrame.top;
314
Saurabh Shah67a38c32013-06-10 16:23:15 -0700315 ovutils::Dim dposL(displayFrame.left,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800316 displayFrame.top,
Saurabh Shah67a38c32013-06-10 16:23:15 -0700317 lWidth,
Saurabh Shahce416f02013-04-10 13:33:09 -0700318 height);
Arun Kumar K.R0e8efb82013-03-18 17:31:50 -0700319 ov.setPosition(dposL, destL);
Saurabh Shahce416f02013-04-10 13:33:09 -0700320
Arun Kumar K.R0e8efb82013-03-18 17:31:50 -0700321 ovutils::Dim dposR(0,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800322 displayFrame.top,
Saurabh Shah67a38c32013-06-10 16:23:15 -0700323 rWidth,
Saurabh Shahce416f02013-04-10 13:33:09 -0700324 height);
Arun Kumar K.R0e8efb82013-03-18 17:31:50 -0700325 ov.setPosition(dposR, destR);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800326
327 ret = true;
328 if (!ov.commit(destL)) {
329 ALOGE("%s: commit fails for left", __FUNCTION__);
330 ret = false;
331 }
332 if (!ov.commit(destR)) {
333 ALOGE("%s: commit fails for right", __FUNCTION__);
334 ret = false;
335 }
336 }
337 return ret;
338}
339
Naseer Ahmed64b81212013-02-14 10:29:47 -0500340bool FBUpdateHighRes::draw(hwc_context_t *ctx, private_handle_t *hnd)
Saurabh Shahcf053c62012-12-13 12:32:55 -0800341{
342 if(!mModeOn) {
343 return true;
344 }
345 bool ret = true;
346 overlay::Overlay& ov = *(ctx->mOverlay);
347 ovutils::eDest destL = mDestLeft;
348 ovutils::eDest destR = mDestRight;
Saurabh Shahcf053c62012-12-13 12:32:55 -0800349 if (!ov.queueBuffer(hnd->fd, hnd->offset, destL)) {
350 ALOGE("%s: queue failed for left of dpy = %d",
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800351 __FUNCTION__, mDpy);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800352 ret = false;
353 }
354 if (!ov.queueBuffer(hnd->fd, hnd->offset, destR)) {
355 ALOGE("%s: queue failed for right of dpy = %d",
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800356 __FUNCTION__, mDpy);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800357 ret = false;
358 }
359 return ret;
360}
361
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500362//---------------------------------------------------------------------
363}; //namespace qhwc