summaryrefslogtreecommitdiff
path: root/msm8226/liboverlay
diff options
context:
space:
mode:
authorNaseer Ahmed <naseer@codeaurora.org>2014-06-30 11:10:14 -0400
committerSimon Wilson <simonwilson@google.com>2015-01-09 14:18:06 -0800
commit8c05a30b5177ad3003dc8886dd012fac95657060 (patch)
treee0553cf42392ef34b5fbd8a9f37828999f76d775 /msm8226/liboverlay
parent88de95b6ca2d13053626e68181a3674ea2e416f6 (diff)
downloaddisplay-8c05a30b5177ad3003dc8886dd012fac95657060.tar.gz
overlay: Trace all MDP ioctls
Add trace points for all MDP ioctls so that they show up in systrace. Change-Id: I4425176c31934963a39b8f59a91f16535927d99d
Diffstat (limited to 'msm8226/liboverlay')
-rw-r--r--msm8226/liboverlay/mdpWrapper.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/msm8226/liboverlay/mdpWrapper.h b/msm8226/liboverlay/mdpWrapper.h
index 1bfa058f..1aada9e2 100644
--- a/msm8226/liboverlay/mdpWrapper.h
+++ b/msm8226/liboverlay/mdpWrapper.h
@@ -30,6 +30,8 @@
#ifndef MDP_WRAPPER_H
#define MDP_WRAPPER_H
+#define ATRACE_TAG (ATRACE_TAG_GRAPHICS | ATRACE_TAG_HAL)
+
/*
* In order to make overlay::mdp_wrapper shorter, please do something like:
* namespace mdpwrap = overlay::mdp_wrapper;
@@ -39,6 +41,7 @@
#include <linux/msm_rotator.h>
#include <sys/ioctl.h>
#include <utils/Log.h>
+#include <utils/Trace.h>
#include <errno.h>
#include "overlayUtils.h"
@@ -119,6 +122,7 @@ void dump(const char* const s, const fb_var_screeninfo& vinfo);
//---------------Inlines -------------------------------------
inline bool getFScreenInfo(int fd, fb_fix_screeninfo& finfo) {
+ ATRACE_CALL();
if (ioctl(fd, FBIOGET_FSCREENINFO, &finfo) < 0) {
ALOGE("Failed to call ioctl FBIOGET_FSCREENINFO err=%s",
strerror(errno));
@@ -128,6 +132,7 @@ inline bool getFScreenInfo(int fd, fb_fix_screeninfo& finfo) {
}
inline bool getVScreenInfo(int fd, fb_var_screeninfo& vinfo) {
+ ATRACE_CALL();
if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) < 0) {
ALOGE("Failed to call ioctl FBIOGET_VSCREENINFO err=%s",
strerror(errno));
@@ -137,6 +142,7 @@ inline bool getVScreenInfo(int fd, fb_var_screeninfo& vinfo) {
}
inline bool setVScreenInfo(int fd, fb_var_screeninfo& vinfo) {
+ ATRACE_CALL();
if (ioctl(fd, FBIOPUT_VSCREENINFO, &vinfo) < 0) {
ALOGE("Failed to call ioctl FBIOPUT_VSCREENINFO err=%s",
strerror(errno));
@@ -146,6 +152,7 @@ inline bool setVScreenInfo(int fd, fb_var_screeninfo& vinfo) {
}
inline bool startRotator(int fd, msm_rotator_img_info& rot) {
+ ATRACE_CALL();
if (ioctl(fd, MSM_ROTATOR_IOCTL_START, &rot) < 0){
ALOGE("Failed to call ioctl MSM_ROTATOR_IOCTL_START err=%s",
strerror(errno));
@@ -155,6 +162,7 @@ inline bool startRotator(int fd, msm_rotator_img_info& rot) {
}
inline bool rotate(int fd, msm_rotator_data_info& rot) {
+ ATRACE_CALL();
if (ioctl(fd, MSM_ROTATOR_IOCTL_ROTATE, &rot) < 0) {
ALOGE("Failed to call ioctl MSM_ROTATOR_IOCTL_ROTATE err=%s",
strerror(errno));
@@ -164,6 +172,7 @@ inline bool rotate(int fd, msm_rotator_data_info& rot) {
}
inline bool setOverlay(int fd, mdp_overlay& ov) {
+ ATRACE_CALL();
if (ioctl(fd, MSMFB_OVERLAY_SET, &ov) < 0) {
ALOGE("Failed to call ioctl MSMFB_OVERLAY_SET err=%s",
strerror(errno));
@@ -173,6 +182,7 @@ inline bool setOverlay(int fd, mdp_overlay& ov) {
}
inline bool validateAndSet(const int& fd, mdp_overlay_list& list) {
+ ATRACE_CALL();
if (ioctl(fd, MSMFB_OVERLAY_PREPARE, &list) < 0) {
ALOGD_IF(IOCTL_DEBUG, "Failed to call ioctl MSMFB_OVERLAY_PREPARE "
"err=%s", strerror(errno));
@@ -182,6 +192,7 @@ inline bool validateAndSet(const int& fd, mdp_overlay_list& list) {
}
inline bool endRotator(int fd, uint32_t sessionId) {
+ ATRACE_CALL();
if (ioctl(fd, MSM_ROTATOR_IOCTL_FINISH, &sessionId) < 0) {
ALOGE("Failed to call ioctl MSM_ROTATOR_IOCTL_FINISH err=%s",
strerror(errno));
@@ -191,6 +202,7 @@ inline bool endRotator(int fd, uint32_t sessionId) {
}
inline bool unsetOverlay(int fd, int ovId) {
+ ATRACE_CALL();
if (ioctl(fd, MSMFB_OVERLAY_UNSET, &ovId) < 0) {
ALOGE("Failed to call ioctl MSMFB_OVERLAY_UNSET err=%s",
strerror(errno));
@@ -200,6 +212,7 @@ inline bool unsetOverlay(int fd, int ovId) {
}
inline bool getOverlay(int fd, mdp_overlay& ov) {
+ ATRACE_CALL();
if (ioctl(fd, MSMFB_OVERLAY_GET, &ov) < 0) {
ALOGE("Failed to call ioctl MSMFB_OVERLAY_GET err=%s",
strerror(errno));
@@ -209,6 +222,7 @@ inline bool getOverlay(int fd, mdp_overlay& ov) {
}
inline bool play(int fd, msmfb_overlay_data& od) {
+ ATRACE_CALL();
if (ioctl(fd, MSMFB_OVERLAY_PLAY, &od) < 0) {
ALOGE("Failed to call ioctl MSMFB_OVERLAY_PLAY err=%s",
strerror(errno));
@@ -218,6 +232,7 @@ inline bool play(int fd, msmfb_overlay_data& od) {
}
inline bool set3D(int fd, msmfb_overlay_3d& ov) {
+ ATRACE_CALL();
if (ioctl(fd, MSMFB_OVERLAY_3D, &ov) < 0) {
ALOGE("Failed to call ioctl MSMFB_OVERLAY_3D err=%s",
strerror(errno));
@@ -227,6 +242,7 @@ inline bool set3D(int fd, msmfb_overlay_3d& ov) {
}
inline bool displayCommit(int fd, mdp_display_commit& info) {
+ ATRACE_CALL();
if(ioctl(fd, MSMFB_DISPLAY_COMMIT, &info) == -1) {
ALOGE("Failed to call ioctl MSMFB_DISPLAY_COMMIT err=%s",
strerror(errno));
@@ -236,6 +252,7 @@ inline bool displayCommit(int fd, mdp_display_commit& info) {
}
inline bool wbInitStart(int fbfd) {
+ ATRACE_CALL();
if(ioctl(fbfd, MSMFB_WRITEBACK_INIT, NULL) < 0) {
ALOGE("Failed to call ioctl MSMFB_WRITEBACK_INIT err=%s",
strerror(errno));
@@ -250,6 +267,7 @@ inline bool wbInitStart(int fbfd) {
}
inline bool wbStopTerminate(int fbfd) {
+ ATRACE_CALL();
if(ioctl(fbfd, MSMFB_WRITEBACK_STOP, NULL) < 0) {
ALOGE("Failed to call ioctl MSMFB_WRITEBACK_STOP err=%s",
strerror(errno));
@@ -264,6 +282,7 @@ inline bool wbStopTerminate(int fbfd) {
}
inline bool wbQueueBuffer(int fbfd, struct msmfb_data& fbData) {
+ ATRACE_CALL();
if(ioctl(fbfd, MSMFB_WRITEBACK_QUEUE_BUFFER, &fbData) < 0) {
ALOGE("Failed to call ioctl MSMFB_WRITEBACK_QUEUE_BUFFER err=%s",
strerror(errno));
@@ -273,6 +292,7 @@ inline bool wbQueueBuffer(int fbfd, struct msmfb_data& fbData) {
}
inline bool wbDequeueBuffer(int fbfd, struct msmfb_data& fbData) {
+ ATRACE_CALL();
if(ioctl(fbfd, MSMFB_WRITEBACK_DEQUEUE_BUFFER, &fbData) < 0) {
ALOGE("Failed to call ioctl MSMFB_WRITEBACK_DEQUEUE_BUFFER err=%s",
strerror(errno));