Change-Id: I5570a92b3c28671571d820719dfbb8fef6dfaa5b
struct xorg_list link;
} XDbgPageFlipInfo, *XDbgPageFlipInfoPtr;
struct xorg_list link;
} XDbgPageFlipInfo, *XDbgPageFlipInfoPtr;
+static int init_drmevent = 0;
static struct xorg_list vblank_event_list;
static struct xorg_list pageflip_event_list;
API void
xDbgLogDrmEventInit ()
{
static struct xorg_list vblank_event_list;
static struct xorg_list pageflip_event_list;
API void
xDbgLogDrmEventInit ()
{
xorg_list_init (&vblank_event_list);
xorg_list_init (&pageflip_event_list);
}
xorg_list_init (&vblank_event_list);
xorg_list_init (&pageflip_event_list);
}
-xDbgLogDrmEventPendingLists ( char *reply, int *remain)
+xDbgLogDrmEventPendingLists ( char *reply, int *len)
{
XDbgVblankInfoPtr vblank_ref = NULL;
XDbgVblankInfoPtr vblank_next = NULL;
{
XDbgVblankInfoPtr vblank_ref = NULL;
XDbgVblankInfoPtr vblank_next = NULL;
XDbgPageFlipInfoPtr flip_next = NULL;
Bool check_flip = FALSE;
Bool check_vblank = FALSE;
XDbgPageFlipInfoPtr flip_next = NULL;
Bool check_flip = FALSE;
Bool check_vblank = FALSE;
- char *p = reply;
- int len;
- len = snprintf (p, *remain, "[vblank event pending]\n");
- p += len;
- *remain -= len;
+ if (!init_drmevent)
+ {
+ XDBG_REPLY ("drmevent_pending is not supported.\n");
+ return;
+ }
+
+
+ XDBG_REPLY ("[vblank event pending]\n");
xorg_list_for_each_entry_safe (vblank_ref, vblank_next, &vblank_event_list, link)
{
check_vblank = TRUE;
if (vblank_ref->flag > -1)
{
xorg_list_for_each_entry_safe (vblank_ref, vblank_next, &vblank_event_list, link)
{
check_vblank = TRUE;
if (vblank_ref->flag > -1)
{
- len = snprintf (p, *remain, "req_time client_id draw_id crtc_pipe vblank_type\n");
- p += len;
- *remain -= len;
- len = snprintf (p, *remain, "[%10.3f] %5d 0x%x %5d %5d\n",
+ XDBG_REPLY ("req_time client_id draw_id crtc_pipe vblank_type\n");
+ XDBG_REPLY ("[%10.3f] %5d 0x%x %5d %5d\n",
(double)vblank_ref->time/1000.0,
(unsigned int)vblank_ref->client_idx,
(unsigned int)vblank_ref->draw_id, vblank_ref->crtc_pipe, vblank_ref->flag);
(double)vblank_ref->time/1000.0,
(unsigned int)vblank_ref->client_idx,
(unsigned int)vblank_ref->draw_id, vblank_ref->crtc_pipe, vblank_ref->flag);
- p += len;
- *remain -= len;
- len = snprintf (p, *remain, "req_time vblank_type\n");
- p += len;
- *remain -= len;
- len = snprintf (p, *remain, "[%10.3f] %d\n", (double)vblank_ref->time/1000.0, vblank_ref->flag);
- p += len;
- *remain -= len;
+ XDBG_REPLY ("req_time vblank_type\n");
+ XDBG_REPLY ("[%10.3f] %d\n", (double)vblank_ref->time/1000.0, vblank_ref->flag);
- {
- len = snprintf (p, *remain, "\t no pending events\n");
- p += len;
- *remain -= len;
- }
+ XDBG_REPLY ("\t no pending events\n");
- len = snprintf (p, *remain, "[flip event pending]\n");
- p += len;
- *remain -= len;
+ XDBG_REPLY ("[flip event pending]\n");
xorg_list_for_each_entry_safe (flip_ref, flip_next, &pageflip_event_list, link)
{
check_flip = TRUE;
xorg_list_for_each_entry_safe (flip_ref, flip_next, &pageflip_event_list, link)
{
check_flip = TRUE;
- len = snprintf (p, *remain, "req_time client_id draw_id crtc_pipe\n");
- p += len;
- *remain -= len;
- len = snprintf (p, *remain, "[%10.3f] %5d 0x%x %4d\n",
+ XDBG_REPLY ("req_time client_id draw_id crtc_pipe\n");
+ XDBG_REPLY ("[%10.3f] %5d 0x%x %4d\n",
(double)flip_ref->time/1000.0, (unsigned int)flip_ref->client_idx,
(unsigned int)flip_ref->draw_id, flip_ref->crtc_pipe);
(double)flip_ref->time/1000.0, (unsigned int)flip_ref->client_idx,
(unsigned int)flip_ref->draw_id, flip_ref->crtc_pipe);
- p += len;
- *remain -= len;
- {
- len = snprintf (p, *remain, "\t no pending events\n");
- p += len;
- *remain -= len;
- }
+ XDBG_REPLY ("\t no pending events\n");
void *xDbgLogDrmEventAddPageflip (int crtc_pipe, unsigned int client_idx, unsigned int draw_id);
void xDbgLogDrmEventRemovePageflip (void *pageflip_data);
void *xDbgLogDrmEventAddPageflip (int crtc_pipe, unsigned int client_idx, unsigned int draw_id);
void xDbgLogDrmEventRemovePageflip (void *pageflip_data);
-void xDbgLogDrmEventPendingLists ( char *reply, int *remain);
+void xDbgLogDrmEventPendingLists ( char *reply, int *len);
#endif /* __XDBG_LOG_DRMEVENT_H__ */
#endif /* __XDBG_LOG_DRMEVENT_H__ */
#define API __attribute__ ((visibility("default")))
#endif
#define API __attribute__ ((visibility("default")))
#endif
+static int init_fpsdebug = 0;
static Bool g_on = FALSE;
struct _fpsDebug
static Bool g_on = FALSE;
struct _fpsDebug
{
FpsDebugPtr pFpsDebug = NULL;
{
FpsDebugPtr pFpsDebug = NULL;
pFpsDebug = calloc (1, sizeof (struct _fpsDebug));
if (!pFpsDebug)
{
pFpsDebug = calloc (1, sizeof (struct _fpsDebug));
if (!pFpsDebug)
{
- if (!pFpsDebug)
- return;
-
if (connector_type != pFpsDebug->connector_type)
{
pFpsDebug->connector_type = connector_type;
if (connector_type != pFpsDebug->connector_type)
{
pFpsDebug->connector_type = connector_type;
-xDbgLogFpsDebug (int on)
+xDbgLogFpsDebug (char *reply, int *len, int on)
+ if (!init_fpsdebug)
+ {
+ XDBG_REPLY ("fps_debug is not supported.\n");
+ return;
+ }
+
if (g_on != on)
g_on = on;
}
if (g_on != on)
g_on = on;
}
void xDbgLogFpsDebugDestroy (FpsDebugPtr pFpsDebug);
void xDbgLogFpsDebugCount (FpsDebugPtr pFpsDebug, int connector_type);
void xDbgLogFpsDebugDestroy (FpsDebugPtr pFpsDebug);
void xDbgLogFpsDebugCount (FpsDebugPtr pFpsDebug, int connector_type);
-void xDbgLogFpsDebug (int on);
+void xDbgLogFpsDebug (char *reply, int *len, int on);
#endif /* __XDBG_LOG_FPSDEBUG_H__ */
#endif /* __XDBG_LOG_FPSDEBUG_H__ */
struct xorg_list refPixmaps;
} XDbgDrawable;
struct xorg_list refPixmaps;
} XDbgDrawable;
+static int init_plist = 0;
static struct xorg_list xdbgPixmaps;
static struct xorg_list xdbgDrawables;
static PixmapPtr pPixRoot = NULL;
static struct xorg_list xdbgPixmaps;
static struct xorg_list xdbgDrawables;
static PixmapPtr pPixRoot = NULL;
API void
xDbgLogPListInit (ScreenPtr pScreen)
{
API void
xDbgLogPListInit (ScreenPtr pScreen)
{
xorg_list_init (&xdbgPixmaps);
xorg_list_init (&xdbgDrawables);
xorg_list_init (&xdbgPixmaps);
xorg_list_init (&xdbgDrawables);
API void
xDbgLogPList (char *reply, int *len)
{
API void
xDbgLogPList (char *reply, int *len)
{
+ if (!init_plist)
+ {
+ XDBG_REPLY ("plist is not supported.\n");
+ return;
+ }
+
XDBG_REPLY ("\n\n====================================\n");
XDBG_REPLY (" Total:%d, Peek:%d\n", (unsigned int)total_size/1024, (unsigned int)peek_size/1024);
XDBG_REPLY ( "====================================\n");
XDBG_REPLY ("\n\n====================================\n");
XDBG_REPLY (" Total:%d, Peek:%d\n", (unsigned int)total_size/1024, (unsigned int)peek_size/1024);
XDBG_REPLY ( "====================================\n");
void
xDbgModuleFpsDebug (XDbgModule *pMod, int on, char *reply, int *len)
{
void
xDbgModuleFpsDebug (XDbgModule *pMod, int on, char *reply, int *len)
{
+ xDbgLogFpsDebug (reply, len, on);