overlay.h revision 4418482cd51e8343e7efd978ccdd17c616d1d78a
1ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson/* 2ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. 3ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* 4ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* Redistribution and use in source and binary forms, with or without 5ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* modification, are permitted provided that the following conditions are 6ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* met: 7ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* * Redistributions of source code must retain the above copyright 8ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* notice, this list of conditions and the following disclaimer. 9ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* * Redistributions in binary form must reproduce the above 10ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* copyright notice, this list of conditions and the following 11ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* disclaimer in the documentation and/or other materials provided 12ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* with the distribution. 13ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* * Neither the name of The Linux Foundation. nor the names of its 14ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* contributors may be used to endorse or promote products derived 15ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* from this software without specific prior written permission. 16ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* 17ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson*/ 29ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 30ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#ifndef OVERLAY_H 31ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#define OVERLAY_H 32ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 33ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#include "overlayUtils.h" 34a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#include "mdp_version.h" 35ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#include "utils/threads.h" 36ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 37ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsonstruct MetaData_t; 38a653efede03423aa840da24634f1ec6f20796f1eSimon Wilsonnamespace scale { 39a653efede03423aa840da24634f1ec6f20796f1eSimon Wilsonclass Scale; 40a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson}; 41ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 42ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsonnamespace overlay { 43ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsonclass GenericPipe; 44ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 45ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsonclass Overlay : utils::NoCopy { 46ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsonpublic: 47ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson enum { DMA_BLOCK_MODE, DMA_LINE_MODE }; 48ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson //Abstract Display types. Each backed by a LayerMixer, 49ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson //represented by a fb node. 50ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson //High res panels can be backed by 2 layer mixers and a single fb node. 51ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson enum { DPY_PRIMARY, DPY_EXTERNAL, DPY_WRITEBACK, DPY_UNUSED }; 52ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson enum { DPY_MAX = DPY_UNUSED }; 53ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson enum { MIXER_LEFT, MIXER_RIGHT, MIXER_UNUSED }; 54ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson enum { MIXER_DEFAULT = MIXER_LEFT, MIXER_MAX = MIXER_UNUSED }; 55ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson enum { MAX_FB_DEVICES = DPY_MAX }; 56a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah enum { FORMAT_YUV, FORMAT_RGB }; 57a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah 58a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah struct PipeSpecs { 59a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah PipeSpecs() : formatClass(FORMAT_RGB), needsScaling(false), fb(false), 60ba33c33f54132af55509d5ffaf6d8d344368495fXu Yang dpy(DPY_PRIMARY), mixer(MIXER_DEFAULT), numActiveDisplays(1) {} 61a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah int formatClass; 62a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah bool needsScaling; 63a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah bool fb; 64a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah int dpy; 65a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah int mixer; 66ba33c33f54132af55509d5ffaf6d8d344368495fXu Yang int numActiveDisplays; 67a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah }; 68ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 69ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* dtor close */ 70ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson ~Overlay(); 71ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 72ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Marks the beginning of a drawing round, resets usage bits on pipes 73ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson * Should be called when drawing begins before any pipe config is done. 74ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson */ 75ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson void configBegin(); 76ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 77ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Marks the end of config for this drawing round 78ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson * Will do garbage collection of pipe objects and thus calling UNSETs, 79ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson * closing FDs, removing rotator objects and memory, if allocated. 80ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson * Should be called after all pipe configs are done. 81ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson */ 82ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson void configDone(); 83ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 84a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah /* Get a pipe that supported the specified format class (yuv, rgb) and has 85a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah * scaling capabilities. 86a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah */ 87a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah utils::eDest getPipe(const PipeSpecs& pipeSpecs); 88a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* Returns the eDest corresponding to an already allocated pipeid. 89a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * Useful for the reservation case, when libvpu reserves the pipe at its 90a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * end, and expect the overlay to allocate a given pipe for a layer. 91a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson */ 92a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson utils::eDest reservePipe(int pipeid); 93a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* getting dest for the given pipeid */ 94a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson utils::eDest getDest(int pipeid); 95a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* getting overlay.pipeid for the given dest */ 96a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson int getPipeId(utils::eDest dest); 97ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 98ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson void setSource(const utils::PipeArgs args, utils::eDest dest); 99ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson void setCrop(const utils::Dim& d, utils::eDest dest); 100a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson void setColor(const uint32_t color, utils::eDest dest); 101ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson void setTransform(const int orientation, utils::eDest dest); 102ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson void setPosition(const utils::Dim& dim, utils::eDest dest); 103ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson void setVisualParams(const MetaData_t& data, utils::eDest dest); 104ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson bool commit(utils::eDest dest); 105ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson bool queueBuffer(int fd, uint32_t offset, utils::eDest dest); 106ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 107a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* pipe reservation session is running */ 108a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson bool sessionInProgress(utils::eDest dest); 109a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* pipe reservation session has ended*/ 110a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson bool isSessionEnded(utils::eDest dest); 111a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* start session for the pipe reservation */ 112a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson void startSession(utils::eDest dest); 113a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* end all started sesisons */ 114a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson void endAllSessions(); 115ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Returns available ("unallocated") pipes for a display's mixer */ 116ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson int availablePipes(int dpy, int mixer); 117a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* Returns available ("unallocated") pipes for a display */ 118a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson int availablePipes(int dpy); 119a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* Returns available ("unallocated") pipe of given type for a display */ 120a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson int availablePipes(int dpy, utils::eMdpPipeType type); 121ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Returns if any of the requested pipe type is attached to any of the 122ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson * displays 123ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson */ 124ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson bool isPipeTypeAttached(utils::eMdpPipeType type); 1250bc6186c13bed6530aadad53308916869871aa8cSaurabh Shah /* Compare pipe priorities and return 1260bc6186c13bed6530aadad53308916869871aa8cSaurabh Shah * 1 if 1st pipe has a higher priority 1270bc6186c13bed6530aadad53308916869871aa8cSaurabh Shah * 0 if both have the same priority 1280bc6186c13bed6530aadad53308916869871aa8cSaurabh Shah *-1 if 2nd pipe has a higher priority 1290bc6186c13bed6530aadad53308916869871aa8cSaurabh Shah */ 1300bc6186c13bed6530aadad53308916869871aa8cSaurabh Shah int comparePipePriority(utils::eDest pipe1Index, utils::eDest pipe2Index); 131ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Returns pipe dump. Expects a NULL terminated buffer of big enough size 132ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson * to populate. 133ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson */ 1344418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal /* Returns if DMA pipe multiplexing is supported by the mdss driver */ 1354418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal static bool isDMAMultiplexingSupported(); 1364418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal /* Returns if UI scaling on external is supported on the targets */ 1374418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal static bool isUIScalingOnExternalSupported(); 138ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson void getDump(char *buf, size_t len); 139ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Reset usage and allocation bits on all pipes for given display */ 140ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson void clear(int dpy); 141a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* Validate the set of pipes for a display and set them in driver */ 142a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson bool validateAndSet(const int& dpy, const int& fbFd); 143e5fd024417b93aa52eb9050131242779d8295a07Sushil Chauhan /* Returns true if PipeBook has been configured, false otherwise */ 144e5fd024417b93aa52eb9050131242779d8295a07Sushil Chauhan bool isConfigured(); 145ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 146ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Closes open pipes, called during startup */ 147ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static int initOverlay(); 148ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Returns the singleton instance of overlay */ 149ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static Overlay* getInstance(); 150ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static void setDMAMode(const int& mode); 151ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static int getDMAMode(); 152ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Returns the framebuffer node backing up the display */ 153ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static int getFbForDpy(const int& dpy); 154a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson static bool displayCommit(const int& fd, const utils::Dim& roi); 155ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static bool displayCommit(const int& fd); 156ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 157ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsonprivate: 158ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Ctor setup */ 159ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson explicit Overlay(); 160ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /*Validate index range, abort if invalid */ 161ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson void validate(int index); 162a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson static void setDMAMultiplexingSupported(); 163ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson void dump() const; 164a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah /* Returns an available pipe based on the type of pipe requested. When ANY 165a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah * is requested, the first available VG or RGB is returned. If no pipe is 166a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah * available for the display "dpy" then INV is returned. Note: If a pipe is 167a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah * assigned to a certain display, then it cannot be assigned to another 168a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah * display without being garbage-collected once. To add if a pipe is 169a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah * asisgned to a mixer within a display it cannot be reused for another 170a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah * mixer without being UNSET once*/ 171a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah utils::eDest nextPipe(utils::eMdpPipeType, int dpy, int mixer); 172a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah /* Helpers that enfore target specific policies while returning pipes */ 173a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah utils::eDest getPipe_8x26(const PipeSpecs& pipeSpecs); 174a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah utils::eDest getPipe_8x16(const PipeSpecs& pipeSpecs); 175a83d776f160d90db1cb5df28a793f4f06a93f020Saurabh Shah 176a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* Returns the scalar object */ 177a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson static scale::Scale *getScalar(); 178a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* Creates a scalar object using libscale.so */ 179a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson static void initScalar(); 180a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* Destroys the scalar object using libscale.so */ 181a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson static void destroyScalar(); 182ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 183ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Just like a Facebook for pipes, but much less profile info */ 184ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson struct PipeBook { 185ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson void init(); 186ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson void destroy(); 187ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Check if pipe exists and return true, false otherwise */ 188ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson bool valid(); 189ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 190ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Hardware pipe wrapper */ 191ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson GenericPipe *mPipe; 192ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Display using this pipe. Refer to enums above */ 193ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson int mDisplay; 194ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Mixer within a split display this pipe is attached to */ 195ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson int mMixer; 196ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 197ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* operations on bitmap */ 198ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static bool pipeUsageUnchanged(); 199ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static void setUse(int index); 200ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static void resetUse(int index); 201ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static bool isUsed(int index); 202ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static bool isNotUsed(int index); 203ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static void save(); 204ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 205ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static void setAllocation(int index); 206ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static void resetAllocation(int index); 207ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static bool isAllocated(int index); 208ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static bool isNotAllocated(int index); 209e5fd024417b93aa52eb9050131242779d8295a07Sushil Chauhan static bool isConfigured(); 210ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 211ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static utils::eMdpPipeType getPipeType(utils::eDest dest); 212ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static const char* getDestStr(utils::eDest dest); 213ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 214ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static int NUM_PIPES; 215ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static utils::eMdpPipeType pipeTypeLUT[utils::OV_MAX]; 216a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson /* Session for reserved pipes */ 217a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson enum Session { 218a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson NONE, 219a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson START, 220a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson END 221a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson }; 222a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson Session mSession; 223ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 224ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson private: 225ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson //usage tracks if a successful commit happened. So a pipe could be 226ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson //allocated to a display, but it may not end up using it for various 227ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson //reasons. If one display actually uses a pipe then it amy not be 228ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson //used by another display, without an UNSET in between. 229ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static int sPipeUsageBitmap; 230ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static int sLastUsageBitmap; 231ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson //Tracks which pipe objects are allocated. This does not imply that they 232ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson //will actually be used. For example, a display might choose to acquire 233ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson //3 pipe objects in one shot and proceed with config only if it gets all 234ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson //3. The bitmap helps allocate different pipe objects on each request. 235ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static int sAllocatedBitmap; 236ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson }; 237ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 238ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson PipeBook mPipeBook[utils::OV_INVALID]; //Used as max 239ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 240ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Dump string */ 241ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson char mDumpStr[1024]; 242ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 243ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson /* Singleton Instance*/ 244ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static Overlay *sInstance; 245ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static int sDpyFbMap[DPY_MAX]; 246ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson static int sDMAMode; 247a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson static bool sDMAMultiplexingSupported; 248a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson static void *sLibScaleHandle; 249a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson static scale::Scale *sScale; 250a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson 251a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson friend class MdpCtrl; 252ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson}; 253ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 254ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline void Overlay::validate(int index) { 255ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson OVASSERT(index >=0 && index < PipeBook::NUM_PIPES, \ 256ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson "%s, Index out of bounds: %d", __FUNCTION__, index); 257ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson OVASSERT(mPipeBook[index].valid(), "Pipe does not exist %s", 258ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson PipeBook::getDestStr((utils::eDest)index)); 259ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 260ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 261ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline int Overlay::availablePipes(int dpy, int mixer) { 262ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson int avail = 0; 263ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson for(int i = 0; i < PipeBook::NUM_PIPES; i++) { 264ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson if( (mPipeBook[i].mDisplay == DPY_UNUSED || 265ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson mPipeBook[i].mDisplay == dpy) && 266ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson (mPipeBook[i].mMixer == MIXER_UNUSED || 267ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson mPipeBook[i].mMixer == mixer) && 268ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson PipeBook::isNotAllocated(i) && 269ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson !(Overlay::getDMAMode() == Overlay::DMA_BLOCK_MODE && 270ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson PipeBook::getPipeType((utils::eDest)i) == 271ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson utils::OV_MDP_PIPE_DMA)) { 272ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson avail++; 273ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson } 274ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson } 275ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson return avail; 276ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 277ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 278a653efede03423aa840da24634f1ec6f20796f1eSimon Wilsoninline int Overlay::availablePipes(int dpy) { 279a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson int avail = 0; 280a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson for(int i = 0; i < PipeBook::NUM_PIPES; i++) { 281a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson if( (mPipeBook[i].mDisplay == DPY_UNUSED || 282a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson mPipeBook[i].mDisplay == dpy) && 283a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson PipeBook::isNotAllocated(i) && 284a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson !(Overlay::getDMAMode() == Overlay::DMA_BLOCK_MODE && 285a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson PipeBook::getPipeType((utils::eDest)i) == 286a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson utils::OV_MDP_PIPE_DMA)) { 287a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson avail++; 288a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson } 289a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson } 290a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson return avail; 291a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson} 292a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson 293a653efede03423aa840da24634f1ec6f20796f1eSimon Wilsoninline int Overlay::availablePipes(int dpy, utils::eMdpPipeType type) { 294a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson int avail = 0; 295a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson for(int i = 0; i < PipeBook::NUM_PIPES; i++) { 296a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson if((mPipeBook[i].mDisplay == DPY_UNUSED || 297a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson mPipeBook[i].mDisplay == dpy) && 298a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson PipeBook::isNotAllocated(i) && 299a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson type == PipeBook::getPipeType((utils::eDest)i)) { 300a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson avail++; 301a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson } 302a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson } 303a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson return avail; 304a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson} 305a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson 306ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline void Overlay::setDMAMode(const int& mode) { 307ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson if(mode == DMA_LINE_MODE || mode == DMA_BLOCK_MODE) 308ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson sDMAMode = mode; 309ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 310ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 311a653efede03423aa840da24634f1ec6f20796f1eSimon Wilsoninline void Overlay::setDMAMultiplexingSupported() { 312a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson sDMAMultiplexingSupported = false; 313a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson if(qdutils::MDPVersion::getInstance().is8x26()) 314a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson sDMAMultiplexingSupported = true; 315a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson} 316a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson 3174418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamalinline bool Overlay::isDMAMultiplexingSupported() { 3184418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal return sDMAMultiplexingSupported; 3194418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal} 3204418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal 3214418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamalinline bool Overlay::isUIScalingOnExternalSupported() { 3224418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal if(qdutils::MDPVersion::getInstance().is8x26() or 3234418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal qdutils::MDPVersion::getInstance().is8x16()) { 3244418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal return false; 3254418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal } 3264418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal return true; 3274418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal} 3284418482cd51e8343e7efd978ccdd17c616d1d78aRaj Kamal 329ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline int Overlay::getDMAMode() { 330ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson return sDMAMode; 331ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 332ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 333ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline int Overlay::getFbForDpy(const int& dpy) { 334ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson OVASSERT(dpy >= 0 && dpy < DPY_MAX, "Invalid dpy %d", dpy); 335ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson return sDpyFbMap[dpy]; 336ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 337ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 338a653efede03423aa840da24634f1ec6f20796f1eSimon Wilsoninline scale::Scale *Overlay::getScalar() { 339a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson return sScale; 340ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 341ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 342ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline bool Overlay::PipeBook::valid() { 343ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson return (mPipe != NULL); 344ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 345ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 346ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline bool Overlay::PipeBook::pipeUsageUnchanged() { 347ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson return (sPipeUsageBitmap == sLastUsageBitmap); 348ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 349ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 350ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline void Overlay::PipeBook::setUse(int index) { 351ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson sPipeUsageBitmap |= (1 << index); 352ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 353ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 354ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline void Overlay::PipeBook::resetUse(int index) { 355ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson sPipeUsageBitmap &= ~(1 << index); 356ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 357ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 358ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline bool Overlay::PipeBook::isUsed(int index) { 359ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson return sPipeUsageBitmap & (1 << index); 360ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 361ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 362ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline bool Overlay::PipeBook::isNotUsed(int index) { 363ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson return !isUsed(index); 364ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 365ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 366ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline void Overlay::PipeBook::save() { 367ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson sLastUsageBitmap = sPipeUsageBitmap; 368ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 369ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 370ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline void Overlay::PipeBook::setAllocation(int index) { 371ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson sAllocatedBitmap |= (1 << index); 372ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 373ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 374ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline void Overlay::PipeBook::resetAllocation(int index) { 375ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson sAllocatedBitmap &= ~(1 << index); 376ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 377ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 378ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline bool Overlay::PipeBook::isAllocated(int index) { 379ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson return sAllocatedBitmap & (1 << index); 380ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 381ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 382ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline bool Overlay::PipeBook::isNotAllocated(int index) { 383ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson return !isAllocated(index); 384ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 385ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 386ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline utils::eMdpPipeType Overlay::PipeBook::getPipeType(utils::eDest dest) { 387ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson return pipeTypeLUT[(int)dest]; 388ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 389ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 390a653efede03423aa840da24634f1ec6f20796f1eSimon Wilsoninline void Overlay::startSession(utils::eDest dest) { 391a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson mPipeBook[(int)dest].mSession = PipeBook::START; 392a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson} 393a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson 394a653efede03423aa840da24634f1ec6f20796f1eSimon Wilsoninline bool Overlay::sessionInProgress(utils::eDest dest) { 395a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson return (mPipeBook[(int)dest].mSession == PipeBook::START); 396a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson} 397a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson 398a653efede03423aa840da24634f1ec6f20796f1eSimon Wilsoninline bool Overlay::isSessionEnded(utils::eDest dest) { 399a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson return (mPipeBook[(int)dest].mSession == PipeBook::END); 400a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson} 401a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson 402ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilsoninline const char* Overlay::PipeBook::getDestStr(utils::eDest dest) { 403ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson switch(getPipeType(dest)) { 404ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson case utils::OV_MDP_PIPE_RGB: return "RGB"; 405ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson case utils::OV_MDP_PIPE_VG: return "VG"; 406ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson case utils::OV_MDP_PIPE_DMA: return "DMA"; 407ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson default: return "Invalid"; 408ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson } 409ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson return "Invalid"; 410ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson} 411ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 412e5fd024417b93aa52eb9050131242779d8295a07Sushil Chauhaninline bool Overlay::PipeBook::isConfigured() { 413e5fd024417b93aa52eb9050131242779d8295a07Sushil Chauhan return (sAllocatedBitmap != 0); 414e5fd024417b93aa52eb9050131242779d8295a07Sushil Chauhan} 415e5fd024417b93aa52eb9050131242779d8295a07Sushil Chauhan 416e5fd024417b93aa52eb9050131242779d8295a07Sushil Chauhaninline bool Overlay::isConfigured() { 417e5fd024417b93aa52eb9050131242779d8295a07Sushil Chauhan return PipeBook::isConfigured(); 418e5fd024417b93aa52eb9050131242779d8295a07Sushil Chauhan} 419e5fd024417b93aa52eb9050131242779d8295a07Sushil Chauhan 420ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson}; // overlay 421ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson 422ef53c1c84ec55ed50f607d52b7abfbb86239408eSimon Wilson#endif // OVERLAY_H 423