blob: 7fb5b46cd2ea41eb4429145b495ac8d38aaf7b1e [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>
Arun Kumar K.Rffef7482013-04-10 14:17:22 -070024#include <overlayRotator.h>
Naseer Ahmed758bfc52012-11-28 17:02:08 -050025#include "hwc_fbupdate.h"
Saurabh Shahbd2d0832013-04-04 14:33:08 -070026#include "mdp_version.h"
Arun Kumar K.Rffef7482013-04-10 14:17:22 -070027#include "external.h"
Saurabh Shahbd2d0832013-04-04 14:33:08 -070028
29using namespace qdutils;
Naseer Ahmed758bfc52012-11-28 17:02:08 -050030
Arun Kumar K.Rffef7482013-04-10 14:17:22 -070031using overlay::Rotator;
32
Naseer Ahmed758bfc52012-11-28 17:02:08 -050033namespace qhwc {
34
35namespace ovutils = overlay::utils;
36
Saurabh Shah67a38c32013-06-10 16:23:15 -070037IFBUpdate* IFBUpdate::getObject(const int& width, const int& rightSplit,
38 const int& dpy) {
39 if(width > MAX_DISPLAY_DIM || rightSplit) {
Saurabh Shahcf053c62012-12-13 12:32:55 -080040 return new FBUpdateHighRes(dpy);
41 }
42 return new FBUpdateLowRes(dpy);
Naseer Ahmed758bfc52012-11-28 17:02:08 -050043}
44
Saurabh Shahcf053c62012-12-13 12:32:55 -080045inline void IFBUpdate::reset() {
46 mModeOn = false;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -070047 mRot = NULL;
Saurabh Shahcf053c62012-12-13 12:32:55 -080048}
49
50//================= Low res====================================
51FBUpdateLowRes::FBUpdateLowRes(const int& dpy): IFBUpdate(dpy) {}
52
53inline void FBUpdateLowRes::reset() {
54 IFBUpdate::reset();
55 mDest = ovutils::OV_INVALID;
56}
57
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080058bool FBUpdateLowRes::prepare(hwc_context_t *ctx, hwc_display_contents_1 *list,
59 int fbZorder) {
Naseer Ahmed758bfc52012-11-28 17:02:08 -050060 if(!ctx->mMDP.hasOverlay) {
Saurabh Shahcf053c62012-12-13 12:32:55 -080061 ALOGD_IF(DEBUG_FBUPDATE, "%s, this hw doesnt support overlays",
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080062 __FUNCTION__);
63 return false;
Naseer Ahmed758bfc52012-11-28 17:02:08 -050064 }
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080065 mModeOn = configure(ctx, list, fbZorder);
Saurabh Shahcf053c62012-12-13 12:32:55 -080066 return mModeOn;
Naseer Ahmed758bfc52012-11-28 17:02:08 -050067}
68
69// Configure
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080070bool FBUpdateLowRes::configure(hwc_context_t *ctx, hwc_display_contents_1 *list,
71 int fbZorder) {
Naseer Ahmed758bfc52012-11-28 17:02:08 -050072 bool ret = false;
Naseer Ahmed64b81212013-02-14 10:29:47 -050073 hwc_layer_1_t *layer = &list->hwLayers[list->numHwLayers - 1];
Naseer Ahmed758bfc52012-11-28 17:02:08 -050074 if (LIKELY(ctx->mOverlay)) {
Arun Kumar K.Ra2978452013-02-07 01:34:24 -080075 int extOnlyLayerIndex = ctx->listStats[mDpy].extOnlyLayerIndex;
76 // ext only layer present..
77 if(extOnlyLayerIndex != -1) {
78 layer = &list->hwLayers[extOnlyLayerIndex];
79 layer->compositionType = HWC_OVERLAY;
80 }
Naseer Ahmed758bfc52012-11-28 17:02:08 -050081 overlay::Overlay& ov = *(ctx->mOverlay);
82 private_handle_t *hnd = (private_handle_t *)layer->handle;
Saurabh Shahacf10202013-02-26 10:15:15 -080083 ovutils::Whf info(hnd->width, hnd->height,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080084 ovutils::getMdpFormat(hnd->format), hnd->size);
Naseer Ahmed758bfc52012-11-28 17:02:08 -050085
Saurabh Shahd4e65852013-06-17 11:33:53 -070086 //Request a pipe
87 ovutils::eMdpPipeType type = ovutils::OV_MDP_PIPE_ANY;
88 if(qdutils::MDPVersion::getInstance().is8x26() && mDpy) {
89 //For 8x26 external always use DMA pipe
90 type = ovutils::OV_MDP_PIPE_DMA;
91 }
92 ovutils::eDest dest = ov.nextPipe(type, mDpy);
Naseer Ahmed758bfc52012-11-28 17:02:08 -050093 if(dest == ovutils::OV_INVALID) { //None available
Saurabh Shahaa236822013-04-24 18:07:26 -070094 ALOGE("%s: No pipes available to configure fb for dpy %d",
95 __FUNCTION__, mDpy);
Naseer Ahmed758bfc52012-11-28 17:02:08 -050096 return false;
97 }
Saurabh Shahcf053c62012-12-13 12:32:55 -080098 mDest = dest;
Naseer Ahmed758bfc52012-11-28 17:02:08 -050099
Ramkumar Radhakrishnan1829d282013-07-23 14:54:36 -0700100 if((mDpy && ctx->deviceOrientation) &&
101 ctx->listStats[mDpy].isDisplayAnimating) {
102 fbZorder = 0;
103 }
104
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800105 ovutils::eMdpFlags mdpFlags = ovutils::OV_MDP_BLEND_FG_PREMULT;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700106 ovutils::eIsFg isFg = ovutils::IS_FG_OFF;
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800107 ovutils::eZorder zOrder = static_cast<ovutils::eZorder>(fbZorder);
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500108
Arun Kumar K.Ra2978452013-02-07 01:34:24 -0800109 hwc_rect_t sourceCrop = layer->sourceCrop;
110 hwc_rect_t displayFrame = layer->displayFrame;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700111 int transform = layer->transform;
112 int fbWidth = ctx->dpyAttr[mDpy].xres;
113 int fbHeight = ctx->dpyAttr[mDpy].yres;
114 int rotFlags = ovutils::ROT_FLAGS_NONE;
115
116 ovutils::eTransform orient =
117 static_cast<ovutils::eTransform>(transform);
118 if(mDpy && ctx->mExtOrientation) {
119 // If there is a external orientation set, use that
120 transform = ctx->mExtOrientation;
121 orient = static_cast<ovutils::eTransform >(ctx->mExtOrientation);
122 }
123
Ramkumar Radhakrishnan59a11072013-04-15 16:14:49 -0700124 // Do not use getNonWormholeRegion() function to calculate the
125 // sourceCrop during animation on external display and
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700126 // Dont do wormhole calculation when extorientation is set on External
Ramkumar Radhakrishnan59a11072013-04-15 16:14:49 -0700127 if(ctx->listStats[mDpy].isDisplayAnimating && mDpy) {
128 sourceCrop = layer->displayFrame;
129 displayFrame = sourceCrop;
130 } else if((!mDpy || (mDpy && !ctx->mExtOrientation))
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700131 && extOnlyLayerIndex == -1) {
Saurabh Shahd4e65852013-06-17 11:33:53 -0700132 if(!qdutils::MDPVersion::getInstance().is8x26()) {
133 getNonWormholeRegion(list, sourceCrop);
134 displayFrame = sourceCrop;
135 }
Arun Kumar K.Ra2978452013-02-07 01:34:24 -0800136 }
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500137 ovutils::Dim dpos(displayFrame.left,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800138 displayFrame.top,
139 displayFrame.right - displayFrame.left,
140 displayFrame.bottom - displayFrame.top);
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500141
Saurabh Shahd4e65852013-06-17 11:33:53 -0700142 if(mDpy && !qdutils::MDPVersion::getInstance().is8x26()) {
Arun Kumar K.R82f1d282013-05-17 15:37:31 -0700143 // Get Aspect Ratio for external
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700144 getAspectRatioPosition(ctx, mDpy, ctx->mExtOrientation, dpos.x,
145 dpos.y, dpos.w, dpos.h);
Arun Kumar K.R82f1d282013-05-17 15:37:31 -0700146 // Calculate the actionsafe dimensions for External(dpy = 1 or 2)
147 getActionSafePosition(ctx, mDpy, dpos.x, dpos.y, dpos.w, dpos.h);
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700148 // Convert dim to hwc_rect_t
149 displayFrame.left = dpos.x;
150 displayFrame.top = dpos.y;
151 displayFrame.right = dpos.w + displayFrame.left;
152 displayFrame.bottom = dpos.h + displayFrame.top;
153 }
Ramkumar Radhakrishnan9d52f432013-05-14 14:46:59 -0700154 setMdpFlags(layer, mdpFlags, 0, transform);
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700155 // For External use rotator if there is a rotation value set
156 if(mDpy && (ctx->mExtOrientation & HWC_TRANSFORM_ROT_90)) {
157 mRot = ctx->mRotMgr->getNext();
158 if(mRot == NULL) return -1;
159 //Configure rotator for pre-rotation
160 if(configRotator(mRot, info, sourceCrop, mdpFlags, orient, 0) < 0) {
161 ALOGE("%s: configRotator Failed!", __FUNCTION__);
162 mRot = NULL;
163 return -1;
164 }
165 info.format = (mRot)->getDstFormat();
166 updateSource(orient, info, sourceCrop);
167 rotFlags |= ovutils::ROT_PREROTATED;
168 }
169 //For the mdp, since either we are pre-rotating or MDP does flips
170 orient = ovutils::OVERLAY_TRANSFORM_0;
171 transform = 0;
172 ovutils::PipeArgs parg(mdpFlags, info, zOrder, isFg,
173 static_cast<ovutils::eRotFlags>(rotFlags));
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500174 ret = true;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700175 if(configMdp(ctx->mOverlay, parg, orient, sourceCrop, displayFrame,
176 NULL, mDest) < 0) {
Saurabh Shahe2474082013-05-15 16:32:13 -0700177 ALOGE("%s: configMdp failed for dpy %d", __FUNCTION__, mDpy);
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500178 ret = false;
179 }
180 }
181 return ret;
182}
183
Naseer Ahmed64b81212013-02-14 10:29:47 -0500184bool FBUpdateLowRes::draw(hwc_context_t *ctx, private_handle_t *hnd)
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500185{
Saurabh Shahcf053c62012-12-13 12:32:55 -0800186 if(!mModeOn) {
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500187 return true;
188 }
189 bool ret = true;
190 overlay::Overlay& ov = *(ctx->mOverlay);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800191 ovutils::eDest dest = mDest;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700192 int fd = hnd->fd;
193 uint32_t offset = hnd->offset;
194 if(mRot) {
195 if(!mRot->queueBuffer(fd, offset))
196 return false;
197 fd = mRot->getDstMemId();
198 offset = mRot->getDstOffset();
199 }
200 if (!ov.queueBuffer(fd, offset, dest)) {
Amara Venkata Mastan Manoj Kumardc01a532013-01-30 18:34:56 -0800201 ALOGE("%s: queueBuffer failed for FBUpdate", __FUNCTION__);
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500202 ret = false;
203 }
204 return ret;
205}
206
Saurabh Shahcf053c62012-12-13 12:32:55 -0800207//================= High res====================================
208FBUpdateHighRes::FBUpdateHighRes(const int& dpy): IFBUpdate(dpy) {}
209
210inline void FBUpdateHighRes::reset() {
211 IFBUpdate::reset();
212 mDestLeft = ovutils::OV_INVALID;
213 mDestRight = ovutils::OV_INVALID;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700214 mRot = NULL;
Saurabh Shahcf053c62012-12-13 12:32:55 -0800215}
216
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800217bool FBUpdateHighRes::prepare(hwc_context_t *ctx, hwc_display_contents_1 *list,
218 int fbZorder) {
Saurabh Shahcf053c62012-12-13 12:32:55 -0800219 if(!ctx->mMDP.hasOverlay) {
220 ALOGD_IF(DEBUG_FBUPDATE, "%s, this hw doesnt support overlays",
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800221 __FUNCTION__);
222 return false;
Saurabh Shahcf053c62012-12-13 12:32:55 -0800223 }
224 ALOGD_IF(DEBUG_FBUPDATE, "%s, mModeOn = %d", __FUNCTION__, mModeOn);
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800225 mModeOn = configure(ctx, list, fbZorder);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800226 return mModeOn;
227}
228
229// Configure
Naseer Ahmed64b81212013-02-14 10:29:47 -0500230bool FBUpdateHighRes::configure(hwc_context_t *ctx,
Saurabh Shah67a38c32013-06-10 16:23:15 -0700231 hwc_display_contents_1 *list, int fbZorder) {
Saurabh Shahcf053c62012-12-13 12:32:55 -0800232 bool ret = false;
Naseer Ahmed64b81212013-02-14 10:29:47 -0500233 hwc_layer_1_t *layer = &list->hwLayers[list->numHwLayers - 1];
Saurabh Shahcf053c62012-12-13 12:32:55 -0800234 if (LIKELY(ctx->mOverlay)) {
Arun Kumar K.Ra2978452013-02-07 01:34:24 -0800235 int extOnlyLayerIndex = ctx->listStats[mDpy].extOnlyLayerIndex;
236 // ext only layer present..
237 if(extOnlyLayerIndex != -1) {
238 layer = &list->hwLayers[extOnlyLayerIndex];
239 layer->compositionType = HWC_OVERLAY;
240 }
Saurabh Shahcf053c62012-12-13 12:32:55 -0800241 overlay::Overlay& ov = *(ctx->mOverlay);
242 private_handle_t *hnd = (private_handle_t *)layer->handle;
Saurabh Shahacf10202013-02-26 10:15:15 -0800243 ovutils::Whf info(hnd->width, hnd->height,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800244 ovutils::getMdpFormat(hnd->format), hnd->size);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800245
Saurabh Shahc66f54d2013-06-12 15:45:59 -0700246 //Request left pipe
247 ovutils::eDest destL = ov.nextPipe(ovutils::OV_MDP_PIPE_ANY, mDpy);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800248 if(destL == ovutils::OV_INVALID) { //None available
Saurabh Shahaa236822013-04-24 18:07:26 -0700249 ALOGE("%s: No pipes available to configure fb for dpy %d's left"
250 " mixer", __FUNCTION__, mDpy);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800251 return false;
252 }
Saurabh Shahc66f54d2013-06-12 15:45:59 -0700253 //Request right pipe
254 ovutils::eDest destR = ov.nextPipe(ovutils::OV_MDP_PIPE_ANY, mDpy);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800255 if(destR == ovutils::OV_INVALID) { //None available
Saurabh Shahaa236822013-04-24 18:07:26 -0700256 ALOGE("%s: No pipes available to configure fb for dpy %d's right"
257 " mixer", __FUNCTION__, mDpy);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800258 return false;
259 }
260
261 mDestLeft = destL;
262 mDestRight = destR;
263
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800264 ovutils::eMdpFlags mdpFlagsL = ovutils::OV_MDP_BLEND_FG_PREMULT;
Sravan Kumar D.V.Nb5ed0292013-03-15 08:51:16 +0530265
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800266 ovutils::eZorder zOrder = static_cast<ovutils::eZorder>(fbZorder);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800267
268 ovutils::PipeArgs pargL(mdpFlagsL,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800269 info,
270 zOrder,
271 ovutils::IS_FG_OFF,
272 ovutils::ROT_FLAGS_NONE);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800273 ov.setSource(pargL, destL);
274
275 ovutils::eMdpFlags mdpFlagsR = mdpFlagsL;
276 ovutils::setMdpFlags(mdpFlagsR, ovutils::OV_MDSS_MDP_RIGHT_MIXER);
277 ovutils::PipeArgs pargR(mdpFlagsR,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800278 info,
279 zOrder,
280 ovutils::IS_FG_OFF,
281 ovutils::ROT_FLAGS_NONE);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800282 ov.setSource(pargR, destR);
283
Arun Kumar K.Ra2978452013-02-07 01:34:24 -0800284 hwc_rect_t sourceCrop = layer->sourceCrop;
285 hwc_rect_t displayFrame = layer->displayFrame;
Ramkumar Radhakrishnan59a11072013-04-15 16:14:49 -0700286 // Do not use getNonWormholeRegion() function to calculate the
287 // sourceCrop during animation on external display.
288 if(ctx->listStats[mDpy].isDisplayAnimating && mDpy) {
289 sourceCrop = layer->displayFrame;
290 displayFrame = sourceCrop;
291 } else if(extOnlyLayerIndex == -1) {
Arun Kumar K.Ra2978452013-02-07 01:34:24 -0800292 getNonWormholeRegion(list, sourceCrop);
293 displayFrame = sourceCrop;
294 }
Saurabh Shah67a38c32013-06-10 16:23:15 -0700295
296 const float xres = ctx->dpyAttr[mDpy].xres;
297 //Default even split for all displays with high res
298 float lSplit = xres / 2;
299 if(mDpy == HWC_DISPLAY_PRIMARY &&
300 qdutils::MDPVersion::getInstance().getLeftSplit()) {
301 //Override if split published by driver for primary
302 lSplit = qdutils::MDPVersion::getInstance().getLeftSplit();
303 }
304
305 const float lSplitRatio = lSplit / xres;
306
307 const float lCropWidth =
308 (sourceCrop.right - sourceCrop.left) * lSplitRatio;
309
310 ovutils::Dim dcropL(
311 sourceCrop.left,
312 sourceCrop.top,
313 lCropWidth,
314 sourceCrop.bottom - sourceCrop.top);
315
Saurabh Shahcf053c62012-12-13 12:32:55 -0800316 ovutils::Dim dcropR(
Saurabh Shah67a38c32013-06-10 16:23:15 -0700317 sourceCrop.left + lCropWidth,
318 sourceCrop.top,
319 (sourceCrop.right - sourceCrop.left) - lCropWidth,
320 sourceCrop.bottom - sourceCrop.top);
321
Saurabh Shahcf053c62012-12-13 12:32:55 -0800322 ov.setCrop(dcropL, destL);
323 ov.setCrop(dcropR, destR);
324
325 int transform = layer->transform;
326 ovutils::eTransform orient =
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800327 static_cast<ovutils::eTransform>(transform);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800328 ov.setTransform(orient, destL);
329 ov.setTransform(orient, destR);
330
Saurabh Shah67a38c32013-06-10 16:23:15 -0700331 const int lWidth = (lSplit - displayFrame.left);
332 const int rWidth = (displayFrame.right - lSplit);
Saurabh Shahce416f02013-04-10 13:33:09 -0700333 const int height = displayFrame.bottom - displayFrame.top;
334
Saurabh Shah67a38c32013-06-10 16:23:15 -0700335 ovutils::Dim dposL(displayFrame.left,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800336 displayFrame.top,
Saurabh Shah67a38c32013-06-10 16:23:15 -0700337 lWidth,
Saurabh Shahce416f02013-04-10 13:33:09 -0700338 height);
Arun Kumar K.R0e8efb82013-03-18 17:31:50 -0700339 ov.setPosition(dposL, destL);
Saurabh Shahce416f02013-04-10 13:33:09 -0700340
Arun Kumar K.R0e8efb82013-03-18 17:31:50 -0700341 ovutils::Dim dposR(0,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800342 displayFrame.top,
Saurabh Shah67a38c32013-06-10 16:23:15 -0700343 rWidth,
Saurabh Shahce416f02013-04-10 13:33:09 -0700344 height);
Arun Kumar K.R0e8efb82013-03-18 17:31:50 -0700345 ov.setPosition(dposR, destR);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800346
347 ret = true;
348 if (!ov.commit(destL)) {
349 ALOGE("%s: commit fails for left", __FUNCTION__);
350 ret = false;
351 }
352 if (!ov.commit(destR)) {
353 ALOGE("%s: commit fails for right", __FUNCTION__);
354 ret = false;
355 }
356 }
357 return ret;
358}
359
Naseer Ahmed64b81212013-02-14 10:29:47 -0500360bool FBUpdateHighRes::draw(hwc_context_t *ctx, private_handle_t *hnd)
Saurabh Shahcf053c62012-12-13 12:32:55 -0800361{
362 if(!mModeOn) {
363 return true;
364 }
365 bool ret = true;
366 overlay::Overlay& ov = *(ctx->mOverlay);
367 ovutils::eDest destL = mDestLeft;
368 ovutils::eDest destR = mDestRight;
Saurabh Shahcf053c62012-12-13 12:32:55 -0800369 if (!ov.queueBuffer(hnd->fd, hnd->offset, destL)) {
370 ALOGE("%s: queue failed for left of dpy = %d",
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800371 __FUNCTION__, mDpy);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800372 ret = false;
373 }
374 if (!ov.queueBuffer(hnd->fd, hnd->offset, destR)) {
375 ALOGE("%s: queue failed for right of dpy = %d",
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800376 __FUNCTION__, mDpy);
Saurabh Shahcf053c62012-12-13 12:32:55 -0800377 ret = false;
378 }
379 return ret;
380}
381
Naseer Ahmed758bfc52012-11-28 17:02:08 -0500382//---------------------------------------------------------------------
383}; //namespace qhwc