xf86-video-intel: 3 commits - src/sna/debug.h src/sna/fb src/sna/kgem.h src/sna/Makefile.am src/sna/sna.h tools/virtual.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Dec 17 00:03:32 PST 2014
src/sna/Makefile.am | 1 +
src/sna/debug.h | 44 ++++++++++++++++++++++++++++++++++++++++++++
src/sna/fb/fb.h | 10 +---------
src/sna/kgem.h | 10 +---------
src/sna/sna.h | 10 +---------
tools/virtual.c | 9 +++++++++
6 files changed, 57 insertions(+), 27 deletions(-)
New commits:
commit 82e480267079f8678245e37724f95ae87f55b582
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Dec 17 08:01:00 2014 +0000
intel-virtual-output: Do not attempt to tidy up the local display if it fails
Just fix the segfault dereferencing the primary display if we bail
during its setup.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/tools/virtual.c b/tools/virtual.c
index 7928445..8e2b4a2 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -3117,6 +3117,9 @@ static void context_cleanup(struct context *ctx)
for (i = 1; i < ctx->ndisplay; i++)
display_cleanup(&ctx->display[i]);
+ if (dpy == NULL)
+ return;
+
res = _XRRGetScreenResourcesCurrent(dpy, ctx->display->root);
if (res == NULL)
return;
commit c211b3bc61efa7d13a5f5f1276649d90bf4ef854
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Dec 17 07:51:31 2014 +0000
intel-virtual-output: Add version number to verbose output
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/tools/virtual.c b/tools/virtual.c
index dbbbc27..7928445 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -3214,6 +3214,12 @@ int main(int argc, char **argv)
}
}
+ if (verbose)
+ printf("intel-virtual-output: version %d.%d.%d\n",
+ PACKAGE_VERSION_MAJOR,
+ PACKAGE_VERSION_MINOR,
+ PACKAGE_VERSION_PATCHLEVEL);
+
ret = context_init(&ctx);
if (ret)
return -ret;
commit 123754de41380b94922768d021987b1dea3b39c4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Dec 16 10:31:22 2014 +0000
sna: Make error debug tracing available at normal debug levels
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/Makefile.am b/src/sna/Makefile.am
index a995b44..e09a8d4 100644
--- a/src/sna/Makefile.am
+++ b/src/sna/Makefile.am
@@ -41,6 +41,7 @@ libsna_la_SOURCES = \
atomic.h \
blt.c \
compiler.h \
+ debug.h \
kgem.c \
kgem.h \
rop.h \
diff --git a/src/sna/debug.h b/src/sna/debug.h
new file mode 100644
index 0000000..ebbf229
--- /dev/null
+++ b/src/sna/debug.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2014 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Authors:
+ * Chris Wilson <chris at chris-wilson.co.uk>
+ *
+ */
+
+#ifndef _SNA_DEBUG_H_
+#define _SNA_DEBUG_H_
+
+#if HAS_DEBUG_FULL
+void LogF(const char *f, ...);
+#define DBG(x) LogF x
+#else
+#define DBG(x)
+#endif
+
+#if HAS_DEBUG_FULL || !defined(NDEBUG)
+#define ERR(x) ErrorF x
+#else
+#define ERR(x)
+#endif
+
+#endif /* _SNA_DEBUG_H_ */
diff --git a/src/sna/fb/fb.h b/src/sna/fb/fb.h
index 982b2c1..8bf9008 100644
--- a/src/sna/fb/fb.h
+++ b/src/sna/fb/fb.h
@@ -38,18 +38,10 @@
#include <stdbool.h>
#include <pixman.h>
-#if HAS_DEBUG_FULL
-void LogF(const char *f, ...);
-#define DBG(x) LogF x
-#define ERR(x) ErrorF x
-#else
-#define DBG(x)
-#define ERR(x)
-#endif
-
#include "sfb.h"
#include "../../compat-api.h"
+#include "../debug.h"
#define WRITE(ptr, val) (*(ptr) = (val))
#define READ(ptr) (*(ptr))
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index 3275b4f..2267bac 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -35,15 +35,7 @@
#include <i915_drm.h>
#include "compiler.h"
-
-#if HAS_DEBUG_FULL
-void LogF(const char *f, ...);
-#define DBG(x) LogF x
-#define ERR(x) ErrorF x
-#else
-#define DBG(x)
-#define ERR(x)
-#endif
+#include "debug.h"
struct kgem_bo {
struct kgem_request *rq;
diff --git a/src/sna/sna.h b/src/sna/sna.h
index db1fdc1..3e16f7e 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -78,15 +78,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xassert.h"
#include "compiler.h"
-
-#if HAS_DEBUG_FULL
-void LogF(const char *f, ...);
-#define DBG(x) LogF x
-#define ERR(x) ErrorF x
-#else
-#define DBG(x)
-#define ERR(x)
-#endif
+#include "debug.h"
#define DEBUG_NO_BLT 0
More information about the xorg-commit
mailing list