summaryrefslogtreecommitdiff
path: root/src/xvmc/intel_xvmc.c
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2008-06-23 15:51:49 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-07-21 11:00:01 +0800
commit3f57fd5fef6bb6baefa3d157d4e5d9c6154c67d5 (patch)
tree1657721b32cdc3b9f9a8681d7f9fccea38a89cd4 /src/xvmc/intel_xvmc.c
parent736bed6734cf1a070fc7da6a1384edc5fd466887 (diff)
xvmc: environ debug option support
export INTEL_XVMC_DEBUG=1 (cherry picked from commit 54f3f528e4804b958936ac773e7a507b2676f815)
Diffstat (limited to 'src/xvmc/intel_xvmc.c')
-rw-r--r--src/xvmc/intel_xvmc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c
index 0db3ca62..8fabb35e 100644
--- a/src/xvmc/intel_xvmc.c
+++ b/src/xvmc/intel_xvmc.c
@@ -98,9 +98,17 @@ unsigned int mb_bytes_420[] = {
768 /* 111111 */
};
+int DEBUG;
+
static int error_base;
static int event_base;
+static void intel_xvmc_debug_init(void)
+{
+ if (getenv("INTEL_XVMC_DEBUG"))
+ DEBUG = 1;
+}
+
/* locking */
static void intel_xvmc_try_heavy_lock(drm_context_t ctx)
{
@@ -282,6 +290,8 @@ Status XvMCCreateContext(Display *display, XvPortID port,
return BadValue;
}
+ intel_xvmc_debug_init();
+
/* Open DRI Device */
if((fd = drmOpen("i915", NULL)) < 0) {
XVMC_ERR("DRM Device could not be opened.");