[18/18] debug stuff
diff mbox

Message ID 4ecba8b5ea6e1fe8b849aeb07683b210031f900a.1249999028.git.daniel.vetter@ffwll.ch
State Not Applicable
Headers show

Commit Message

Daniel Vetter Aug. 11, 2009, 2:06 p.m. UTC
---
 src/i830_video.c |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

Comments

Daniel Vetter Aug. 11, 2009, 3:03 p.m. UTC | #1
Ignore this and my apologies for letting this through.

-Daniel
On Tue, Aug 11, 2009 at 04:06:48PM +0200, Daniel Vetter wrote:

Patch
diff mbox

diff --git a/src/i830_video.c b/src/i830_video.c
index 340f452..844732a 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -118,7 +118,7 @@  static Atom xvSyncToVblank;
 #define IMAGE_MAX_HEIGHT_LEGACY	1088
 
 /* overlay debugging printf function */
-#if 0
+#if 1
 #define OVERLAY_DEBUG ErrorF
 #else
 #define OVERLAY_DEBUG if (0) ErrorF
@@ -2210,15 +2210,32 @@  ums_overlay_put_image(ScrnInfoPtr pScrn, xf86CrtcPtr crtc,
 
     overlay->OCMD = i830_overlay_cmd(id, planar);
 
+    OVERLAY_DEBUG("DSPARB: %x, FW_BLC: %x, FW_BLC2: %x\n",
+		    INREG(DSPARB), INREG(0x020d8), INREG(0x020dc));
+    OVERLAY_DEBUG("saveDSPARB: %x\n", pI830->saveDSPARB);
     /* make sure the overlay is on */
     i830_overlay_on (pScrn);
     /* and show this frame */
+    OVERLAY_DEBUG("OSTRIDE: %x, SWIDTH: %x, SWIDTHSW: %x, SHEIGHT: %x, "
+                        "UVSCALE: %x, UVSCALEV: %x, U_OFF: %x, V_OFF: %x\n",
+                        overlay->OSTRIDE, overlay->SWIDTH, overlay->SWIDTHSW,
+                        overlay->SHEIGHT, overlay->UVSCALE, overlay->UVSCALEV,
+                        overlay->OBUF_0Y - overlay->OBUF_0U,
+                        overlay->OBUF_0Y - overlay->OBUF_0V);
+    /*OVERLAY_DEBUG("Y_HCOEFFS\n");
+    for (i = 0; i < N_HORIZ_Y_TAPS * N_PHASES; i++)
+	    OVERLAY_DEBUG("	%x,\n", overlay->Y_HCOEFS[i]);
+    OVERLAY_DEBUG("UV_HCOEFFS\n");
+    for (i = 0; i < N_HORIZ_UV_TAPS * N_PHASES; i++)
+	    OVERLAY_DEBUG("	%x,\n", overlay->UV_HCOEFS[i]);*/
+
     i830_overlay_continue (pScrn, scaleChanged);
 
     if (xvmc_passthrough(id, pPriv->rotation))
 	return TRUE;
 
     /* unpin the old buffer and exchange buffers */
+    /* should we have a sync here ?*/
     if (pPriv->oldBuf_pinned) {
 	drm_intel_bo_unpin(pPriv->oldBuf);
     }
@@ -2274,6 +2291,8 @@  i830_display_overlay(ScrnInfoPtr pScrn, xf86CrtcPtr crtc,
 	src_w = src_h;
 	src_h = tmp;
     }
+    OVERLAY_DEBUG("x1: %i, x2: %i, drw_w: %i, src_w: %i, width: %i\n",
+		    x1, x2, drw_w, src_w, width);
 
     if (pI830->use_drmmode_overlay)
 	return drmmode_overlay_put_image(pScrn, crtc, id, width, height, dstPitch,