overlay3DPipe.h revision 29a26818d7294055539167b2fbfdaa168bcf725c
129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed/* 229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. 329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* 429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* Redistribution and use in source and binary forms, with or without 529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* modification, are permitted provided that the following conditions are 629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* met: 729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* * Redistributions of source code must retain the above copyright 829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* notice, this list of conditions and the following disclaimer. 929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* * Redistributions in binary form must reproduce the above 1029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* copyright notice, this list of conditions and the following 1129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* disclaimer in the documentation and/or other materials provided 1229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* with the distribution. 1329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* * Neither the name of Code Aurora Forum, Inc. nor the names of its 1429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* contributors may be used to endorse or promote products derived 1529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* from this software without specific prior written permission. 1629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* 1729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 1829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 2029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 2129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 2429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 2529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 2629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 2729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed*/ 2929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 3029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed#ifndef OVERLAY_M3D_EXT_PIPE_H 3129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed#define OVERLAY_M3D_EXT_PIPE_H 3229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 3329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed#include "overlayGenPipe.h" 3429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed#include "overlayUtils.h" 3529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 3629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmednamespace overlay { 3729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 3829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed///////////// M3DExt Pipe //////////////////////////// 3929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed/** 4029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* A specific impl of GenericPipe for 3D. 4129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* Whenever needed to have a pass through - we do it. 4229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* If there is a special need for special/diff behavior 4329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* do it here 4429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* PANEL is always EXTERNAL for this pipe. 4529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* CHAN = 0,1 it's either Channel 1 or channel 2 needed for 4629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* 3D crop and position */ 4729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 4829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedclass M3DExtPipe : utils::NoCopy { 4929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedpublic: 5029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed /* Please look at overlayGenPipe.h for info */ 5129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed explicit M3DExtPipe(); 5229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ~M3DExtPipe(); 5329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool open(RotatorBase* rot); 5429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool close(); 5529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool commit(); 5629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed void setId(int id); 5729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed void setMemoryId(int id); 5829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool queueBuffer(uint32_t offset); 5929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool dequeueBuffer(void*& buf); 6029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool waitForVsync(); 6129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setCrop(const utils::Dim& d); 6229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool start(const utils::PipeArgs& args); 6329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setPosition(const utils::Dim& dim); 6429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setParameter(const utils::Params& param); 6529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setSource(const utils::PipeArgs& args); 6629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed const utils::PipeArgs& getArgs() const; 6729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::eOverlayPipeType getOvPipeType() const; 6829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed void dump() const; 6929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedprivate: 7029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed overlay::GenericPipe<utils::EXTERNAL> mM3d; 7129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // Cache the M3D format 7229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed uint32_t mM3Dfmt; 7329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed}; 7429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 7529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed///////////// M3DPrimary Pipe //////////////////////////// 7629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed/** 7729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* A specific impl of GenericPipe for 3D. 7829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* Whenever needed to have a pass through - we do it. 7929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* If there is a special need for special/diff behavior 8029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* do it here 8129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* PANEL is always PRIMARY for this pipe. 8229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* CHAN = 0,1 it's either Channel 1 or channel 2 needed for 8329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* 3D crop and position */ 8429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 8529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedclass M3DPrimaryPipe : utils::NoCopy { 8629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedpublic: 8729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed /* Please look at overlayGenPipe.h for info */ 8829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed explicit M3DPrimaryPipe(); 8929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ~M3DPrimaryPipe(); 9029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool open(RotatorBase* rot); 9129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool close(); 9229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool commit(); 9329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed void setId(int id); 9429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed void setMemoryId(int id); 9529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool queueBuffer(uint32_t offset); 9629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool dequeueBuffer(void*& buf); 9729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool waitForVsync(); 9829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setCrop(const utils::Dim& d); 9929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool start(const utils::PipeArgs& args); 10029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setPosition(const utils::Dim& dim); 10129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setParameter(const utils::Params& param); 10229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setSource(const utils::PipeArgs& args); 10329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed const utils::PipeArgs& getArgs() const; 10429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::eOverlayPipeType getOvPipeType() const; 10529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed void dump() const; 10629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedprivate: 10729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed overlay::GenericPipe<utils::PRIMARY> mM3d; 10829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // Cache the M3D format 10929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed uint32_t mM3Dfmt; 11029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed}; 11129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 11229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed///////////// S3DExt Pipe //////////////////////////////// 11329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed/** 11429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* A specific impl of GenericPipe for 3D. 11529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* Whenever needed to have a pass through - we do it. 11629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* If there is a special need for special/diff behavior 11729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* do it here. 11829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* PANEL is always EXTERNAL for this pipe. 11929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* CHAN = 0,1 it's either Channel 1 or channel 2 needed for 12029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* 3D crop and position */ 12129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 12229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedclass S3DExtPipe : utils::NoCopy { 12329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedpublic: 12429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed /* Please look at overlayGenPipe.h for info */ 12529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed explicit S3DExtPipe(); 12629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ~S3DExtPipe(); 12729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool open(RotatorBase* rot); 12829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool close(); 12929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool commit(); 13029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed void setId(int id); 13129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed void setMemoryId(int id); 13229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool queueBuffer(uint32_t offset); 13329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool dequeueBuffer(void*& buf); 13429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool waitForVsync(); 13529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setCrop(const utils::Dim& d); 13629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool start(const utils::PipeArgs& args); 13729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setPosition(const utils::Dim& dim); 13829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setParameter(const utils::Params& param); 13929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setSource(const utils::PipeArgs& args); 14029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed const utils::PipeArgs& getArgs() const; 14129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::eOverlayPipeType getOvPipeType() const; 14229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed void dump() const; 14329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedprivate: 14429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed overlay::GenericPipe<utils::EXTERNAL> mS3d; 14529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // Cache the 3D format 14629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed uint32_t mS3Dfmt; 14729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed}; 14829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 14929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed///////////// S3DPrimary Pipe //////////////////////////// 15029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed/** 15129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* A specific impl of GenericPipe for 3D. 15229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* Whenever needed to have a pass through - we do it. 15329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* If there is a special need for special/diff behavior 15429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* do it here 15529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* PANEL is always PRIMARY for this pipe. 15629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* CHAN = 0,1 it's either Channel 1 or channel 2 needed for 15729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* 3D crop and position */ 15829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 15929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedclass S3DPrimaryPipe : utils::NoCopy { 16029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedpublic: 16129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed /* Please look at overlayGenPipe.h for info */ 16229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed explicit S3DPrimaryPipe(); 16329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ~S3DPrimaryPipe(); 16429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool open(RotatorBase* rot); 16529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool close(); 16629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool commit(); 16729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed void setId(int id); 16829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed void setMemoryId(int id); 16929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool queueBuffer(uint32_t offset); 17029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool dequeueBuffer(void*& buf); 17129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool waitForVsync(); 17229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setCrop(const utils::Dim& d); 17329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool start(const utils::PipeArgs& args); 17429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setPosition(const utils::Dim& dim); 17529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setParameter(const utils::Params& param); 17629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed bool setSource(const utils::PipeArgs& args); 17729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed const utils::PipeArgs& getArgs() const; 17829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::eOverlayPipeType getOvPipeType() const; 17929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed void dump() const; 18029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedprivate: 18129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed /* needed for 3D related IOCTL */ 18229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed MdpCtrl3D mCtrl3D; 18329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed overlay::GenericPipe<utils::PRIMARY> mS3d; 18429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // Cache the 3D format 18529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed uint32_t mS3Dfmt; 18629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed}; 18729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 18829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 18929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 19029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 19129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed//------------------------Inlines and Templates-------------------------- 19229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 19329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 19429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed///////////// M3DExt Pipe //////////////////////////// 19529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 19629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline M3DExtPipe<CHAN>::M3DExtPipe() : mM3Dfmt(0) {} 19729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 19829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline M3DExtPipe<CHAN>::~M3DExtPipe() { close(); } 19929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 20029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DExtPipe<CHAN>::open(RotatorBase* rot) { 20129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE_IF(DEBUG_OVERLAY, "M3DExtPipe open"); 20229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!mM3d.open(rot)) { 20329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("3Dpipe failed to open"); 20429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 20529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 20629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return true; 20729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 20829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 20929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DExtPipe<CHAN>::close() { 21029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.close(); 21129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 21229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 21329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DExtPipe<CHAN>::commit() { return mM3d.commit(); } 21429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 21529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline void M3DExtPipe<CHAN>::setId(int id) { mM3d.setId(id); } 21629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 21729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline void M3DExtPipe<CHAN>::setMemoryId(int id) { mM3d.setMemoryId(id); } 21829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 21929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DExtPipe<CHAN>::queueBuffer(uint32_t offset) { 22029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.queueBuffer(offset); } 22129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 22229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DExtPipe<CHAN>::dequeueBuffer(void*& buf) { 22329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.dequeueBuffer(buf); } 22429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 22529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DExtPipe<CHAN>::waitForVsync() { 22629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.waitForVsync(); } 22729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 22829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DExtPipe<CHAN>::setCrop(const utils::Dim& d) { 22929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::Dim _dim; 23029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!utils::getCropS3D<CHAN>(d, _dim, mM3Dfmt)){ 23129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("M3DExtPipe setCrop failed to getCropS3D"); 23229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed _dim = d; 23329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 23429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.setCrop(_dim); 23529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 23629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 23729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DExtPipe<CHAN>::start(const utils::PipeArgs& args) { 23829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!mM3d.start(args)) { 23929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("M3DExtPipe start failed"); 24029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 24129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 24229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return true; 24329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 24429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 24529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DExtPipe<CHAN>::setPosition(const utils::Dim& d) { 24629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::Dim _dim; 24729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // original setPositionHandleState has getPositionS3D(...,true) 24829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // which means format is HAL_3D_OUT_SBS_MASK 24929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // HAL_3D_OUT_SBS_MASK is 0x1000 >> 12 == 0x1 as the orig 25029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // code suggets 25129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::Whf _whf(mM3d.getScreenInfo().mFBWidth, 25229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mM3d.getScreenInfo().mFBHeight, 25329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mM3Dfmt); 25429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!utils::getPositionS3D<CHAN>(_whf, _dim)) { 25529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DPrimaryPipe setPosition err in getPositionS3D"); 25629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed _dim = d; 25729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 25829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.setPosition(_dim); 25929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 26029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 26129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DExtPipe<CHAN>::setParameter(const utils::Params& param) { 26229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.setParameter(param); 26329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 26429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 26529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DExtPipe<CHAN>::setSource(const utils::PipeArgs& args) 26629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed{ 26729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // extract 3D fmt 26829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mM3Dfmt = utils::format3DInput(utils::getS3DFormat(args.whf.format)) | 26929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::HAL_3D_OUT_MONOS_MASK; 27029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(mM3d.isClosed()){ 27129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!this->start(args)) { 27229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("M3DExtPipe setSource failed to start"); 27329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 27429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 27529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 27629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.setSource(args); 27729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 27829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 27929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline const utils::PipeArgs& M3DExtPipe<CHAN>::getArgs() const { 28029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.getArgs(); 28129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 28229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 28329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline utils::eOverlayPipeType M3DExtPipe<CHAN>::getOvPipeType() const { 28429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return utils::OV_PIPE_TYPE_M3D_EXTERNAL; 28529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 28629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 28729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline void M3DExtPipe<CHAN>::dump() const { 28829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("M3DExtPipe Pipe fmt=%d", mM3Dfmt); 28929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mM3d.dump(); 29029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 29129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 29229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 29329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed///////////// M3DPrimary Pipe //////////////////////////// 29429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 29529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline M3DPrimaryPipe<CHAN>::M3DPrimaryPipe() : mM3Dfmt(0) {} 29629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 29729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline M3DPrimaryPipe<CHAN>::~M3DPrimaryPipe() { close(); } 29829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 29929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DPrimaryPipe<CHAN>::open(RotatorBase* rot) { 30029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE_IF(DEBUG_OVERLAY, "M3DPrimaryPipe open"); 30129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!mM3d.open(rot)) { 30229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("3Dpipe failed to open"); 30329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 30429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 30529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return true; 30629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 30729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 30829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DPrimaryPipe<CHAN>::close() { 30929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.close(); 31029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 31129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 31229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DPrimaryPipe<CHAN>::commit() { return mM3d.commit(); } 31329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 31429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline void M3DPrimaryPipe<CHAN>::setId(int id) { mM3d.setId(id); } 31529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 31629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline void M3DPrimaryPipe<CHAN>::setMemoryId(int id) { mM3d.setMemoryId(id); } 31729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 31829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DPrimaryPipe<CHAN>::queueBuffer(uint32_t offset) { 31929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.queueBuffer(offset); } 32029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 32129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DPrimaryPipe<CHAN>::dequeueBuffer(void*& buf) { 32229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.dequeueBuffer(buf); } 32329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 32429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DPrimaryPipe<CHAN>::waitForVsync() { 32529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.waitForVsync(); } 32629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 32729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DPrimaryPipe<CHAN>::setCrop(const utils::Dim& d) { 32829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::Dim _dim; 32929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!utils::getCropS3D<CHAN>(d, _dim, mM3Dfmt)){ 33029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("M3DPrimaryPipe setCrop failed to getCropS3D"); 33129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed _dim = d; 33229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 33329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.setCrop(_dim); 33429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 33529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 33629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DPrimaryPipe<CHAN>::start(const utils::PipeArgs& args) { 33729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!mM3d.start(args)) { 33829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("M3DPrimaryPipe start failed"); 33929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 34029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 34129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return true; 34229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 34329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 34429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DPrimaryPipe<CHAN>::setPosition(const utils::Dim& d) { 34529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.setPosition(d); 34629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 34729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 34829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DPrimaryPipe<CHAN>::setParameter(const utils::Params& param) { 34929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.setParameter(param); 35029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 35129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 35229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool M3DPrimaryPipe<CHAN>::setSource(const utils::PipeArgs& args) 35329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed{ 35429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // extract 3D fmt 35529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mM3Dfmt = utils::format3DInput(utils::getS3DFormat(args.whf.format)) | 35629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::HAL_3D_OUT_MONOS_MASK; 35729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if (mM3d.isClosed()) { 35829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if (!this->start(args)) { 35929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("M3DPrimaryPipe setSource failed to start"); 36029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 36129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 36229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 36329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.setSource(args); 36429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 36529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 36629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline const utils::PipeArgs& M3DPrimaryPipe<CHAN>::getArgs() const { 36729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mM3d.getArgs(); 36829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 36929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 37029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline utils::eOverlayPipeType M3DPrimaryPipe<CHAN>::getOvPipeType() const { 37129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return utils::OV_PIPE_TYPE_M3D_PRIMARY; 37229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 37329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 37429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline void M3DPrimaryPipe<CHAN>::dump() const { 37529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("M3DPrimaryPipe Pipe fmt=%d", mM3Dfmt); 37629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mM3d.dump(); 37729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 37829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 37929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed///////////// S3DExt Pipe //////////////////////////////// 38029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 38129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline S3DExtPipe<CHAN>::S3DExtPipe() : mS3Dfmt(0) {} 38229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 38329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline S3DExtPipe<CHAN>::~S3DExtPipe() { close(); } 38429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 38529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DExtPipe<CHAN>::open(RotatorBase* rot) { 38629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE_IF(DEBUG_OVERLAY, "S3DExtPipe open"); 38729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!mS3d.open(rot)) { 38829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("3Dpipe failed to open"); 38929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 39029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 39129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return true; 39229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 39329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 39429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DExtPipe<CHAN>::close() { 39529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!utils::send3DInfoPacket(0)) { 39629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DExtPipe close failed send3D info packet"); 39729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 39829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.close(); 39929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 40029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 40129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DExtPipe<CHAN>::commit() { return mS3d.commit(); } 40229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 40329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline void S3DExtPipe<CHAN>::setId(int id) { mS3d.setId(id); } 40429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 40529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline void S3DExtPipe<CHAN>::setMemoryId(int id) { mS3d.setMemoryId(id); } 40629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 40729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DExtPipe<CHAN>::queueBuffer(uint32_t offset) { 40829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed //this->dump(); 40929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.queueBuffer(offset); } 41029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 41129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DExtPipe<CHAN>::dequeueBuffer(void*& buf) { 41229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.dequeueBuffer(buf); } 41329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 41429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DExtPipe<CHAN>::waitForVsync() { 41529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.waitForVsync(); } 41629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 41729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DExtPipe<CHAN>::setCrop(const utils::Dim& d) { 41829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::Dim _dim; 41929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!utils::getCropS3D<CHAN>(d, _dim, mS3Dfmt)){ 42029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DExtPipe setCrop failed to getCropS3D"); 42129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed _dim = d; 42229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 42329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.setCrop(_dim); 42429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 42529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 42629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DExtPipe<CHAN>::start(const utils::PipeArgs& args) { 42729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed OVASSERT(mS3Dfmt, "S3DExtPipe mS3Dfmt should not be 0 here"); 42829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!mS3d.start(args)) { 42929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DExtPipe start failed"); 43029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 43129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 43229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed uint32_t fmt = mS3Dfmt & utils::OUTPUT_3D_MASK; 43329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!utils::send3DInfoPacket(fmt)){ 43429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("Error S3DExtPipe start error send3DInfoPacket %d", fmt); 43529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 43629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 43729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return true; 43829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 43929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 44029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DExtPipe<CHAN>::setPosition(const utils::Dim& d) 44129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed{ 44229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::Dim _dim; 44329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::Whf _whf(mS3d.getScreenInfo().mFBWidth, 44429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mS3d.getScreenInfo().mFBHeight, 44529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mS3Dfmt); 44629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!utils::getPositionS3D<CHAN>(_whf, _dim)) { 44729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DExtPipe setPosition err in getPositionS3D"); 44829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed _dim = d; 44929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 45029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.setPosition(_dim); 45129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 45229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 45329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DExtPipe<CHAN>::setParameter(const utils::Params& param) { 45429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.setParameter(param); 45529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 45629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 45729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DExtPipe<CHAN>::setSource(const utils::PipeArgs& args) { 45829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mS3Dfmt = utils::getS3DFormat(args.whf.format); 45929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(mS3d.isClosed()){ 46029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!this->start(args)) { 46129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DExtPipe setSource failed to start"); 46229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 46329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 46429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 46529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.setSource(args); 46629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 46729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 46829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline const utils::PipeArgs& S3DExtPipe<CHAN>::getArgs() const { 46929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.getArgs(); 47029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 47129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 47229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline utils::eOverlayPipeType S3DExtPipe<CHAN>::getOvPipeType() const { 47329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return utils::OV_PIPE_TYPE_S3D_EXTERNAL; 47429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 47529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 47629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline void S3DExtPipe<CHAN>::dump() const { 47729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DExtPipe Pipe fmt=%d", mS3Dfmt); 47829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mS3d.dump(); 47929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 48029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 48129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed///////////// S3DPrimary Pipe //////////////////////////// 48229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 48329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline S3DPrimaryPipe<CHAN>::S3DPrimaryPipe() : mS3Dfmt(0) {} 48429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 48529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline S3DPrimaryPipe<CHAN>::~S3DPrimaryPipe() { close(); } 48629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 48729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DPrimaryPipe<CHAN>::open(RotatorBase* rot) { 48829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE_IF(DEBUG_OVERLAY, "S3DPrimaryPipe open"); 48929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!mS3d.open(rot)) { 49029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("3Dpipe failed to open"); 49129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 49229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 49329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // set the ctrl fd 49429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mCtrl3D.setFd(mS3d.getCtrlFd()); 49529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return true; 49629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 49729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 49829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DPrimaryPipe<CHAN>::close() { 49929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!utils::enableBarrier(0)) { 50029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DExtPipe close failed enable barrier"); 50129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 50229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mCtrl3D.close(); 50329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.close(); 50429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 50529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 50629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DPrimaryPipe<CHAN>::commit() { return mS3d.commit(); } 50729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 50829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline void S3DPrimaryPipe<CHAN>::setId(int id) { mS3d.setId(id); } 50929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 51029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline void S3DPrimaryPipe<CHAN>::setMemoryId(int id) { mS3d.setMemoryId(id); } 51129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 51229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DPrimaryPipe<CHAN>::queueBuffer(uint32_t offset) { 51329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.queueBuffer(offset); } 51429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 51529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DPrimaryPipe<CHAN>::dequeueBuffer(void*& buf) { 51629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.dequeueBuffer(buf); } 51729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 51829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DPrimaryPipe<CHAN>::waitForVsync() { 51929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.waitForVsync(); } 52029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 52129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DPrimaryPipe<CHAN>::setCrop(const utils::Dim& d) { 52229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::Dim _dim; 52329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!utils::getCropS3D<CHAN>(d, _dim, mS3Dfmt)){ 52429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DPrimaryPipe setCrop failed to getCropS3D"); 52529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed _dim = d; 52629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 52729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.setCrop(_dim); 52829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 52929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 53029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DPrimaryPipe<CHAN>::start(const utils::PipeArgs& args) { 53129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!mS3d.start(args)) { 53229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DPrimaryPipe start failed"); 53329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 53429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 53529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return true; 53629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 53729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 53829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DPrimaryPipe<CHAN>::setPosition(const utils::Dim& d) 53929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed{ 54029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::Whf fbwhf(mS3d.getScreenInfo().mFBWidth, 54129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mS3d.getScreenInfo().mFBHeight, 54229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 0 /* fmt dont care*/); 54329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mCtrl3D.setWh(fbwhf); 54429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!mCtrl3D.useVirtualFB()) { 54529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("Failed to use VFB on %d (non fatal)", utils::FB0); 54629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 54729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 54829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::Dim _dim; 54929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // original setPositionHandleState has getPositionS3D(...,true) 55029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // which means format is HAL_3D_OUT_SBS_MASK 55129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // HAL_3D_OUT_SBS_MASK is 0x1000 >> 12 == 0x1 as the orig 55229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed // code suggets 55329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed utils::Whf _whf(d.w, d.h, utils::HAL_3D_OUT_SBS_MASK); 55429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!utils::getPositionS3D<CHAN>(_whf, _dim)) { 55529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DPrimaryPipe setPosition err in getPositionS3D"); 55629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed _dim = d; 55729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 55829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.setPosition(_dim); 55929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 56029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 56129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed/* for S3DPrimaryPipe, we need to have barriers once 56229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* So the easiest way to achieve it, is to make sure FB0 is having it before 56329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed* setParam is running */ 56429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <> 56529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DPrimaryPipe<utils::OV_PIPE0>::setParameter( 56629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed const utils::Params& param) { 56729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(utils::OVERLAY_TRANSFORM == param.param){ 56829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed uint32_t barrier=0; 56929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed switch(param.value) { 57029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed case HAL_TRANSFORM_ROT_90: 57129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed case HAL_TRANSFORM_ROT_270: 57229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed barrier = utils::BARRIER_LAND; 57329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed break; 57429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed default: 57529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed barrier = utils::BARRIER_PORT; 57629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed break; 57729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 57829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!utils::enableBarrier(barrier)) { 57929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DPrimaryPipe setParameter failed to enable barrier"); 58029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 58129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 58229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.setParameter(param); 58329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 58429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 58529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 58629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DPrimaryPipe<CHAN>::setParameter(const utils::Params& param) { 58729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.setParameter(param); 58829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 58929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 59029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline bool S3DPrimaryPipe<CHAN>::setSource(const utils::PipeArgs& args) 59129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed{ 59229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mS3Dfmt = utils::getS3DFormat(args.whf.format); 59329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(mS3d.isClosed()){ 59429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed if(!this->start(args)) { 59529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DPrimaryPipe setSource failed to start"); 59629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return false; 59729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 59829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed } 59929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.setSource(args); 60029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 60129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 60229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline const utils::PipeArgs& S3DPrimaryPipe<CHAN>::getArgs() const { 60329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return mS3d.getArgs(); 60429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 60529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 60629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline utils::eOverlayPipeType S3DPrimaryPipe<CHAN>::getOvPipeType() const { 60729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed return utils::OV_PIPE_TYPE_S3D_PRIMARY; 60829a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 60929a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedtemplate <int CHAN> 61029a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmedinline void S3DPrimaryPipe<CHAN>::dump() const { 61129a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed ALOGE("S3DPrimaryPipe Pipe fmt=%d", mS3Dfmt); 61229a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed mS3d.dump(); 61329a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} 61429a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 61529a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed} // overlay 61629a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed 61729a26818d7294055539167b2fbfdaa168bcf725cNaseer Ahmed#endif // OVERLAY_M3D_EXT_PIPE_H 618