Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 1 | /* |
Sushil Chauhan | 07a2c76 | 2013-03-06 15:36:49 -0800 | [diff] [blame] | 2 | * Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions are |
| 6 | * met: |
| 7 | * * Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * * Redistributions in binary form must reproduce the above |
| 10 | * copyright notice, this list of conditions and the following |
| 11 | * disclaimer in the documentation and/or other materials provided |
| 12 | * with the distribution. |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 13 | * * Neither the name of The Linux Foundation nor the names of its |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 14 | * contributors may be used to endorse or promote products derived |
| 15 | * from this software without specific prior written permission. |
| 16 | * |
| 17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | */ |
| 29 | |
Saurabh Shah | b8f58e2 | 2013-09-26 16:20:07 -0700 | [diff] [blame] | 30 | #include <dlfcn.h> |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 31 | #include "overlay.h" |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 32 | #include "pipes/overlayGenPipe.h" |
| 33 | #include "mdp_version.h" |
Saurabh Shah | 5daeee5 | 2013-01-23 16:52:26 +0800 | [diff] [blame] | 34 | #include "qdMetaData.h" |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 35 | |
Saurabh Shah | b8f58e2 | 2013-09-26 16:20:07 -0700 | [diff] [blame] | 36 | #ifdef USES_QSEED_SCALAR |
| 37 | #include <scale/scale.h> |
| 38 | using namespace scale; |
| 39 | #endif |
| 40 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 41 | #define PIPE_DEBUG 0 |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 42 | |
| 43 | namespace overlay { |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 44 | using namespace utils; |
Saurabh Shah | c62f398 | 2014-03-05 14:28:26 -0800 | [diff] [blame] | 45 | using namespace qdutils; |
Saurabh Shah | b8f58e2 | 2013-09-26 16:20:07 -0700 | [diff] [blame] | 46 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 47 | Overlay::Overlay() { |
Ramkumar Radhakrishnan | 36bd527 | 2014-01-31 20:03:01 -0800 | [diff] [blame] | 48 | int numPipes = qdutils::MDPVersion::getInstance().getTotalPipes(); |
| 49 | PipeBook::NUM_PIPES = (numPipes <= utils::OV_MAX)? numPipes : utils::OV_MAX; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 50 | for(int i = 0; i < PipeBook::NUM_PIPES; i++) { |
| 51 | mPipeBook[i].init(); |
Naseer Ahmed | 1ddf366 | 2012-07-31 19:14:18 -0700 | [diff] [blame] | 52 | } |
Naseer Ahmed | 1ddf366 | 2012-07-31 19:14:18 -0700 | [diff] [blame] | 53 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 54 | mDumpStr[0] = '\0'; |
Saurabh Shah | b8f58e2 | 2013-09-26 16:20:07 -0700 | [diff] [blame] | 55 | initScalar(); |
Raj Kamal | a8c065f | 2013-10-22 14:52:45 +0530 | [diff] [blame] | 56 | setDMAMultiplexingSupported(); |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | Overlay::~Overlay() { |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 60 | for(int i = 0; i < PipeBook::NUM_PIPES; i++) { |
| 61 | mPipeBook[i].destroy(); |
| 62 | } |
Saurabh Shah | b8f58e2 | 2013-09-26 16:20:07 -0700 | [diff] [blame] | 63 | destroyScalar(); |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 64 | } |
| 65 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 66 | void Overlay::configBegin() { |
| 67 | for(int i = 0; i < PipeBook::NUM_PIPES; i++) { |
| 68 | //Mark as available for this round. |
| 69 | PipeBook::resetUse(i); |
| 70 | PipeBook::resetAllocation(i); |
| 71 | } |
| 72 | mDumpStr[0] = '\0'; |
| 73 | } |
| 74 | |
| 75 | void Overlay::configDone() { |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 76 | for(int i = 0; i < PipeBook::NUM_PIPES; i++) { |
Zohaib Alam | 4b0a924 | 2013-11-20 23:54:12 -0500 | [diff] [blame] | 77 | if((PipeBook::isNotUsed(i) && !sessionInProgress((eDest)i)) || |
| 78 | isSessionEnded((eDest)i)) { |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 79 | //Forces UNSET on pipes, flushes rotator memory and session, closes |
| 80 | //fds |
| 81 | if(mPipeBook[i].valid()) { |
| 82 | char str[32]; |
Ramkumar Radhakrishnan | 36bd527 | 2014-01-31 20:03:01 -0800 | [diff] [blame] | 83 | snprintf(str, 32, "Unset=%s dpy=%d mix=%d; ", |
Saurabh Shah | af5f597 | 2013-07-30 13:56:35 -0700 | [diff] [blame] | 84 | PipeBook::getDestStr((eDest)i), |
| 85 | mPipeBook[i].mDisplay, mPipeBook[i].mMixer); |
Saurabh Shah | 9dc88fc | 2013-07-15 16:02:30 -0700 | [diff] [blame] | 86 | #if PIPE_DEBUG |
Ramkumar Radhakrishnan | 36bd527 | 2014-01-31 20:03:01 -0800 | [diff] [blame] | 87 | strlcat(mDumpStr, str, sizeof(mDumpStr)); |
Saurabh Shah | 9dc88fc | 2013-07-15 16:02:30 -0700 | [diff] [blame] | 88 | #endif |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 89 | } |
| 90 | mPipeBook[i].destroy(); |
Naseer Ahmed | 1ddf366 | 2012-07-31 19:14:18 -0700 | [diff] [blame] | 91 | } |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 92 | } |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 93 | dump(); |
| 94 | PipeBook::save(); |
| 95 | } |
| 96 | |
Zohaib Alam | 4b0a924 | 2013-11-20 23:54:12 -0500 | [diff] [blame] | 97 | int Overlay::getPipeId(utils::eDest dest) { |
| 98 | return mPipeBook[(int)dest].mPipe->getPipeId(); |
| 99 | } |
| 100 | |
| 101 | eDest Overlay::getDest(int pipeid) { |
| 102 | eDest dest = OV_INVALID; |
| 103 | // finding the dest corresponding to the given pipe |
| 104 | for(int i=0; i < PipeBook::NUM_PIPES; ++i) { |
| 105 | if(mPipeBook[i].valid() && mPipeBook[i].mPipe->getPipeId() == pipeid) { |
| 106 | return (eDest)i; |
| 107 | } |
| 108 | } |
| 109 | return dest; |
| 110 | } |
| 111 | |
| 112 | eDest Overlay::reservePipe(int pipeid) { |
| 113 | eDest dest = getDest(pipeid); |
| 114 | PipeBook::setAllocation((int)dest); |
| 115 | return dest; |
| 116 | } |
| 117 | |
Saurabh Shah | af5f597 | 2013-07-30 13:56:35 -0700 | [diff] [blame] | 118 | eDest Overlay::nextPipe(eMdpPipeType type, int dpy, int mixer) { |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 119 | eDest dest = OV_INVALID; |
| 120 | |
| 121 | for(int i = 0; i < PipeBook::NUM_PIPES; i++) { |
Saurabh Shah | af5f597 | 2013-07-30 13:56:35 -0700 | [diff] [blame] | 122 | if( (type == OV_MDP_PIPE_ANY || //Pipe type match |
| 123 | type == PipeBook::getPipeType((eDest)i)) && |
| 124 | (mPipeBook[i].mDisplay == DPY_UNUSED || //Free or same display |
| 125 | mPipeBook[i].mDisplay == dpy) && |
| 126 | (mPipeBook[i].mMixer == MIXER_UNUSED || //Free or same mixer |
| 127 | mPipeBook[i].mMixer == mixer) && |
| 128 | PipeBook::isNotAllocated(i) && //Free pipe |
Raj Kamal | a8c065f | 2013-10-22 14:52:45 +0530 | [diff] [blame] | 129 | ( (sDMAMultiplexingSupported && dpy) || |
| 130 | !(sDMAMode == DMA_BLOCK_MODE && //DMA pipe in Line mode |
| 131 | PipeBook::getPipeType((eDest)i) == OV_MDP_PIPE_DMA)) ){ |
| 132 | //DMA-Multiplexing is only supported for WB on 8x26 |
Saurabh Shah | af5f597 | 2013-07-30 13:56:35 -0700 | [diff] [blame] | 133 | dest = (eDest)i; |
| 134 | PipeBook::setAllocation(i); |
| 135 | break; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 136 | } |
| 137 | } |
| 138 | |
| 139 | if(dest != OV_INVALID) { |
| 140 | int index = (int)dest; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 141 | mPipeBook[index].mDisplay = dpy; |
Saurabh Shah | af5f597 | 2013-07-30 13:56:35 -0700 | [diff] [blame] | 142 | mPipeBook[index].mMixer = mixer; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 143 | if(not mPipeBook[index].valid()) { |
| 144 | mPipeBook[index].mPipe = new GenericPipe(dpy); |
Zohaib Alam | 4b0a924 | 2013-11-20 23:54:12 -0500 | [diff] [blame] | 145 | mPipeBook[index].mSession = PipeBook::NONE; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 146 | char str[32]; |
Saurabh Shah | af5f597 | 2013-07-30 13:56:35 -0700 | [diff] [blame] | 147 | snprintf(str, 32, "Set=%s dpy=%d mix=%d; ", |
| 148 | PipeBook::getDestStr(dest), dpy, mixer); |
Saurabh Shah | 9dc88fc | 2013-07-15 16:02:30 -0700 | [diff] [blame] | 149 | #if PIPE_DEBUG |
Ramkumar Radhakrishnan | 36bd527 | 2014-01-31 20:03:01 -0800 | [diff] [blame] | 150 | strlcat(mDumpStr, str, sizeof(mDumpStr)); |
Saurabh Shah | 9dc88fc | 2013-07-15 16:02:30 -0700 | [diff] [blame] | 151 | #endif |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 152 | } |
| 153 | } else { |
Saurabh Shah | af5f597 | 2013-07-30 13:56:35 -0700 | [diff] [blame] | 154 | ALOGD_IF(PIPE_DEBUG, "Pipe unavailable type=%d display=%d mixer=%d", |
| 155 | (int)type, dpy, mixer); |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 156 | } |
| 157 | |
| 158 | return dest; |
| 159 | } |
| 160 | |
Saurabh Shah | c62f398 | 2014-03-05 14:28:26 -0800 | [diff] [blame] | 161 | utils::eDest Overlay::getPipe(const PipeSpecs& pipeSpecs) { |
| 162 | if(MDPVersion::getInstance().is8x26()) { |
| 163 | return getPipe_8x26(pipeSpecs); |
| 164 | } else if(MDPVersion::getInstance().is8x16()) { |
| 165 | return getPipe_8x16(pipeSpecs); |
Prabhanjan Kandula | 958ffa9 | 2014-05-12 14:56:56 +0530 | [diff] [blame^] | 166 | } else if(MDPVersion::getInstance().is8x39()) { |
| 167 | return getPipe_8x39(pipeSpecs); |
Saurabh Shah | c62f398 | 2014-03-05 14:28:26 -0800 | [diff] [blame] | 168 | } |
| 169 | |
| 170 | eDest dest = OV_INVALID; |
| 171 | |
| 172 | //The default behavior is to assume RGB and VG pipes have scalars |
| 173 | if(pipeSpecs.formatClass == FORMAT_YUV) { |
| 174 | return nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer); |
| 175 | } else if(pipeSpecs.fb == false) { //RGB App layers |
| 176 | if(not pipeSpecs.needsScaling) { |
| 177 | dest = nextPipe(OV_MDP_PIPE_DMA, pipeSpecs.dpy, pipeSpecs.mixer); |
| 178 | } |
| 179 | if(dest == OV_INVALID) { |
| 180 | dest = nextPipe(OV_MDP_PIPE_RGB, pipeSpecs.dpy, pipeSpecs.mixer); |
| 181 | } |
| 182 | if(dest == OV_INVALID) { |
| 183 | dest = nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer); |
| 184 | } |
| 185 | } else { //FB layer |
| 186 | dest = nextPipe(OV_MDP_PIPE_RGB, pipeSpecs.dpy, pipeSpecs.mixer); |
| 187 | if(dest == OV_INVALID) { |
| 188 | dest = nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer); |
| 189 | } |
| 190 | //Some features can cause FB to have scaling as well. |
| 191 | //If we ever come to this block with FB needing scaling, |
| 192 | //the screen will be black for a frame, since the FB won't get a pipe |
| 193 | //but atleast this will prevent a hang |
| 194 | if(dest == OV_INVALID and (not pipeSpecs.needsScaling)) { |
| 195 | dest = nextPipe(OV_MDP_PIPE_DMA, pipeSpecs.dpy, pipeSpecs.mixer); |
| 196 | } |
| 197 | } |
| 198 | return dest; |
| 199 | } |
| 200 | |
| 201 | utils::eDest Overlay::getPipe_8x26(const PipeSpecs& pipeSpecs) { |
| 202 | //Use this to hide all the 8x26 requirements that cannot be humanly |
| 203 | //described in a generic way |
| 204 | eDest dest = OV_INVALID; |
| 205 | if(pipeSpecs.formatClass == FORMAT_YUV) { //video |
| 206 | return nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer); |
| 207 | } else if(pipeSpecs.fb == false) { //RGB app layers |
Xu Yang | 1e686f6 | 2014-04-08 13:56:47 +0800 | [diff] [blame] | 208 | if((not pipeSpecs.needsScaling) and |
| 209 | (not (pipeSpecs.numActiveDisplays > 1 && |
| 210 | pipeSpecs.dpy == DPY_PRIMARY))) { |
Saurabh Shah | c62f398 | 2014-03-05 14:28:26 -0800 | [diff] [blame] | 211 | dest = nextPipe(OV_MDP_PIPE_DMA, pipeSpecs.dpy, pipeSpecs.mixer); |
| 212 | } |
| 213 | if(dest == OV_INVALID) { |
| 214 | dest = nextPipe(OV_MDP_PIPE_RGB, pipeSpecs.dpy, pipeSpecs.mixer); |
| 215 | } |
| 216 | if(dest == OV_INVALID) { |
| 217 | dest = nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer); |
| 218 | } |
| 219 | } else { //FB layer |
| 220 | //For 8x26 Secondary we use DMA always for FB for inline rotation |
| 221 | if(pipeSpecs.dpy == DPY_PRIMARY) { |
| 222 | dest = nextPipe(OV_MDP_PIPE_RGB, pipeSpecs.dpy, pipeSpecs.mixer); |
| 223 | if(dest == OV_INVALID) { |
| 224 | dest = nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer); |
| 225 | } |
| 226 | } |
Xu Yang | 1e686f6 | 2014-04-08 13:56:47 +0800 | [diff] [blame] | 227 | if(dest == OV_INVALID and (not pipeSpecs.needsScaling) and |
| 228 | (not (pipeSpecs.numActiveDisplays > 1 && |
| 229 | pipeSpecs.dpy == DPY_PRIMARY))) { |
Saurabh Shah | c62f398 | 2014-03-05 14:28:26 -0800 | [diff] [blame] | 230 | dest = nextPipe(OV_MDP_PIPE_DMA, pipeSpecs.dpy, pipeSpecs.mixer); |
| 231 | } |
| 232 | } |
| 233 | return dest; |
| 234 | } |
| 235 | |
| 236 | utils::eDest Overlay::getPipe_8x16(const PipeSpecs& pipeSpecs) { |
| 237 | //Having such functions help keeping the interface generic but code specific |
| 238 | //and rife with assumptions |
| 239 | eDest dest = OV_INVALID; |
| 240 | if(pipeSpecs.formatClass == FORMAT_YUV or pipeSpecs.needsScaling) { |
| 241 | return nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer); |
radhakrishna | 8929846 | 2014-04-22 19:10:36 +0530 | [diff] [blame] | 242 | } else { |
Saurabh Shah | c62f398 | 2014-03-05 14:28:26 -0800 | [diff] [blame] | 243 | //Since this is a specific func, we can assume stuff like RGB pipe not |
| 244 | //having scalar blocks |
| 245 | dest = nextPipe(OV_MDP_PIPE_RGB, pipeSpecs.dpy, pipeSpecs.mixer); |
| 246 | if(dest == OV_INVALID) { |
| 247 | dest = nextPipe(OV_MDP_PIPE_DMA, pipeSpecs.dpy, pipeSpecs.mixer); |
| 248 | } |
Saurabh Shah | c62f398 | 2014-03-05 14:28:26 -0800 | [diff] [blame] | 249 | if(dest == OV_INVALID) { |
radhakrishna | 8929846 | 2014-04-22 19:10:36 +0530 | [diff] [blame] | 250 | dest = nextPipe(OV_MDP_PIPE_VG, pipeSpecs.dpy, pipeSpecs.mixer); |
Saurabh Shah | c62f398 | 2014-03-05 14:28:26 -0800 | [diff] [blame] | 251 | } |
| 252 | } |
| 253 | return dest; |
| 254 | } |
| 255 | |
Prabhanjan Kandula | 958ffa9 | 2014-05-12 14:56:56 +0530 | [diff] [blame^] | 256 | utils::eDest Overlay::getPipe_8x39(const PipeSpecs& pipeSpecs) { |
| 257 | //8x16 & 8x36 has same number of pipes, pipe-types & scaling capabilities. |
| 258 | //Rely on 8x16 until we see a need to change. |
| 259 | return getPipe_8x16(pipeSpecs); |
| 260 | } |
| 261 | |
Zohaib Alam | 4b0a924 | 2013-11-20 23:54:12 -0500 | [diff] [blame] | 262 | void Overlay::endAllSessions() { |
| 263 | for(int i = 0; i < PipeBook::NUM_PIPES; i++) { |
| 264 | if(mPipeBook[i].valid() && mPipeBook[i].mSession==PipeBook::START) |
| 265 | mPipeBook[i].mSession = PipeBook::END; |
| 266 | } |
| 267 | } |
| 268 | |
Saurabh Shah | 0ceeb6a | 2013-04-23 10:46:07 -0700 | [diff] [blame] | 269 | bool Overlay::isPipeTypeAttached(eMdpPipeType type) { |
| 270 | for(int i = 0; i < PipeBook::NUM_PIPES; i++) { |
| 271 | if(type == PipeBook::getPipeType((eDest)i) && |
Saurabh Shah | c8118ac | 2013-06-27 10:03:19 -0700 | [diff] [blame] | 272 | mPipeBook[i].mDisplay != DPY_UNUSED) { |
Saurabh Shah | 0ceeb6a | 2013-04-23 10:46:07 -0700 | [diff] [blame] | 273 | return true; |
| 274 | } |
| 275 | } |
| 276 | return false; |
| 277 | } |
| 278 | |
Saurabh Shah | dd8237a | 2014-02-28 14:29:09 -0800 | [diff] [blame] | 279 | int Overlay::comparePipePriority(utils::eDest pipe1Index, |
| 280 | utils::eDest pipe2Index) { |
| 281 | validate((int)pipe1Index); |
| 282 | validate((int)pipe2Index); |
| 283 | uint8_t pipe1Prio = mPipeBook[(int)pipe1Index].mPipe->getPriority(); |
| 284 | uint8_t pipe2Prio = mPipeBook[(int)pipe2Index].mPipe->getPriority(); |
| 285 | if(pipe1Prio > pipe2Prio) |
Saurabh Shah | dd8237a | 2014-02-28 14:29:09 -0800 | [diff] [blame] | 286 | return -1; |
Tatenda Chipeperekwa | 657afa2 | 2014-04-15 12:02:39 -0700 | [diff] [blame] | 287 | if(pipe1Prio < pipe2Prio) |
| 288 | return 1; |
Saurabh Shah | dd8237a | 2014-02-28 14:29:09 -0800 | [diff] [blame] | 289 | return 0; |
| 290 | } |
| 291 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 292 | bool Overlay::commit(utils::eDest dest) { |
| 293 | bool ret = false; |
| 294 | int index = (int)dest; |
| 295 | validate(index); |
| 296 | |
| 297 | if(mPipeBook[index].mPipe->commit()) { |
| 298 | ret = true; |
| 299 | PipeBook::setUse((int)dest); |
| 300 | } else { |
Sushil Chauhan | e0dff93 | 2013-03-01 14:33:18 -0800 | [diff] [blame] | 301 | int dpy = mPipeBook[index].mDisplay; |
Saurabh Shah | 7445d4b | 2013-12-05 17:24:45 -0800 | [diff] [blame] | 302 | for(int i = 0; i < PipeBook::NUM_PIPES; i++) { |
Saurabh Shah | df0be75 | 2013-05-23 14:40:00 -0700 | [diff] [blame] | 303 | if (mPipeBook[i].mDisplay == dpy) { |
Sushil Chauhan | e0dff93 | 2013-03-01 14:33:18 -0800 | [diff] [blame] | 304 | PipeBook::resetAllocation(i); |
Saurabh Shah | df0be75 | 2013-05-23 14:40:00 -0700 | [diff] [blame] | 305 | PipeBook::resetUse(i); |
Saurabh Shah | df0be75 | 2013-05-23 14:40:00 -0700 | [diff] [blame] | 306 | } |
Saurabh Shah | 7445d4b | 2013-12-05 17:24:45 -0800 | [diff] [blame] | 307 | } |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 308 | } |
| 309 | return ret; |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 310 | } |
| 311 | |
Naseer Ahmed | f48aef6 | 2012-07-20 09:05:53 -0700 | [diff] [blame] | 312 | bool Overlay::queueBuffer(int fd, uint32_t offset, |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 313 | utils::eDest dest) { |
| 314 | int index = (int)dest; |
| 315 | bool ret = false; |
| 316 | validate(index); |
| 317 | //Queue only if commit() has succeeded (and the bit set) |
| 318 | if(PipeBook::isUsed((int)dest)) { |
| 319 | ret = mPipeBook[index].mPipe->queueBuffer(fd, offset); |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 320 | } |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 321 | return ret; |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 322 | } |
| 323 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 324 | void Overlay::setCrop(const utils::Dim& d, |
| 325 | utils::eDest dest) { |
| 326 | int index = (int)dest; |
| 327 | validate(index); |
| 328 | mPipeBook[index].mPipe->setCrop(d); |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 329 | } |
Naseer Ahmed | f48aef6 | 2012-07-20 09:05:53 -0700 | [diff] [blame] | 330 | |
Sushil Chauhan | 897a9c3 | 2013-07-18 11:09:55 -0700 | [diff] [blame] | 331 | void Overlay::setColor(const uint32_t color, |
| 332 | utils::eDest dest) { |
| 333 | int index = (int)dest; |
| 334 | validate(index); |
| 335 | mPipeBook[index].mPipe->setColor(color); |
| 336 | } |
| 337 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 338 | void Overlay::setPosition(const utils::Dim& d, |
| 339 | utils::eDest dest) { |
| 340 | int index = (int)dest; |
| 341 | validate(index); |
| 342 | mPipeBook[index].mPipe->setPosition(d); |
| 343 | } |
| 344 | |
| 345 | void Overlay::setTransform(const int orient, |
| 346 | utils::eDest dest) { |
| 347 | int index = (int)dest; |
| 348 | validate(index); |
| 349 | |
Naseer Ahmed | f48aef6 | 2012-07-20 09:05:53 -0700 | [diff] [blame] | 350 | utils::eTransform transform = |
| 351 | static_cast<utils::eTransform>(orient); |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 352 | mPipeBook[index].mPipe->setTransform(transform); |
Naseer Ahmed | f48aef6 | 2012-07-20 09:05:53 -0700 | [diff] [blame] | 353 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 354 | } |
| 355 | |
| 356 | void Overlay::setSource(const utils::PipeArgs args, |
| 357 | utils::eDest dest) { |
| 358 | int index = (int)dest; |
| 359 | validate(index); |
| 360 | |
| 361 | PipeArgs newArgs(args); |
Sushil Chauhan | 07a2c76 | 2013-03-06 15:36:49 -0800 | [diff] [blame] | 362 | if(PipeBook::getPipeType(dest) == OV_MDP_PIPE_VG) { |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 363 | setMdpFlags(newArgs.mdpFlags, OV_MDP_PIPE_SHARE); |
| 364 | } else { |
| 365 | clearMdpFlags(newArgs.mdpFlags, OV_MDP_PIPE_SHARE); |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 366 | } |
Jeykumar Sankaran | b551ce4 | 2013-01-10 16:26:48 -0800 | [diff] [blame] | 367 | |
Sushil Chauhan | 07a2c76 | 2013-03-06 15:36:49 -0800 | [diff] [blame] | 368 | if(PipeBook::getPipeType(dest) == OV_MDP_PIPE_DMA) { |
Jeykumar Sankaran | b551ce4 | 2013-01-10 16:26:48 -0800 | [diff] [blame] | 369 | setMdpFlags(newArgs.mdpFlags, OV_MDP_PIPE_FORCE_DMA); |
| 370 | } else { |
| 371 | clearMdpFlags(newArgs.mdpFlags, OV_MDP_PIPE_FORCE_DMA); |
| 372 | } |
| 373 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 374 | mPipeBook[index].mPipe->setSource(newArgs); |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 375 | } |
Naseer Ahmed | f48aef6 | 2012-07-20 09:05:53 -0700 | [diff] [blame] | 376 | |
Saurabh Shah | 5daeee5 | 2013-01-23 16:52:26 +0800 | [diff] [blame] | 377 | void Overlay::setVisualParams(const MetaData_t& metadata, utils::eDest dest) { |
| 378 | int index = (int)dest; |
| 379 | validate(index); |
| 380 | mPipeBook[index].mPipe->setVisualParams(metadata); |
| 381 | } |
| 382 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 383 | Overlay* Overlay::getInstance() { |
| 384 | if(sInstance == NULL) { |
| 385 | sInstance = new Overlay(); |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 386 | } |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 387 | return sInstance; |
Saurabh Shah | c4d034f | 2012-09-27 15:55:15 -0700 | [diff] [blame] | 388 | } |
| 389 | |
Sushil Chauhan | 07a2c76 | 2013-03-06 15:36:49 -0800 | [diff] [blame] | 390 | // Clears any VG pipes allocated to the fb devices |
| 391 | // Generates a LUT for pipe types. |
| 392 | int Overlay::initOverlay() { |
| 393 | int mdpVersion = qdutils::MDPVersion::getInstance().getMDPVersion(); |
| 394 | int numPipesXType[OV_MDP_PIPE_ANY] = {0}; |
| 395 | numPipesXType[OV_MDP_PIPE_RGB] = |
| 396 | qdutils::MDPVersion::getInstance().getRGBPipes(); |
| 397 | numPipesXType[OV_MDP_PIPE_VG] = |
| 398 | qdutils::MDPVersion::getInstance().getVGPipes(); |
| 399 | numPipesXType[OV_MDP_PIPE_DMA] = |
| 400 | qdutils::MDPVersion::getInstance().getDMAPipes(); |
| 401 | |
| 402 | int index = 0; |
| 403 | for(int X = 0; X < (int)OV_MDP_PIPE_ANY; X++) { //iterate over types |
| 404 | for(int j = 0; j < numPipesXType[X]; j++) { //iterate over num |
| 405 | PipeBook::pipeTypeLUT[index] = (utils::eMdpPipeType)X; |
| 406 | index++; |
| 407 | } |
Saurabh Shah | c4d034f | 2012-09-27 15:55:15 -0700 | [diff] [blame] | 408 | } |
Sushil Chauhan | 07a2c76 | 2013-03-06 15:36:49 -0800 | [diff] [blame] | 409 | |
Xiaoming Zhou | 5eff8b6 | 2013-05-01 20:56:09 -0400 | [diff] [blame] | 410 | if (mdpVersion < qdutils::MDSS_V5 && mdpVersion != qdutils::MDP_V3_0_4) { |
Sushil Chauhan | 07a2c76 | 2013-03-06 15:36:49 -0800 | [diff] [blame] | 411 | msmfb_mixer_info_req req; |
| 412 | mdp_mixer_info *minfo = NULL; |
| 413 | char name[64]; |
| 414 | int fd = -1; |
Saurabh Shah | c8118ac | 2013-06-27 10:03:19 -0700 | [diff] [blame] | 415 | for(int i = 0; i < MAX_FB_DEVICES; i++) { |
Sushil Chauhan | 07a2c76 | 2013-03-06 15:36:49 -0800 | [diff] [blame] | 416 | snprintf(name, 64, FB_DEVICE_TEMPLATE, i); |
| 417 | ALOGD("initoverlay:: opening the device:: %s", name); |
| 418 | fd = ::open(name, O_RDWR, 0); |
| 419 | if(fd < 0) { |
| 420 | ALOGE("cannot open framebuffer(%d)", i); |
| 421 | return -1; |
| 422 | } |
| 423 | //Get the mixer configuration */ |
| 424 | req.mixer_num = i; |
| 425 | if (ioctl(fd, MSMFB_MIXER_INFO, &req) == -1) { |
| 426 | ALOGE("ERROR: MSMFB_MIXER_INFO ioctl failed"); |
| 427 | close(fd); |
| 428 | return -1; |
| 429 | } |
| 430 | minfo = req.info; |
| 431 | for (int j = 0; j < req.cnt; j++) { |
| 432 | ALOGD("ndx=%d num=%d z_order=%d", minfo->pndx, minfo->pnum, |
| 433 | minfo->z_order); |
| 434 | // except the RGB base layer with z_order of -1, clear any |
| 435 | // other pipes connected to mixer. |
| 436 | if((minfo->z_order) != -1) { |
| 437 | int index = minfo->pndx; |
| 438 | ALOGD("Unset overlay with index: %d at mixer %d", index, i); |
| 439 | if(ioctl(fd, MSMFB_OVERLAY_UNSET, &index) == -1) { |
| 440 | ALOGE("ERROR: MSMFB_OVERLAY_UNSET failed"); |
| 441 | close(fd); |
| 442 | return -1; |
| 443 | } |
| 444 | } |
| 445 | minfo++; |
| 446 | } |
| 447 | close(fd); |
| 448 | fd = -1; |
| 449 | } |
| 450 | } |
Saurabh Shah | c8118ac | 2013-06-27 10:03:19 -0700 | [diff] [blame] | 451 | |
| 452 | FILE *displayDeviceFP = NULL; |
| 453 | const int MAX_FRAME_BUFFER_NAME_SIZE = 128; |
| 454 | char fbType[MAX_FRAME_BUFFER_NAME_SIZE]; |
| 455 | char msmFbTypePath[MAX_FRAME_BUFFER_NAME_SIZE]; |
| 456 | const char *strDtvPanel = "dtv panel"; |
| 457 | const char *strWbPanel = "writeback panel"; |
| 458 | |
| 459 | for(int num = 1; num < MAX_FB_DEVICES; num++) { |
| 460 | snprintf (msmFbTypePath, sizeof(msmFbTypePath), |
| 461 | "/sys/class/graphics/fb%d/msm_fb_type", num); |
| 462 | displayDeviceFP = fopen(msmFbTypePath, "r"); |
| 463 | |
| 464 | if(displayDeviceFP){ |
| 465 | fread(fbType, sizeof(char), MAX_FRAME_BUFFER_NAME_SIZE, |
| 466 | displayDeviceFP); |
| 467 | |
| 468 | if(strncmp(fbType, strDtvPanel, strlen(strDtvPanel)) == 0) { |
| 469 | sDpyFbMap[DPY_EXTERNAL] = num; |
| 470 | } else if(strncmp(fbType, strWbPanel, strlen(strWbPanel)) == 0) { |
| 471 | sDpyFbMap[DPY_WRITEBACK] = num; |
| 472 | } |
| 473 | |
| 474 | fclose(displayDeviceFP); |
| 475 | } |
| 476 | } |
| 477 | |
Sushil Chauhan | 07a2c76 | 2013-03-06 15:36:49 -0800 | [diff] [blame] | 478 | return 0; |
Naseer Ahmed | 29a2681 | 2012-06-14 00:56:20 -0700 | [diff] [blame] | 479 | } |
| 480 | |
Saurabh Shah | c8118ac | 2013-06-27 10:03:19 -0700 | [diff] [blame] | 481 | bool Overlay::displayCommit(const int& fd) { |
Jeykumar Sankaran | 6a9bb9e | 2013-08-01 14:19:26 -0700 | [diff] [blame] | 482 | utils::Dim roi; |
| 483 | return displayCommit(fd, roi); |
| 484 | } |
| 485 | |
| 486 | bool Overlay::displayCommit(const int& fd, const utils::Dim& roi) { |
Saurabh Shah | c8118ac | 2013-06-27 10:03:19 -0700 | [diff] [blame] | 487 | //Commit |
| 488 | struct mdp_display_commit info; |
| 489 | memset(&info, 0, sizeof(struct mdp_display_commit)); |
| 490 | info.flags = MDP_DISPLAY_COMMIT_OVERLAY; |
Jeykumar Sankaran | 6a9bb9e | 2013-08-01 14:19:26 -0700 | [diff] [blame] | 491 | info.roi.x = roi.x; |
| 492 | info.roi.y = roi.y; |
| 493 | info.roi.w = roi.w; |
| 494 | info.roi.h = roi.h; |
| 495 | |
Saurabh Shah | c8118ac | 2013-06-27 10:03:19 -0700 | [diff] [blame] | 496 | if(!mdp_wrapper::displayCommit(fd, info)) { |
Jeykumar Sankaran | 6a9bb9e | 2013-08-01 14:19:26 -0700 | [diff] [blame] | 497 | ALOGE("%s: commit failed", __func__); |
| 498 | return false; |
Saurabh Shah | c8118ac | 2013-06-27 10:03:19 -0700 | [diff] [blame] | 499 | } |
| 500 | return true; |
| 501 | } |
| 502 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 503 | void Overlay::dump() const { |
Saurabh Shah | 9dc88fc | 2013-07-15 16:02:30 -0700 | [diff] [blame] | 504 | #if PIPE_DEBUG |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 505 | if(strlen(mDumpStr)) { //dump only on state change |
Saurabh Shah | 9dc88fc | 2013-07-15 16:02:30 -0700 | [diff] [blame] | 506 | ALOGD("%s\n", mDumpStr); |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 507 | } |
Saurabh Shah | 9dc88fc | 2013-07-15 16:02:30 -0700 | [diff] [blame] | 508 | #endif |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 509 | } |
| 510 | |
Saurabh Shah | 0d0a7cb | 2013-02-12 17:58:19 -0800 | [diff] [blame] | 511 | void Overlay::getDump(char *buf, size_t len) { |
| 512 | int totalPipes = 0; |
Saurabh Shah | ae61b2b | 2013-04-10 16:37:25 -0700 | [diff] [blame] | 513 | const char *str = "\nOverlay State\n\n"; |
Ramkumar Radhakrishnan | 36bd527 | 2014-01-31 20:03:01 -0800 | [diff] [blame] | 514 | strlcat(buf, str, len); |
Saurabh Shah | 0d0a7cb | 2013-02-12 17:58:19 -0800 | [diff] [blame] | 515 | for(int i = 0; i < PipeBook::NUM_PIPES; i++) { |
| 516 | if(mPipeBook[i].valid()) { |
| 517 | mPipeBook[i].mPipe->getDump(buf, len); |
| 518 | char str[64] = {'\0'}; |
Saurabh Shah | ae61b2b | 2013-04-10 16:37:25 -0700 | [diff] [blame] | 519 | snprintf(str, 64, "Display=%d\n\n", mPipeBook[i].mDisplay); |
Ramkumar Radhakrishnan | 36bd527 | 2014-01-31 20:03:01 -0800 | [diff] [blame] | 520 | strlcat(buf, str, len); |
Saurabh Shah | 0d0a7cb | 2013-02-12 17:58:19 -0800 | [diff] [blame] | 521 | totalPipes++; |
| 522 | } |
| 523 | } |
| 524 | char str_pipes[64] = {'\0'}; |
Saurabh Shah | ae61b2b | 2013-04-10 16:37:25 -0700 | [diff] [blame] | 525 | snprintf(str_pipes, 64, "Pipes=%d\n\n", totalPipes); |
Ramkumar Radhakrishnan | 36bd527 | 2014-01-31 20:03:01 -0800 | [diff] [blame] | 526 | strlcat(buf, str_pipes, len); |
Saurabh Shah | 0d0a7cb | 2013-02-12 17:58:19 -0800 | [diff] [blame] | 527 | } |
| 528 | |
Sushil Chauhan | bd3ea92 | 2013-05-15 12:25:26 -0700 | [diff] [blame] | 529 | void Overlay::clear(int dpy) { |
| 530 | for(int i = 0; i < PipeBook::NUM_PIPES; i++) { |
| 531 | if (mPipeBook[i].mDisplay == dpy) { |
| 532 | // Mark as available for this round |
| 533 | PipeBook::resetUse(i); |
| 534 | PipeBook::resetAllocation(i); |
| 535 | } |
| 536 | } |
| 537 | } |
| 538 | |
Saurabh Shah | a36be92 | 2013-12-16 18:18:39 -0800 | [diff] [blame] | 539 | bool Overlay::validateAndSet(const int& dpy, const int& fbFd) { |
| 540 | GenericPipe* pipeArray[PipeBook::NUM_PIPES]; |
| 541 | memset(&pipeArray, 0, sizeof(pipeArray)); |
| 542 | |
| 543 | int num = 0; |
| 544 | for(int i = 0; i < PipeBook::NUM_PIPES; i++) { |
| 545 | if(PipeBook::isUsed(i) && mPipeBook[i].valid() && |
| 546 | mPipeBook[i].mDisplay == dpy) { |
| 547 | pipeArray[num++] = mPipeBook[i].mPipe; |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | //Protect against misbehaving clients |
| 552 | return num ? GenericPipe::validateAndSet(pipeArray, num, fbFd) : true; |
| 553 | } |
| 554 | |
Saurabh Shah | b8f58e2 | 2013-09-26 16:20:07 -0700 | [diff] [blame] | 555 | void Overlay::initScalar() { |
| 556 | #ifdef USES_QSEED_SCALAR |
| 557 | if(sLibScaleHandle == NULL) { |
| 558 | sLibScaleHandle = dlopen("libscale.so", RTLD_NOW); |
| 559 | } |
| 560 | |
| 561 | if(sLibScaleHandle) { |
| 562 | if(sScale == NULL) { |
| 563 | Scale* (*getInstance)(); |
| 564 | *(void **) &getInstance = dlsym(sLibScaleHandle, "getInstance"); |
| 565 | if(getInstance) { |
| 566 | sScale = getInstance(); |
| 567 | } |
| 568 | } |
| 569 | } |
| 570 | #endif |
| 571 | } |
| 572 | |
| 573 | void Overlay::destroyScalar() { |
| 574 | #ifdef USES_QSEED_SCALAR |
| 575 | if(sLibScaleHandle) { |
| 576 | if(sScale) { |
| 577 | void (*destroyInstance)(Scale*); |
| 578 | *(void **) &destroyInstance = dlsym(sLibScaleHandle, |
| 579 | "destroyInstance"); |
| 580 | if(destroyInstance) { |
| 581 | destroyInstance(sScale); |
| 582 | sScale = NULL; |
| 583 | } |
| 584 | } |
| 585 | dlclose(sLibScaleHandle); |
| 586 | sLibScaleHandle = NULL; |
| 587 | } |
| 588 | #endif |
| 589 | } |
| 590 | |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 591 | void Overlay::PipeBook::init() { |
| 592 | mPipe = NULL; |
| 593 | mDisplay = DPY_UNUSED; |
Saurabh Shah | af5f597 | 2013-07-30 13:56:35 -0700 | [diff] [blame] | 594 | mMixer = MIXER_UNUSED; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 595 | } |
| 596 | |
| 597 | void Overlay::PipeBook::destroy() { |
| 598 | if(mPipe) { |
| 599 | delete mPipe; |
| 600 | mPipe = NULL; |
| 601 | } |
| 602 | mDisplay = DPY_UNUSED; |
Saurabh Shah | af5f597 | 2013-07-30 13:56:35 -0700 | [diff] [blame] | 603 | mMixer = MIXER_UNUSED; |
Zohaib Alam | 4b0a924 | 2013-11-20 23:54:12 -0500 | [diff] [blame] | 604 | mSession = NONE; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 605 | } |
| 606 | |
| 607 | Overlay* Overlay::sInstance = 0; |
Saurabh Shah | c8118ac | 2013-06-27 10:03:19 -0700 | [diff] [blame] | 608 | int Overlay::sDpyFbMap[DPY_MAX] = {0, -1, -1}; |
Saurabh Shah | 85234ec | 2013-04-12 17:09:00 -0700 | [diff] [blame] | 609 | int Overlay::sDMAMode = DMA_LINE_MODE; |
Raj Kamal | a8c065f | 2013-10-22 14:52:45 +0530 | [diff] [blame] | 610 | bool Overlay::sDMAMultiplexingSupported = false; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 611 | int Overlay::PipeBook::NUM_PIPES = 0; |
| 612 | int Overlay::PipeBook::sPipeUsageBitmap = 0; |
| 613 | int Overlay::PipeBook::sLastUsageBitmap = 0; |
| 614 | int Overlay::PipeBook::sAllocatedBitmap = 0; |
Sushil Chauhan | 07a2c76 | 2013-03-06 15:36:49 -0800 | [diff] [blame] | 615 | utils::eMdpPipeType Overlay::PipeBook::pipeTypeLUT[utils::OV_MAX] = |
| 616 | {utils::OV_MDP_PIPE_ANY}; |
Saurabh Shah | b8f58e2 | 2013-09-26 16:20:07 -0700 | [diff] [blame] | 617 | void *Overlay::sLibScaleHandle = NULL; |
| 618 | scale::Scale *Overlay::sScale = NULL; |
Naseer Ahmed | 758bfc5 | 2012-11-28 17:02:08 -0500 | [diff] [blame] | 619 | |
| 620 | }; // namespace overlay |