liboverlay: Remove waitForVsync, getOvPipeType APIs
Remove waitForVsync support.
Vsync will be done explicitly by clients outside of overlay.
Remove support for the unused getOvPipeType API.
Remove redundant state checks in class Overlay
Change-Id: I8b35d7868bb46b0be755833dc8f28a158d3ff104
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
diff --git a/libhwcomposer/hwc_extonly.cpp b/libhwcomposer/hwc_extonly.cpp
index 77a96b6..6793760 100644
--- a/libhwcomposer/hwc_extonly.cpp
+++ b/libhwcomposer/hwc_extonly.cpp
@@ -143,11 +143,6 @@
ALOGE("%s: queueBuffer failed for external", __FUNCTION__);
ret = false;
}
- // Wait for external vsync to be done
- if (!ov.waitForVsync(ovutils::OV_PIPE0)) {
- ALOGE("%s: waitForVsync failed for external", __FUNCTION__);
- ret = false;
- }
break;
default:
ALOGE("%s Unused state %s", __FUNCTION__,
diff --git a/libhwcomposer/hwc_video.cpp b/libhwcomposer/hwc_video.cpp
index 2f4d096..4e7bc5f 100644
--- a/libhwcomposer/hwc_video.cpp
+++ b/libhwcomposer/hwc_video.cpp
@@ -347,11 +347,6 @@
ALOGE("%s: queueBuffer failed for primary", __FUNCTION__);
ret = false;
}
- // Wait for external vsync to be done
- if (!ov.waitForVsync(ovutils::OV_PIPE1)) {
- ALOGE("%s: waitForVsync failed for external", __FUNCTION__);
- ret = false;
- }
break;
case ovutils::OV_2D_VIDEO_ON_PANEL:
// Play primary
@@ -372,11 +367,6 @@
ALOGE("%s: queueBuffer failed for cc external", __FUNCTION__);
ret = false;
}
- // Wait for external vsync to be done
- if (!ov.waitForVsync(ovutils::OV_PIPE1)) {
- ALOGE("%s: waitForVsync failed for external", __FUNCTION__);
- ret = false;
- }
break;
default:
ALOGE("%s Unused state %s", __FUNCTION__,
diff --git a/liboverlay/mdpWrapper.h b/liboverlay/mdpWrapper.h
index 8c5f624..b1eb76c 100644
--- a/liboverlay/mdpWrapper.h
+++ b/liboverlay/mdpWrapper.h
@@ -75,9 +75,6 @@
/* MSMFB_OVERLAY_PLAY */
bool play(int fd, msmfb_overlay_data& od);
-/* MSMFB_OVERLAY_PLAY_WAIT */
-bool waitForVsync(int fd, msmfb_overlay_data& od);
-
/* MSMFB_OVERLAY_3D */
bool set3D(int fd, msmfb_overlay_3d& ov);
@@ -191,15 +188,6 @@
return true;
}
-inline bool waitForVsync(int fd, msmfb_overlay_data& od) {
- if (ioctl(fd, MSMFB_OVERLAY_PLAY_WAIT, &od) < 0) {
- ALOGE("Failed to call ioctl MSMFB_OVERLAY_PLAY_WAIT err=%s",
- strerror(errno));
- return false;
- }
- return true;
-}
-
inline bool set3D(int fd, msmfb_overlay_3d& ov) {
if (ioctl(fd, MSMFB_OVERLAY_3D, &ov) < 0) {
ALOGE("Failed to call ioctl MSMFB_OVERLAY_3D err=%s",
diff --git a/liboverlay/overlay.cpp b/liboverlay/overlay.cpp
index 4dea6ef..3fdb7c4 100644
--- a/liboverlay/overlay.cpp
+++ b/liboverlay/overlay.cpp
@@ -36,6 +36,35 @@
namespace overlay {
+//Helper
+bool isStateValid(const utils::eOverlayState& st) {
+ switch (st) {
+ case utils::OV_CLOSED:
+ ALOGE("Overlay %s failed, state is OV_CLOSED; set state first",
+ __FUNCTION__);
+ return false;
+ break;
+ case utils::OV_2D_VIDEO_ON_PANEL:
+ case utils::OV_2D_VIDEO_ON_PANEL_TV:
+ case utils::OV_2D_VIDEO_ON_TV:
+ case utils::OV_3D_VIDEO_ON_2D_PANEL:
+ case utils::OV_3D_VIDEO_ON_3D_PANEL:
+ case utils::OV_3D_VIDEO_ON_3D_TV:
+ case utils::OV_3D_VIDEO_ON_2D_PANEL_2D_TV:
+ case utils::OV_UI_MIRROR:
+ case utils::OV_2D_TRUE_UI_MIRROR:
+ case utils::OV_BYPASS_1_LAYER:
+ case utils::OV_BYPASS_2_LAYER:
+ case utils::OV_BYPASS_3_LAYER:
+ case utils::OV_DUAL_DISP:
+ break;
+ default:
+ OVASSERT(false, "%s Unknown state %d", __FUNCTION__, st);
+ return false;
+ }
+ return true;
+}
+
Overlay::Overlay(): mOv(0) {
}
@@ -51,28 +80,11 @@
"%s Overlay and Rotator should be init at this point",
__FUNCTION__);
utils::eOverlayState st = mState.state();
- switch (st) {
- case utils::OV_2D_VIDEO_ON_PANEL:
- case utils::OV_2D_VIDEO_ON_PANEL_TV:
- case utils::OV_2D_VIDEO_ON_TV:
- case utils::OV_3D_VIDEO_ON_2D_PANEL:
- case utils::OV_3D_VIDEO_ON_3D_PANEL:
- case utils::OV_3D_VIDEO_ON_3D_TV:
- case utils::OV_3D_VIDEO_ON_2D_PANEL_2D_TV:
- case utils::OV_UI_MIRROR:
- case utils::OV_2D_TRUE_UI_MIRROR:
- case utils::OV_BYPASS_1_LAYER:
- case utils::OV_BYPASS_2_LAYER:
- case utils::OV_BYPASS_3_LAYER:
- case utils::OV_DUAL_DISP:
- if(!mOv->commit(dest)) {
- ALOGE("Overlay %s failed", __FUNCTION__);
- return false;
- }
- break;
- default:
- OVASSERT(false, "%s Unknown state %d", __FUNCTION__, st);
+ if(isStateValid(st)) {
+ if(!mOv->commit(dest)) {
+ ALOGE("Overlay %s failed", __FUNCTION__);
return false;
+ }
}
return true;
}
@@ -84,60 +96,11 @@
"%s Overlay and Rotator should be init at this point",
__FUNCTION__);
utils::eOverlayState st = mState.state();
- switch (st) {
- case utils::OV_2D_VIDEO_ON_PANEL:
- case utils::OV_2D_VIDEO_ON_PANEL_TV:
- case utils::OV_2D_VIDEO_ON_TV:
- case utils::OV_3D_VIDEO_ON_2D_PANEL:
- case utils::OV_3D_VIDEO_ON_3D_PANEL:
- case utils::OV_3D_VIDEO_ON_3D_TV:
- case utils::OV_3D_VIDEO_ON_2D_PANEL_2D_TV:
- case utils::OV_UI_MIRROR:
- case utils::OV_2D_TRUE_UI_MIRROR:
- case utils::OV_BYPASS_1_LAYER:
- case utils::OV_BYPASS_2_LAYER:
- case utils::OV_BYPASS_3_LAYER:
- case utils::OV_DUAL_DISP:
- if(!mOv->queueBuffer(fd, offset, dest)) {
- ALOGE("Overlay %s failed", __FUNCTION__);
- return false;
- }
- break;
- default:
- OVASSERT(false, "%s Unknown state %d", __FUNCTION__, st);
+ if(isStateValid(st)) {
+ if(!mOv->queueBuffer(fd, offset, dest)) {
+ ALOGE("Overlay %s failed", __FUNCTION__);
return false;
- }
- return true;
-}
-
-bool Overlay::waitForVsync(utils::eDest dest)
-{
- OVASSERT(mOv,
- "%s Overlay and Rotator should be init at this point",
- __FUNCTION__);
- utils::eOverlayState st = mState.state();
- switch (st) {
- case utils::OV_2D_VIDEO_ON_PANEL:
- case utils::OV_2D_VIDEO_ON_PANEL_TV:
- case utils::OV_2D_VIDEO_ON_TV:
- case utils::OV_3D_VIDEO_ON_2D_PANEL:
- case utils::OV_3D_VIDEO_ON_3D_PANEL:
- case utils::OV_3D_VIDEO_ON_3D_TV:
- case utils::OV_3D_VIDEO_ON_2D_PANEL_2D_TV:
- case utils::OV_UI_MIRROR:
- case utils::OV_2D_TRUE_UI_MIRROR:
- case utils::OV_BYPASS_1_LAYER:
- case utils::OV_BYPASS_2_LAYER:
- case utils::OV_BYPASS_3_LAYER:
- case utils::OV_DUAL_DISP:
- if(!mOv->waitForVsync(dest)) {
- ALOGE("Overlay %s failed", __FUNCTION__);
- return false;
- }
- break;
- default:
- OVASSERT(false, "%s Unknown state %d", __FUNCTION__, st);
- return false;
+ }
}
return true;
}
@@ -149,28 +112,11 @@
"%s Overlay and Rotator should be init at this point",
__FUNCTION__);
utils::eOverlayState st = mState.state();
- switch (st) {
- case utils::OV_2D_VIDEO_ON_PANEL:
- case utils::OV_2D_VIDEO_ON_PANEL_TV:
- case utils::OV_2D_VIDEO_ON_TV:
- case utils::OV_3D_VIDEO_ON_2D_PANEL:
- case utils::OV_3D_VIDEO_ON_3D_PANEL:
- case utils::OV_3D_VIDEO_ON_3D_TV:
- case utils::OV_3D_VIDEO_ON_2D_PANEL_2D_TV:
- case utils::OV_UI_MIRROR:
- case utils::OV_2D_TRUE_UI_MIRROR:
- case utils::OV_BYPASS_1_LAYER:
- case utils::OV_BYPASS_2_LAYER:
- case utils::OV_BYPASS_3_LAYER:
- case utils::OV_DUAL_DISP:
- if(!mOv->setCrop(d, dest)) {
- ALOGE("Overlay %s failed", __FUNCTION__);
- return false;
- }
- break;
- default:
- OVASSERT(false, "%s Unknown state %d", __FUNCTION__, st);
+ if(isStateValid(st)) {
+ if(!mOv->setCrop(d, dest)) {
+ ALOGE("Overlay %s failed", __FUNCTION__);
return false;
+ }
}
return true;
}
@@ -181,28 +127,11 @@
"%s Overlay and Rotator should be init at this point",
__FUNCTION__);
utils::eOverlayState st = mState.state();
- switch (st) {
- case utils::OV_2D_VIDEO_ON_PANEL:
- case utils::OV_2D_VIDEO_ON_PANEL_TV:
- case utils::OV_2D_VIDEO_ON_TV:
- case utils::OV_3D_VIDEO_ON_2D_PANEL:
- case utils::OV_3D_VIDEO_ON_3D_PANEL:
- case utils::OV_3D_VIDEO_ON_3D_TV:
- case utils::OV_3D_VIDEO_ON_2D_PANEL_2D_TV:
- case utils::OV_UI_MIRROR:
- case utils::OV_2D_TRUE_UI_MIRROR:
- case utils::OV_BYPASS_1_LAYER:
- case utils::OV_BYPASS_2_LAYER:
- case utils::OV_BYPASS_3_LAYER:
- case utils::OV_DUAL_DISP:
- if(!mOv->setPosition(d, dest)) {
- ALOGE("Overlay %s failed", __FUNCTION__);
- return false;
- }
- break;
- default:
- OVASSERT(false, "setPos Unknown state %d", st);
+ if(isStateValid(st)) {
+ if(!mOv->setPosition(d, dest)) {
+ ALOGE("Overlay %s failed", __FUNCTION__);
return false;
+ }
}
return true;
}
@@ -214,28 +143,11 @@
static_cast<utils::eTransform>(orient);
utils::eOverlayState st = mState.state();
- switch (st) {
- case utils::OV_2D_VIDEO_ON_PANEL:
- case utils::OV_2D_VIDEO_ON_PANEL_TV:
- case utils::OV_2D_VIDEO_ON_TV:
- case utils::OV_3D_VIDEO_ON_2D_PANEL:
- case utils::OV_3D_VIDEO_ON_3D_PANEL:
- case utils::OV_3D_VIDEO_ON_3D_TV:
- case utils::OV_3D_VIDEO_ON_2D_PANEL_2D_TV:
- case utils::OV_UI_MIRROR:
- case utils::OV_2D_TRUE_UI_MIRROR:
- case utils::OV_BYPASS_1_LAYER:
- case utils::OV_BYPASS_2_LAYER:
- case utils::OV_BYPASS_3_LAYER:
- case utils::OV_DUAL_DISP:
- if(!mOv->setTransform(transform, dest)) {
- ALOGE("Overlay %s failed", __FUNCTION__);
- return false;
- }
- break;
- default:
- OVASSERT(false, "%s Unknown state %d", __FUNCTION__ , st);
+ if(isStateValid(st)) {
+ if(!mOv->setTransform(transform, dest)) {
+ ALOGE("Overlay %s failed", __FUNCTION__);
return false;
+ }
}
return true;
}
@@ -247,40 +159,12 @@
args[0], args[1], args[2] };
utils::eOverlayState st = mState.state();
- switch (st) {
- case utils::OV_CLOSED:
- ALOGE("Overlay %s failed, state is OV_CLOSED, set state first",
- __FUNCTION__);
+ if(isStateValid(st)) {
+ if (!mOv->setSource(margs, dest)) {
+ ALOGE("Overlay %s failed", __FUNCTION__);
return false;
- break;
- case utils::OV_2D_VIDEO_ON_PANEL:
- case utils::OV_3D_VIDEO_ON_2D_PANEL:
- case utils::OV_UI_MIRROR:
- case utils::OV_BYPASS_1_LAYER:
- case utils::OV_BYPASS_2_LAYER:
- case utils::OV_BYPASS_3_LAYER:
- case utils::OV_DUAL_DISP:
- break;
- case utils::OV_3D_VIDEO_ON_3D_PANEL:
- case utils::OV_3D_VIDEO_ON_3D_TV:
- //TODO set zorder for channel 1 as 1 in 3D pipe
- case utils::OV_2D_VIDEO_ON_PANEL_TV:
- case utils::OV_2D_VIDEO_ON_TV:
- case utils::OV_3D_VIDEO_ON_2D_PANEL_2D_TV:
- break;
- case utils::OV_2D_TRUE_UI_MIRROR:
- // TODO Set zorder, external VG pipe (video) gets 0, RGB pipe (UI) gets 1
- break;
- default:
- OVASSERT(false, "%s Unknown state %d", __FUNCTION__, st);
- return false;
+ }
}
-
- if (!mOv->setSource(margs, dest)) {
- ALOGE("Overlay %s failed", __FUNCTION__);
- return false;
- }
-
return true;
}
diff --git a/liboverlay/overlay.h b/liboverlay/overlay.h
index b3324eb..12b3883 100644
--- a/liboverlay/overlay.h
+++ b/liboverlay/overlay.h
@@ -57,7 +57,6 @@
bool queueBuffer(int fd, uint32_t offset,
utils::eDest dest = utils::OV_PIPE_ALL);
- bool waitForVsync(utils::eDest dest = utils::OV_PIPE1);
void dump() const;
diff --git a/liboverlay/overlayCtrlData.h b/liboverlay/overlayCtrlData.h
index 1398ec4..3c7eb42 100644
--- a/liboverlay/overlayCtrlData.h
+++ b/liboverlay/overlayCtrlData.h
@@ -119,9 +119,6 @@
/* queue buffer to the overlay */
bool queueBuffer(int fd, uint32_t offset);
- /* wait for vsync to be done */
- bool waitForVsync();
-
/* sump the state of the obj */
void dump() const;
@@ -218,15 +215,6 @@
return mMdp.play(fd, offset);
}
-inline bool Data::waitForVsync() {
- // Call mdp waitForVsync
- if(!mMdp.waitForVsync()){
- ALOGE("Error in MDP %s", __FUNCTION__);
- return false;
- }
- return true;
-}
-
inline void Data::dump() const {
ALOGE("== Dump Data MDP start ==");
mMdp.dump();
diff --git a/liboverlay/overlayImpl.h b/liboverlay/overlayImpl.h
index 6f950c0..1d22694 100644
--- a/liboverlay/overlayImpl.h
+++ b/liboverlay/overlayImpl.h
@@ -72,9 +72,6 @@
virtual bool queueBuffer(int fd, uint32_t offset,
utils::eDest dest = utils::OV_PIPE_ALL) = 0;
- /* Wait for vsync to be done on dest */
- virtual bool waitForVsync(utils::eDest dest = utils::OV_PIPE1) = 0;
-
/* Crop existing destination using Dim coordinates */
virtual bool setCrop(const utils::Dim& d,
utils::eDest dest = utils::OV_PIPE_ALL) = 0;
@@ -92,9 +89,6 @@
virtual bool setSource(const utils::PipeArgs[utils::MAX_PIPES],
utils::eDest dest = utils::OV_PIPE_ALL) = 0;
- /* Get the overlay pipe type */
- virtual utils::eOverlayPipeType getOvPipeType(utils::eDest dest) const = 0;
-
/* Dump underlying state */
virtual void dump() const = 0;
};
@@ -110,11 +104,6 @@
bool setTransform(const utils::eTransform& param) { return true; }
bool setSource(const utils::PipeArgs& args) { return true; }
bool queueBuffer(int fd, uint32_t offset) { return true; }
- bool waitForVsync() { return true; }
- // NullPipe will return by val here as opposed to other Pipes.
- utils::eOverlayPipeType getOvPipeType() const {
- return utils::OV_PIPE_TYPE_NULL;
- }
void dump() const {}
};
@@ -157,8 +146,6 @@
utils::eDest dest = utils::OV_PIPE_ALL);
virtual bool queueBuffer(int fd, uint32_t offset,
utils::eDest dest = utils::OV_PIPE_ALL);
- virtual bool waitForVsync(utils::eDest dest = utils::OV_PIPE1);
- virtual utils::eOverlayPipeType getOvPipeType(utils::eDest dest) const;
virtual void dump() const;
private:
@@ -616,63 +603,6 @@
}
template <class P0, class P1, class P2>
-bool OverlayImpl<P0, P1, P2>::waitForVsync(utils::eDest dest)
-{
- OVASSERT(mPipe0 && mPipe1 && mPipe2,
- "%s: Pipes are null p0=%p p1=%p p2=%p",
- __FUNCTION__, mPipe0, mPipe1, mPipe2);
-
- if (utils::OV_PIPE0 & dest) {
- if(!mPipe0->waitForVsync()) {
- ALOGE("OverlayImpl p0 failed to waitForVsync");
- return false;
- }
- }
-
- if (utils::OV_PIPE1 & dest) {
- if(!mPipe1->waitForVsync()) {
- ALOGE("OverlayImpl p1 failed to waitForVsync");
- return false;
- }
- }
-
- if (utils::OV_PIPE2 & dest) {
- if(!mPipe2->waitForVsync()) {
- ALOGE("OverlayImpl p2 failed to waitForVsync");
- return false;
- }
- }
-
- return true;
-}
-
-template <class P0, class P1, class P2>
-utils::eOverlayPipeType OverlayImpl<P0, P1, P2>::getOvPipeType(
- utils::eDest dest) const
-{
- OVASSERT(utils::isValidDest(dest), "%s: OverlayImpl invalid dest=%d",
- __FUNCTION__, dest);
-
- if (utils::OV_PIPE0 & dest) {
- OVASSERT(mPipe0, "%s: OverlayImpl pipe0 is null", __FUNCTION__);
- return mPipe0->getOvPipeType();
- }
-
- if (utils::OV_PIPE1 & dest) {
- OVASSERT(mPipe1, "%s: OverlayImpl pipe1 is null", __FUNCTION__);
- return mPipe1->getOvPipeType();
- }
-
- if (utils::OV_PIPE2 & dest) {
- OVASSERT(mPipe2, "%s: OverlayImpl pipe2 is null", __FUNCTION__);
- return mPipe2->getOvPipeType();
- }
-
- // Should never get here
- return utils::OV_PIPE_TYPE_NULL;
-}
-
-template <class P0, class P1, class P2>
void OverlayImpl<P0, P1, P2>::dump() const
{
OVASSERT(mPipe0 && mPipe1 && mPipe2,
diff --git a/liboverlay/overlayMdp.h b/liboverlay/overlayMdp.h
index 30bda79..1ccd64b 100644
--- a/liboverlay/overlayMdp.h
+++ b/liboverlay/overlayMdp.h
@@ -221,9 +221,6 @@
/* calls wrapper play */
bool play(int fd, uint32_t offset);
- /* calls wrapper waitForVsync */
- bool waitForVsync();
-
/* dump state of the object */
void dump() const;
private:
@@ -493,15 +490,6 @@
return true;
}
-inline bool MdpData::waitForVsync() {
- if(!mdp_wrapper::waitForVsync(mFd.getFD(), mOvData)){
- ALOGE("%s failed", __FUNCTION__);
- dump();
- return false;
- }
- return true;
-}
-
} // overlay
#endif // OVERLAY_MDP_H
diff --git a/liboverlay/overlayUtils.h b/liboverlay/overlayUtils.h
index f070bd1..a09010c 100644
--- a/liboverlay/overlayUtils.h
+++ b/liboverlay/overlayUtils.h
@@ -268,25 +268,11 @@
OV_MDP_FLAGS_NONE = 0,
OV_MDP_PIPE_SHARE = MDP_OV_PIPE_SHARE,
OV_MDP_DEINTERLACE = MDP_DEINTERLACE,
- OV_MDP_PLAY_NOWAIT = MDP_OV_PLAY_NOWAIT, //deprecated
OV_MDP_SECURE_OVERLAY_SESSION = MDP_SECURE_OVERLAY_SESSION,
OV_MDP_SOURCE_ROTATED_90 = MDP_SOURCE_ROTATED_90,
OV_MDP_MEMORY_ID_TYPE_FB = MDP_MEMORY_ID_TYPE_FB,
};
-enum eOverlayPipeType {
- OV_PIPE_TYPE_NULL,
- OV_PIPE_TYPE_BYPASS,
- OV_PIPE_TYPE_GENERIC,
- OV_PIPE_TYPE_VIDEO_EXT,
- OV_PIPE_TYPE_M3D_EXTERNAL,
- OV_PIPE_TYPE_M3D_PRIMARY,
- OV_PIPE_TYPE_RGB,
- OV_PIPE_TYPE_S3D_EXTERNAL,
- OV_PIPE_TYPE_S3D_PRIMARY,
- OV_PIPE_TYPE_UI_MIRROR
-};
-
enum eZorder {
ZORDER_0,
ZORDER_1,
diff --git a/liboverlay/pipes/overlay3DPipe.h b/liboverlay/pipes/overlay3DPipe.h
index 86ebed7..aaff336 100644
--- a/liboverlay/pipes/overlay3DPipe.h
+++ b/liboverlay/pipes/overlay3DPipe.h
@@ -54,12 +54,10 @@
bool close();
bool commit();
bool queueBuffer(int fd, uint32_t offset);
- bool waitForVsync();
bool setCrop(const utils::Dim& d);
bool setPosition(const utils::Dim& dim);
bool setTransform(const utils::eTransform& param);
bool setSource(const utils::PipeArgs& args);
- utils::eOverlayPipeType getOvPipeType() const;
void dump() const;
private:
overlay::GenericPipe<utils::EXTERNAL> mM3d;
@@ -86,12 +84,10 @@
bool close();
bool commit();
bool queueBuffer(int fd, uint32_t offset);
- bool waitForVsync();
bool setCrop(const utils::Dim& d);
bool setPosition(const utils::Dim& dim);
bool setTransform(const utils::eTransform& param);
bool setSource(const utils::PipeArgs& args);
- utils::eOverlayPipeType getOvPipeType() const;
void dump() const;
private:
overlay::GenericPipe<utils::PRIMARY> mM3d;
@@ -118,12 +114,10 @@
bool close();
bool commit();
bool queueBuffer(int fd, uint32_t offset);
- bool waitForVsync();
bool setCrop(const utils::Dim& d);
bool setPosition(const utils::Dim& dim);
bool setTransform(const utils::eTransform& param);
bool setSource(const utils::PipeArgs& args);
- utils::eOverlayPipeType getOvPipeType() const;
void dump() const;
private:
overlay::GenericPipe<utils::EXTERNAL> mS3d;
@@ -150,12 +144,10 @@
bool close();
bool commit();
bool queueBuffer(int fd, uint32_t offset);
- bool waitForVsync();
bool setCrop(const utils::Dim& d);
bool setPosition(const utils::Dim& dim);
bool setTransform(const utils::eTransform& param);
bool setSource(const utils::PipeArgs& args);
- utils::eOverlayPipeType getOvPipeType() const;
void dump() const;
private:
/* needed for 3D related IOCTL */
@@ -196,9 +188,6 @@
return mM3d.queueBuffer(fd, offset);
}
template <int CHAN>
-inline bool M3DExtPipe<CHAN>::waitForVsync() {
- return mM3d.waitForVsync(); }
-template <int CHAN>
inline bool M3DExtPipe<CHAN>::setCrop(const utils::Dim& d) {
utils::Dim _dim;
if(!utils::getCropS3D<CHAN>(d, _dim, mM3Dfmt)){
@@ -237,10 +226,6 @@
return mM3d.setSource(args);
}
template <int CHAN>
-inline utils::eOverlayPipeType M3DExtPipe<CHAN>::getOvPipeType() const {
- return utils::OV_PIPE_TYPE_M3D_EXTERNAL;
-}
-template <int CHAN>
inline void M3DExtPipe<CHAN>::dump() const {
ALOGE("M3DExtPipe Pipe fmt=%d", mM3Dfmt);
mM3d.dump();
@@ -272,9 +257,6 @@
return mM3d.queueBuffer(fd, offset);
}
template <int CHAN>
-inline bool M3DPrimaryPipe<CHAN>::waitForVsync() {
- return mM3d.waitForVsync(); }
-template <int CHAN>
inline bool M3DPrimaryPipe<CHAN>::setCrop(const utils::Dim& d) {
utils::Dim _dim;
if(!utils::getCropS3D<CHAN>(d, _dim, mM3Dfmt)){
@@ -300,10 +282,6 @@
return mM3d.setSource(args);
}
template <int CHAN>
-inline utils::eOverlayPipeType M3DPrimaryPipe<CHAN>::getOvPipeType() const {
- return utils::OV_PIPE_TYPE_M3D_PRIMARY;
-}
-template <int CHAN>
inline void M3DPrimaryPipe<CHAN>::dump() const {
ALOGE("M3DPrimaryPipe Pipe fmt=%d", mM3Dfmt);
mM3d.dump();
@@ -337,9 +315,6 @@
return mS3d.queueBuffer(fd, offset);
}
template <int CHAN>
-inline bool S3DExtPipe<CHAN>::waitForVsync() {
- return mS3d.waitForVsync(); }
-template <int CHAN>
inline bool S3DExtPipe<CHAN>::setCrop(const utils::Dim& d) {
utils::Dim _dim;
if(!utils::getCropS3D<CHAN>(d, _dim, mS3Dfmt)){
@@ -371,10 +346,6 @@
return mS3d.setSource(args);
}
template <int CHAN>
-inline utils::eOverlayPipeType S3DExtPipe<CHAN>::getOvPipeType() const {
- return utils::OV_PIPE_TYPE_S3D_EXTERNAL;
-}
-template <int CHAN>
inline void S3DExtPipe<CHAN>::dump() const {
ALOGE("S3DExtPipe Pipe fmt=%d", mS3Dfmt);
mS3d.dump();
@@ -419,9 +390,6 @@
return mS3d.queueBuffer(fd, offset);
}
template <int CHAN>
-inline bool S3DPrimaryPipe<CHAN>::waitForVsync() {
- return mS3d.waitForVsync(); }
-template <int CHAN>
inline bool S3DPrimaryPipe<CHAN>::setCrop(const utils::Dim& d) {
utils::Dim _dim;
if(!utils::getCropS3D<CHAN>(d, _dim, mS3Dfmt)){
@@ -487,10 +455,6 @@
return mS3d.setSource(args);
}
template <int CHAN>
-inline utils::eOverlayPipeType S3DPrimaryPipe<CHAN>::getOvPipeType() const {
- return utils::OV_PIPE_TYPE_S3D_PRIMARY;
-}
-template <int CHAN>
inline void S3DPrimaryPipe<CHAN>::dump() const {
ALOGE("S3DPrimaryPipe Pipe fmt=%d", mS3Dfmt);
mS3d.dump();
diff --git a/liboverlay/pipes/overlayGenPipe.h b/liboverlay/pipes/overlayGenPipe.h
index c2d774b..cbcb05a 100644
--- a/liboverlay/pipes/overlayGenPipe.h
+++ b/liboverlay/pipes/overlayGenPipe.h
@@ -63,8 +63,6 @@
/* Data APIs */
/* queue buffer to the overlay */
bool queueBuffer(int fd, uint32_t offset);
- /* wait for vsync to be done */
- bool waitForVsync();
/* return cached startup args */
const utils::PipeArgs& getArgs() const;
@@ -90,9 +88,6 @@
/* return Ctrl fd. Used for S3D */
int getCtrlFd() const;
- /* Get the overlay pipe type */
- utils::eOverlayPipeType getOvPipeType() const;
-
/* dump the state of the object */
void dump() const;
private:
@@ -281,12 +276,6 @@
}
template <int PANEL>
-inline bool GenericPipe<PANEL>::waitForVsync() {
- OVASSERT(isOpen(), "State is closed, cannot waitForVsync");
- return mCtrlData.data.waitForVsync();
-}
-
-template <int PANEL>
inline utils::Dim GenericPipe<PANEL>::getAspectRatio(
const utils::Whf& whf) const
{
@@ -313,11 +302,6 @@
}
template <int PANEL>
-inline utils::eOverlayPipeType GenericPipe<PANEL>::getOvPipeType() const {
- return utils::OV_PIPE_TYPE_GENERIC;
-}
-
-template <int PANEL>
void GenericPipe<PANEL>::dump() const
{
ALOGE("== Dump Generic pipe start ==");
diff --git a/liboverlay/pipes/overlayUIMirrorPipe.h b/liboverlay/pipes/overlayUIMirrorPipe.h
index 1c22020..c2b73bd 100644
--- a/liboverlay/pipes/overlayUIMirrorPipe.h
+++ b/liboverlay/pipes/overlayUIMirrorPipe.h
@@ -50,12 +50,10 @@
bool close();
bool commit();
bool queueBuffer(int fd, uint32_t offset);
- bool waitForVsync();
bool setCrop(const utils::Dim& dim);
bool setPosition(const utils::Dim& dim);
bool setTransform(const utils::eTransform& param);
bool setSource(const utils::PipeArgs& args);
- utils::eOverlayPipeType getOvPipeType() const;
void dump() const;
private:
overlay::GenericPipe<ovutils::EXTERNAL> mUI;
@@ -79,8 +77,6 @@
inline bool UIMirrorPipe::queueBuffer(int fd, uint32_t offset) {
return mUI.queueBuffer(fd, offset);
}
-inline bool UIMirrorPipe::waitForVsync() {
- return mUI.waitForVsync(); }
inline bool UIMirrorPipe::setCrop(const utils::Dim& dim) {
return mUI.setCrop(dim); }
@@ -162,9 +158,6 @@
return mUI.setSource(arg);
}
-inline utils::eOverlayPipeType UIMirrorPipe::getOvPipeType() const {
- return utils::OV_PIPE_TYPE_UI_MIRROR;
-}
inline void UIMirrorPipe::dump() const {
ALOGE("UI Mirror Pipe");
mUI.dump();
diff --git a/liboverlay/pipes/overlayVideoExtPipe.h b/liboverlay/pipes/overlayVideoExtPipe.h
index 8196fe7..d4e1f3f 100644
--- a/liboverlay/pipes/overlayVideoExtPipe.h
+++ b/liboverlay/pipes/overlayVideoExtPipe.h
@@ -50,12 +50,10 @@
bool close();
bool commit();
bool queueBuffer(int fd, uint32_t offset);
- bool waitForVsync();
bool setCrop(const utils::Dim& dim);
bool setPosition(const utils::Dim& dim);
bool setTransform(const utils::eTransform& param);
bool setSource(const utils::PipeArgs& args);
- utils::eOverlayPipeType getOvPipeType() const;
void dump() const;
private:
overlay::GenericPipe<ovutils::EXTERNAL> mVideoExt;
@@ -74,9 +72,6 @@
inline bool VideoExtPipe::queueBuffer(int fd, uint32_t offset) {
return mVideoExt.queueBuffer(fd, offset);
}
-inline bool VideoExtPipe::waitForVsync() {
- return mVideoExt.waitForVsync();
-}
inline bool VideoExtPipe::setCrop(const utils::Dim& dim) {
return mVideoExt.setCrop(dim);
}
@@ -105,9 +100,6 @@
utils::PipeArgs arg(args);
return mVideoExt.setSource(arg);
}
-inline utils::eOverlayPipeType VideoExtPipe::getOvPipeType() const {
- return utils::OV_PIPE_TYPE_VIDEO_EXT;
-}
inline void VideoExtPipe::dump() const {
ALOGE("Video Ext Pipe");
mVideoExt.dump();