aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authoryakui_zhao <yakui.zhao@intel.com>2009-06-02 02:13:55 -0400
committerDave Airlie <airlied@redhat.com>2009-06-12 00:59:58 -0400
commitbe25ed9c5cc06e1d17aa97e41daf88f0b46143e6 (patch)
treeb25da58394cd4ee6c6a9f5f4bcadeea8a4ddf2d0 /drivers/gpu/drm/i915/i915_dma.c
parentf053185948a1bd16329433f5371809765086c1ec (diff)
drm: Replace DRM_DEBUG with DRM_DEBUG_DRIVER in i915 driver
Replace the DRM_DEBUG with the DRM_DEBUG_DRIVER to print the debug info in i915 driver. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c49
1 files changed, 29 insertions, 20 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 6bc716d13a52..054576d5da99 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -33,6 +33,8 @@
33#include "i915_drm.h" 33#include "i915_drm.h"
34#include "i915_drv.h" 34#include "i915_drv.h"
35 35
36#define I915_DRV "i915_drv"
37
36/* Really want an OS-independent resettable timer. Would like to have 38/* Really want an OS-independent resettable timer. Would like to have
37 * this loop run for (eg) 3 sec, but have the timer reset every time 39 * this loop run for (eg) 3 sec, but have the timer reset every time
38 * the head pointer changes, so that EBUSY only happens if the ring 40 * the head pointer changes, so that EBUSY only happens if the ring
@@ -99,7 +101,7 @@ static int i915_init_phys_hws(struct drm_device *dev)
99 memset(dev_priv->hw_status_page, 0, PAGE_SIZE); 101 memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
100 102
101 I915_WRITE(HWS_PGA, dev_priv->dma_status_page); 103 I915_WRITE(HWS_PGA, dev_priv->dma_status_page);
102 DRM_DEBUG("Enabled hardware status page\n"); 104 DRM_DEBUG_DRIVER(I915_DRV, "Enabled hardware status page\n");
103 return 0; 105 return 0;
104} 106}
105 107
@@ -185,7 +187,8 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)
185 master_priv->sarea_priv = (drm_i915_sarea_t *) 187 master_priv->sarea_priv = (drm_i915_sarea_t *)
186 ((u8 *)master_priv->sarea->handle + init->sarea_priv_offset); 188 ((u8 *)master_priv->sarea->handle + init->sarea_priv_offset);
187 } else { 189 } else {
188 DRM_DEBUG("sarea not found assuming DRI2 userspace\n"); 190 DRM_DEBUG_DRIVER(I915_DRV,
191 "sarea not found assuming DRI2 userspace\n");
189 } 192 }
190 193
191 if (init->ring_size != 0) { 194 if (init->ring_size != 0) {
@@ -235,7 +238,7 @@ static int i915_dma_resume(struct drm_device * dev)
235{ 238{
236 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; 239 drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
237 240
238 DRM_DEBUG("%s\n", __func__); 241 DRM_DEBUG_DRIVER(I915_DRV, "%s\n", __func__);
239 242
240 if (dev_priv->ring.map.handle == NULL) { 243 if (dev_priv->ring.map.handle == NULL) {
241 DRM_ERROR("can not ioremap virtual address for" 244 DRM_ERROR("can not ioremap virtual address for"
@@ -248,13 +251,14 @@ static int i915_dma_resume(struct drm_device * dev)
248 DRM_ERROR("Can not find hardware status page\n"); 251 DRM_ERROR("Can not find hardware status page\n");
249 return -EINVAL; 252 return -EINVAL;
250 } 253 }
251 DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page); 254 DRM_DEBUG_DRIVER(I915_DRV, "hw status page @ %p\n",
255 dev_priv->hw_status_page);
252 256
253 if (dev_priv->status_gfx_addr != 0) 257 if (dev_priv->status_gfx_addr != 0)
254 I915_WRITE(HWS_PGA, dev_priv->status_gfx_addr); 258 I915_WRITE(HWS_PGA, dev_priv->status_gfx_addr);
255 else 259 else
256 I915_WRITE(HWS_PGA, dev_priv->dma_status_page); 260 I915_WRITE(HWS_PGA, dev_priv->dma_status_page);
257 DRM_DEBUG("Enabled hardware status page\n"); 261 DRM_DEBUG_DRIVER(I915_DRV, "Enabled hardware status page\n");
258 262
259 return 0; 263 return 0;
260} 264}
@@ -548,10 +552,10 @@ static int i915_dispatch_flip(struct drm_device * dev)
548 if (!master_priv->sarea_priv) 552 if (!master_priv->sarea_priv)
549 return -EINVAL; 553 return -EINVAL;
550 554
551 DRM_DEBUG("%s: page=%d pfCurrentPage=%d\n", 555 DRM_DEBUG_DRIVER(I915_DRV, "%s: page=%d pfCurrentPage=%d\n",
552 __func__, 556 __func__,
553 dev_priv->current_page, 557 dev_priv->current_page,
554 master_priv->sarea_priv->pf_current_page); 558 master_priv->sarea_priv->pf_current_page);
555 559
556 i915_kernel_lost_context(dev); 560 i915_kernel_lost_context(dev);
557 561
@@ -629,8 +633,9 @@ static int i915_batchbuffer(struct drm_device *dev, void *data,
629 return -EINVAL; 633 return -EINVAL;
630 } 634 }
631 635
632 DRM_DEBUG("i915 batchbuffer, start %x used %d cliprects %d\n", 636 DRM_DEBUG_DRIVER(I915_DRV,
633 batch->start, batch->used, batch->num_cliprects); 637 "i915 batchbuffer, start %x used %d cliprects %d\n",
638 batch->start, batch->used, batch->num_cliprects);
634 639
635 RING_LOCK_TEST_WITH_RETURN(dev, file_priv); 640 RING_LOCK_TEST_WITH_RETURN(dev, file_priv);
636 641
@@ -678,8 +683,9 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data,
678 void *batch_data; 683 void *batch_data;
679 int ret; 684 int ret;
680 685
681 DRM_DEBUG("i915 cmdbuffer, buf %p sz %d cliprects %d\n", 686 DRM_DEBUG_DRIVER(I915_DRV,
682 cmdbuf->buf, cmdbuf->sz, cmdbuf->num_cliprects); 687 "i915 cmdbuffer, buf %p sz %d cliprects %d\n",
688 cmdbuf->buf, cmdbuf->sz, cmdbuf->num_cliprects);
683 689
684 RING_LOCK_TEST_WITH_RETURN(dev, file_priv); 690 RING_LOCK_TEST_WITH_RETURN(dev, file_priv);
685 691
@@ -734,7 +740,7 @@ static int i915_flip_bufs(struct drm_device *dev, void *data,
734{ 740{
735 int ret; 741 int ret;
736 742
737 DRM_DEBUG("%s\n", __func__); 743 DRM_DEBUG_DRIVER(I915_DRV, "%s\n", __func__);
738 744
739 RING_LOCK_TEST_WITH_RETURN(dev, file_priv); 745 RING_LOCK_TEST_WITH_RETURN(dev, file_priv);
740 746
@@ -777,7 +783,8 @@ static int i915_getparam(struct drm_device *dev, void *data,
777 value = dev_priv->num_fence_regs - dev_priv->fence_reg_start; 783 value = dev_priv->num_fence_regs - dev_priv->fence_reg_start;
778 break; 784 break;
779 default: 785 default:
780 DRM_DEBUG("Unknown parameter %d\n", param->param); 786 DRM_DEBUG_DRIVER(I915_DRV, "Unknown parameter %d\n",
787 param->param);
781 return -EINVAL; 788 return -EINVAL;
782 } 789 }
783 790
@@ -817,7 +824,8 @@ static int i915_setparam(struct drm_device *dev, void *data,
817 dev_priv->fence_reg_start = param->value; 824 dev_priv->fence_reg_start = param->value;
818 break; 825 break;
819 default: 826 default:
820 DRM_DEBUG("unknown parameter %d\n", param->param); 827 DRM_DEBUG_DRIVER(I915_DRV, "unknown parameter %d\n",
828 param->param);
821 return -EINVAL; 829 return -EINVAL;
822 } 830 }
823 831
@@ -865,9 +873,10 @@ static int i915_set_status_page(struct drm_device *dev, void *data,
865 873
866 memset(dev_priv->hw_status_page, 0, PAGE_SIZE); 874 memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
867 I915_WRITE(HWS_PGA, dev_priv->status_gfx_addr); 875 I915_WRITE(HWS_PGA, dev_priv->status_gfx_addr);
868 DRM_DEBUG("load hws HWS_PGA with gfx mem 0x%x\n", 876 DRM_DEBUG_DRIVER(I915_DRV, "load hws HWS_PGA with gfx mem 0x%x\n",
869 dev_priv->status_gfx_addr); 877 dev_priv->status_gfx_addr);
870 DRM_DEBUG("load hws at %p\n", dev_priv->hw_status_page); 878 DRM_DEBUG_DRIVER(I915_DRV, "load hws at %p\n",
879 dev_priv->hw_status_page);
871 return 0; 880 return 0;
872} 881}
873 882
@@ -1270,7 +1279,7 @@ int i915_driver_open(struct drm_device *dev, struct drm_file *file_priv)
1270{ 1279{
1271 struct drm_i915_file_private *i915_file_priv; 1280 struct drm_i915_file_private *i915_file_priv;
1272 1281
1273 DRM_DEBUG("\n"); 1282 DRM_DEBUG_DRIVER(I915_DRV, "\n");
1274 i915_file_priv = (struct drm_i915_file_private *) 1283 i915_file_priv = (struct drm_i915_file_private *)
1275 drm_alloc(sizeof(*i915_file_priv), DRM_MEM_FILES); 1284 drm_alloc(sizeof(*i915_file_priv), DRM_MEM_FILES);
1276 1285