summaryrefslogtreecommitdiff
path: root/src/xvmc
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2008-01-02 13:57:23 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-01-02 13:57:23 +0800
commit0fd769b5882058e5ebf17ee1c1e35b4a3d46e6b0 (patch)
tree71b89ce6de7c6db13e2160017528bc69ba41fdb4 /src/xvmc
parenta2bb2afd24c95e056b801c85dc12daeac54b37f0 (diff)
xvmc: add context id info in debug/trace
Diffstat (limited to 'src/xvmc')
-rw-r--r--src/xvmc/i915_xvmc.c2
-rw-r--r--src/xvmc/intel_xvmc.c4
-rw-r--r--src/xvmc/xf86dri.c17
3 files changed, 14 insertions, 9 deletions
diff --git a/src/xvmc/i915_xvmc.c b/src/xvmc/i915_xvmc.c
index 10b60ce2..d27384dd 100644
--- a/src/xvmc/i915_xvmc.c
+++ b/src/xvmc/i915_xvmc.c
@@ -1629,7 +1629,7 @@ static Status i915_xvmc_mc_create_context(Display *display, XvMCContext *context
int isCapable;
int screen = DefaultScreen(display);
- XVMC_DBG("i915_xvmc_mc_create_context\n");
+ XVMC_DBG("%s\n", __FUNCTION__);
if (priv_count != (sizeof(I915XvMCCreateContextRec) >> 2)) {
XVMC_ERR("_xvmc_create_context() returned incorrect data size!");
diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c
index b4a34fc2..91a050f0 100644
--- a/src/xvmc/intel_xvmc.c
+++ b/src/xvmc/intel_xvmc.c
@@ -250,6 +250,7 @@ Status XvMCCreateContext(Display *display, XvPortID port,
XVMC_ERR("Unable to create XvMC Context.");
return ret;
}
+ XVMC_DBG("new context %d created\n", context->context_id);
comm = (struct _intel_xvmc_common *)priv_data;
@@ -339,7 +340,8 @@ Status XvMCCreateContext(Display *display, XvPortID port,
if (!uniDRICreateContext(display, screen, NULL,
context->context_id,
&intel_ctx->hw_context)) {
- XVMC_ERR("Could not create DRI context.");
+ XVMC_ERR("Could not create DRI context for xvmc ctx %d.",
+ context->context_id);
XFree(priv_data);
context->privData = NULL;
drmUnmap(xvmc_driver->sarea_address, xvmc_driver->sarea_size);
diff --git a/src/xvmc/xf86dri.c b/src/xvmc/xf86dri.c
index 2b60348c..97022e4a 100644
--- a/src/xvmc/xf86dri.c
+++ b/src/xvmc/xf86dri.c
@@ -84,9 +84,9 @@ XEXT_GENERATE_FIND_DISPLAY(find_display, xf86dri_info,
*****************************************************************************/
#if 0
#include <stdio.h>
-#define TRACE(msg) fprintf(stderr,"uniDRI%s\n", msg);
+#define TRACE(msg, arg...) fprintf(stderr,"uniDRI" msg "\n", ##arg);
#else
-#define TRACE(msg)
+#define TRACE(msg, arg...)
#endif
Bool uniDRIQueryExtension(dpy, event_basep, error_basep)
Display *dpy;
@@ -135,7 +135,8 @@ uniDRIQueryVersion(dpy, majorVersion, minorVersion, patchVersion)
*patchVersion = rep.patchVersion;
UnlockDisplay(dpy);
SyncHandle();
- TRACE("QueryVersion... return True");
+ TRACE("QueryVersion... %d.%d.%d return True", rep.majorVersion,
+ rep.minorVersion, rep.patchVersion);
return True;
}
@@ -166,7 +167,8 @@ uniDRIQueryDirectRenderingCapable(dpy, screen, isCapable)
*isCapable = rep.isCapable;
UnlockDisplay(dpy);
SyncHandle();
- TRACE("QueryDirectRenderingCapable... return True");
+ TRACE("QueryDirectRenderingCapable... %s return True",
+ rep.isCapable ? "true" : "false");
return True;
}
@@ -216,7 +218,8 @@ uniDRIOpenConnection(dpy, screen, hSAREA, busIdString)
}
UnlockDisplay(dpy);
SyncHandle();
- TRACE("OpenConnection... return True");
+ TRACE("OpenConnection... busid %s return True",
+ *busIdString ? *busIdString : "null");
return True;
}
@@ -339,7 +342,7 @@ uniDRICreateContextWithConfig(dpy, screen, configID, context, hHWContext)
xXF86DRICreateContextReply rep;
xXF86DRICreateContextReq *req;
- TRACE("CreateContext...");
+ TRACE("CreateContext... id %d", context);
uniDRICheckExtension(dpy, info, False);
LockDisplay(dpy);
@@ -382,7 +385,7 @@ uniDRIDestroyContext(Display * ndpy, int screen, XID context)
XExtDisplayInfo *info = find_display(dpy);
xXF86DRIDestroyContextReq *req;
- TRACE("DestroyContext...");
+ TRACE("DestroyContext... id %d", context);
uniDRICheckExtension(dpy, info, False);
LockDisplay(dpy);