mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 20:56:23 +00:00
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>
This commit is contained in:
parent
f053185948
commit
be25ed9c5c
1 changed files with 29 additions and 20 deletions
|
@ -33,6 +33,8 @@
|
||||||
#include "i915_drm.h"
|
#include "i915_drm.h"
|
||||||
#include "i915_drv.h"
|
#include "i915_drv.h"
|
||||||
|
|
||||||
|
#define I915_DRV "i915_drv"
|
||||||
|
|
||||||
/* Really want an OS-independent resettable timer. Would like to have
|
/* Really want an OS-independent resettable timer. Would like to have
|
||||||
* this loop run for (eg) 3 sec, but have the timer reset every time
|
* this loop run for (eg) 3 sec, but have the timer reset every time
|
||||||
* the head pointer changes, so that EBUSY only happens if the ring
|
* 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)
|
||||||
memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
|
memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
|
||||||
|
|
||||||
I915_WRITE(HWS_PGA, dev_priv->dma_status_page);
|
I915_WRITE(HWS_PGA, dev_priv->dma_status_page);
|
||||||
DRM_DEBUG("Enabled hardware status page\n");
|
DRM_DEBUG_DRIVER(I915_DRV, "Enabled hardware status page\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +187,8 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)
|
||||||
master_priv->sarea_priv = (drm_i915_sarea_t *)
|
master_priv->sarea_priv = (drm_i915_sarea_t *)
|
||||||
((u8 *)master_priv->sarea->handle + init->sarea_priv_offset);
|
((u8 *)master_priv->sarea->handle + init->sarea_priv_offset);
|
||||||
} else {
|
} else {
|
||||||
DRM_DEBUG("sarea not found assuming DRI2 userspace\n");
|
DRM_DEBUG_DRIVER(I915_DRV,
|
||||||
|
"sarea not found assuming DRI2 userspace\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (init->ring_size != 0) {
|
if (init->ring_size != 0) {
|
||||||
|
@ -235,7 +238,7 @@ static int i915_dma_resume(struct drm_device * dev)
|
||||||
{
|
{
|
||||||
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
|
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
|
||||||
|
|
||||||
DRM_DEBUG("%s\n", __func__);
|
DRM_DEBUG_DRIVER(I915_DRV, "%s\n", __func__);
|
||||||
|
|
||||||
if (dev_priv->ring.map.handle == NULL) {
|
if (dev_priv->ring.map.handle == NULL) {
|
||||||
DRM_ERROR("can not ioremap virtual address for"
|
DRM_ERROR("can not ioremap virtual address for"
|
||||||
|
@ -248,13 +251,14 @@ static int i915_dma_resume(struct drm_device * dev)
|
||||||
DRM_ERROR("Can not find hardware status page\n");
|
DRM_ERROR("Can not find hardware status page\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page);
|
DRM_DEBUG_DRIVER(I915_DRV, "hw status page @ %p\n",
|
||||||
|
dev_priv->hw_status_page);
|
||||||
|
|
||||||
if (dev_priv->status_gfx_addr != 0)
|
if (dev_priv->status_gfx_addr != 0)
|
||||||
I915_WRITE(HWS_PGA, dev_priv->status_gfx_addr);
|
I915_WRITE(HWS_PGA, dev_priv->status_gfx_addr);
|
||||||
else
|
else
|
||||||
I915_WRITE(HWS_PGA, dev_priv->dma_status_page);
|
I915_WRITE(HWS_PGA, dev_priv->dma_status_page);
|
||||||
DRM_DEBUG("Enabled hardware status page\n");
|
DRM_DEBUG_DRIVER(I915_DRV, "Enabled hardware status page\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -548,10 +552,10 @@ static int i915_dispatch_flip(struct drm_device * dev)
|
||||||
if (!master_priv->sarea_priv)
|
if (!master_priv->sarea_priv)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
DRM_DEBUG("%s: page=%d pfCurrentPage=%d\n",
|
DRM_DEBUG_DRIVER(I915_DRV, "%s: page=%d pfCurrentPage=%d\n",
|
||||||
__func__,
|
__func__,
|
||||||
dev_priv->current_page,
|
dev_priv->current_page,
|
||||||
master_priv->sarea_priv->pf_current_page);
|
master_priv->sarea_priv->pf_current_page);
|
||||||
|
|
||||||
i915_kernel_lost_context(dev);
|
i915_kernel_lost_context(dev);
|
||||||
|
|
||||||
|
@ -629,8 +633,9 @@ static int i915_batchbuffer(struct drm_device *dev, void *data,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
DRM_DEBUG("i915 batchbuffer, start %x used %d cliprects %d\n",
|
DRM_DEBUG_DRIVER(I915_DRV,
|
||||||
batch->start, batch->used, batch->num_cliprects);
|
"i915 batchbuffer, start %x used %d cliprects %d\n",
|
||||||
|
batch->start, batch->used, batch->num_cliprects);
|
||||||
|
|
||||||
RING_LOCK_TEST_WITH_RETURN(dev, file_priv);
|
RING_LOCK_TEST_WITH_RETURN(dev, file_priv);
|
||||||
|
|
||||||
|
@ -678,8 +683,9 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data,
|
||||||
void *batch_data;
|
void *batch_data;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
DRM_DEBUG("i915 cmdbuffer, buf %p sz %d cliprects %d\n",
|
DRM_DEBUG_DRIVER(I915_DRV,
|
||||||
cmdbuf->buf, cmdbuf->sz, cmdbuf->num_cliprects);
|
"i915 cmdbuffer, buf %p sz %d cliprects %d\n",
|
||||||
|
cmdbuf->buf, cmdbuf->sz, cmdbuf->num_cliprects);
|
||||||
|
|
||||||
RING_LOCK_TEST_WITH_RETURN(dev, file_priv);
|
RING_LOCK_TEST_WITH_RETURN(dev, file_priv);
|
||||||
|
|
||||||
|
@ -734,7 +740,7 @@ static int i915_flip_bufs(struct drm_device *dev, void *data,
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
DRM_DEBUG("%s\n", __func__);
|
DRM_DEBUG_DRIVER(I915_DRV, "%s\n", __func__);
|
||||||
|
|
||||||
RING_LOCK_TEST_WITH_RETURN(dev, file_priv);
|
RING_LOCK_TEST_WITH_RETURN(dev, file_priv);
|
||||||
|
|
||||||
|
@ -777,7 +783,8 @@ static int i915_getparam(struct drm_device *dev, void *data,
|
||||||
value = dev_priv->num_fence_regs - dev_priv->fence_reg_start;
|
value = dev_priv->num_fence_regs - dev_priv->fence_reg_start;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DRM_DEBUG("Unknown parameter %d\n", param->param);
|
DRM_DEBUG_DRIVER(I915_DRV, "Unknown parameter %d\n",
|
||||||
|
param->param);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -817,7 +824,8 @@ static int i915_setparam(struct drm_device *dev, void *data,
|
||||||
dev_priv->fence_reg_start = param->value;
|
dev_priv->fence_reg_start = param->value;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DRM_DEBUG("unknown parameter %d\n", param->param);
|
DRM_DEBUG_DRIVER(I915_DRV, "unknown parameter %d\n",
|
||||||
|
param->param);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -865,9 +873,10 @@ static int i915_set_status_page(struct drm_device *dev, void *data,
|
||||||
|
|
||||||
memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
|
memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
|
||||||
I915_WRITE(HWS_PGA, dev_priv->status_gfx_addr);
|
I915_WRITE(HWS_PGA, dev_priv->status_gfx_addr);
|
||||||
DRM_DEBUG("load hws HWS_PGA with gfx mem 0x%x\n",
|
DRM_DEBUG_DRIVER(I915_DRV, "load hws HWS_PGA with gfx mem 0x%x\n",
|
||||||
dev_priv->status_gfx_addr);
|
dev_priv->status_gfx_addr);
|
||||||
DRM_DEBUG("load hws at %p\n", dev_priv->hw_status_page);
|
DRM_DEBUG_DRIVER(I915_DRV, "load hws at %p\n",
|
||||||
|
dev_priv->hw_status_page);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1270,7 +1279,7 @@ int i915_driver_open(struct drm_device *dev, struct drm_file *file_priv)
|
||||||
{
|
{
|
||||||
struct drm_i915_file_private *i915_file_priv;
|
struct drm_i915_file_private *i915_file_priv;
|
||||||
|
|
||||||
DRM_DEBUG("\n");
|
DRM_DEBUG_DRIVER(I915_DRV, "\n");
|
||||||
i915_file_priv = (struct drm_i915_file_private *)
|
i915_file_priv = (struct drm_i915_file_private *)
|
||||||
drm_alloc(sizeof(*i915_file_priv), DRM_MEM_FILES);
|
drm_alloc(sizeof(*i915_file_priv), DRM_MEM_FILES);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue