diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-02-15 20:23:39 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-02-15 20:23:39 +0000 |
commit | 11b653c4562312a54ce0d4e467e5d9d84693ef7a (patch) | |
tree | dfdf147b83095c814ea4fdefc2e39d74b5f67446 | |
parent | 45262860de5b31ec12c48d438bc2152d5b03801d (diff) |
Remove some ifdeffed out debugging code that I'm not so fond of.
-rw-r--r-- | sys/dev/pci/drm/r128_state.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/sys/dev/pci/drm/r128_state.c b/sys/dev/pci/drm/r128_state.c index c6e8e26b7ec..e7c8c58254b 100644 --- a/sys/dev/pci/drm/r128_state.c +++ b/sys/dev/pci/drm/r128_state.c @@ -269,69 +269,6 @@ static void r128_emit_state(drm_r128_private_t * dev_priv) sarea_priv->dirty &= ~R128_REQUIRE_QUIESCENCE; } -#if R128_PERFORMANCE_BOXES -/* ================================================================ - * Performance monitoring functions - */ - -static void r128_clear_box(drm_r128_private_t * dev_priv, - int x, int y, int w, int h, int r, int g, int b) -{ - u32 pitch, offset; - u32 fb_bpp, color; - RING_LOCALS; - - switch (dev_priv->fb_bpp) { - case 16: - fb_bpp = R128_GMC_DST_16BPP; - color = (((r & 0xf8) << 8) | - ((g & 0xfc) << 3) | ((b & 0xf8) >> 3)); - break; - case 24: - fb_bpp = R128_GMC_DST_24BPP; - color = ((r << 16) | (g << 8) | b); - break; - case 32: - fb_bpp = R128_GMC_DST_32BPP; - color = (((0xff) << 24) | (r << 16) | (g << 8) | b); - break; - default: - return; - } - - offset = dev_priv->back_offset; - pitch = dev_priv->back_pitch >> 3; - - BEGIN_RING(6); - - OUT_RING(CCE_PACKET3(R128_CNTL_PAINT_MULTI, 4)); - OUT_RING(R128_GMC_DST_PITCH_OFFSET_CNTL | - R128_GMC_BRUSH_SOLID_COLOR | - fb_bpp | - R128_GMC_SRC_DATATYPE_COLOR | - R128_ROP3_P | - R128_GMC_CLR_CMP_CNTL_DIS | R128_GMC_AUX_CLIP_DIS); - - OUT_RING((pitch << 21) | (offset >> 5)); - OUT_RING(color); - - OUT_RING((x << 16) | y); - OUT_RING((w << 16) | h); - - ADVANCE_RING(); -} - -static void r128_cce_performance_boxes(drm_r128_private_t * dev_priv) -{ - if (atomic_read(&dev_priv->idle_count) == 0) { - r128_clear_box(dev_priv, 64, 4, 8, 8, 0, 255, 0); - } else { - atomic_set(&dev_priv->idle_count, 0); - } -} - -#endif - /* ================================================================ * CCE command dispatch functions */ @@ -469,12 +406,6 @@ static void r128_cce_dispatch_swap(struct drm_device * dev) RING_LOCALS; DRM_DEBUG("\n"); -#if R128_PERFORMANCE_BOXES - /* Do some trivial performance monitoring... - */ - r128_cce_performance_boxes(dev_priv); -#endif - for (i = 0; i < nbox; i++) { int x = pbox[i].x1; int y = pbox[i].y1; @@ -532,12 +463,6 @@ static void r128_cce_dispatch_flip(struct drm_device * dev) DRM_DEBUG("page=%d pfCurrentPage=%d\n", dev_priv->current_page, dev_priv->sarea_priv->pfCurrentPage); -#if R128_PERFORMANCE_BOXES - /* Do some trivial performance monitoring... - */ - r128_cce_performance_boxes(dev_priv); -#endif - BEGIN_RING(4); R128_WAIT_UNTIL_PAGE_FLIPPED(); |