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