[PATCH 1/3] randr: Suppress debug messages from prime

Chris Wilson chris at chris-wilson.co.uk
Wed Jul 23 04:35:13 PDT 2014


Hide the ErrorF used for debugging behind an ifdefed out macro.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Dave Airlie <airlied at redhat.com>
---
 randr/rrcrtc.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 69b3ecf..8f881b5 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -25,6 +25,12 @@
 #include "swaprep.h"
 #include "mipointer.h"
 
+#if 0
+#define DBG(x) ErrorF x
+#else
+#define DBG(x)
+#endif
+
 RESTYPE RRCrtcType;
 
 /*
@@ -428,7 +434,7 @@ rrCreateSharedPixmap(RRCrtcPtr crtc, int width, int height,
 
     ret = pScrPriv->rrCrtcSetScanoutPixmap(crtc, spix);
     if (ret == FALSE) {
-        ErrorF("failed to set shadow slave pixmap\n");
+        DBG(("failed to set shadow slave pixmap\n"));
         return FALSE;
     }
 
@@ -502,7 +508,7 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
 
     if (new_width == screen_pixmap->drawable.width &&
         new_height == screen_pixmap->drawable.height) {
-        ErrorF("adjust shatters %d %d\n", newsize->x1, newsize->x2);
+        DBG(("adjust shatters %d %d\n", newsize->x1, newsize->x2));
     } else {
         pScrPriv->rrScreenSetSize(pScreen, new_width, new_height, 0, 0);
     }
@@ -557,7 +563,7 @@ RRCrtcSet(RRCrtcPtr crtc,
                 width = mode->mode.width;
                 height = mode->mode.height;
             }
-            ErrorF("have a master to look out for\n");
+            DBG(("have a master to look out for\n"));
             ret = rrCheckPixmapBounding(master, crtc,
                                         x, y, width, height);
             if (!ret)
@@ -565,7 +571,7 @@ RRCrtcSet(RRCrtcPtr crtc,
 
             if (pScreen->current_master) {
                 ret = rrCreateSharedPixmap(crtc, width, height, x, y);
-                ErrorF("need to create shared pixmap %d", ret);
+                DBG(("need to create shared pixmap %d\n", ret));
 
             }
         }
-- 
1.9.1



More information about the xorg-devel mailing list