revert unnecessary changes to 3rd party code.
This commit is contained in:
parent
825e44652f
commit
8e2cdafb2e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: drmP.h,v 1.31 2008/07/03 17:36:44 drochner Exp $ */
|
||||
/* $NetBSD: drmP.h,v 1.32 2008/07/07 00:33:23 mrg Exp $ */
|
||||
|
||||
/* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*-
|
||||
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
|
||||
@ -482,7 +482,7 @@ do { \
|
||||
if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) || \
|
||||
dev->lock.filp != filp) { \
|
||||
DRM_ERROR("%s called without lock held\n", \
|
||||
__func__); \
|
||||
__FUNCTION__); \
|
||||
return EINVAL; \
|
||||
} \
|
||||
} while (0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: drm_irq.c,v 1.15 2008/07/03 17:36:44 drochner Exp $ */
|
||||
/* $NetBSD: drm_irq.c,v 1.16 2008/07/07 00:33:23 mrg Exp $ */
|
||||
|
||||
/* drm_irq.c -- IRQ IOCTL and function support
|
||||
* Created: Fri Oct 18 2003 by anholt@FreeBSD.org
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: drm_irq.c,v 1.15 2008/07/03 17:36:44 drochner Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: drm_irq.c,v 1.16 2008/07/07 00:33:23 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/drm_irq.c,v 1.2 2005/11/28 23:13:52 anholt Exp $");
|
||||
*/
|
||||
@ -83,7 +83,7 @@ int drm_irq_install(drm_device_t *dev)
|
||||
if (dev->irq == 0 || dev->dev_private == NULL)
|
||||
return DRM_ERR(EINVAL);
|
||||
|
||||
DRM_DEBUG( "%s: irq=%d\n", __func__, dev->irq );
|
||||
DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, dev->irq );
|
||||
|
||||
DRM_LOCK();
|
||||
if (dev->irq_enabled) {
|
||||
@ -136,7 +136,7 @@ int drm_irq_uninstall(drm_device_t *dev)
|
||||
|
||||
dev->irq_enabled = 0;
|
||||
|
||||
DRM_DEBUG( "%s: irq=%d\n", __func__, dev->irq );
|
||||
DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, dev->irq );
|
||||
|
||||
dev->driver.irq_uninstall(dev);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: drm_scatter.c,v 1.6 2008/06/29 12:49:08 jmcneill Exp $ */
|
||||
/* $NetBSD: drm_scatter.c,v 1.7 2008/07/07 00:33:23 mrg Exp $ */
|
||||
|
||||
/* drm_scatter.h -- IOCTLs to manage scatter/gather memory -*- linux-c -*-
|
||||
* Created: Mon Dec 18 23:20:54 2000 by gareth@valinux.com */
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: drm_scatter.c,v 1.6 2008/06/29 12:49:08 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: drm_scatter.c,v 1.7 2008/07/07 00:33:23 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/drm_scatter.c,v 1.3 2006/05/17 06:29:36 anholt Exp $");
|
||||
*/
|
||||
@ -56,7 +56,7 @@ int drm_sg_alloc(DRM_IOCTL_ARGS)
|
||||
unsigned long pages;
|
||||
int i;
|
||||
|
||||
DRM_DEBUG( "%s\n", __func__ );
|
||||
DRM_DEBUG( "%s\n", __FUNCTION__ );
|
||||
|
||||
if ( dev->sg )
|
||||
return EINVAL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: i915_dma.c,v 1.5 2008/03/04 11:52:38 drochner Exp $ */
|
||||
/* $NetBSD: i915_dma.c,v 1.6 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* i915_dma.c -- DMA support for the I915 -*- linux-c -*-
|
||||
*/
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: i915_dma.c,v 1.5 2008/03/04 11:52:38 drochner Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: i915_dma.c,v 1.6 2008/07/07 00:31:30 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/i915_dma.c,v 1.4 2006/09/07 23:04:47 anholt Exp $");
|
||||
*/
|
||||
@ -214,7 +214,7 @@ static int i915_dma_resume(drm_device_t * dev)
|
||||
{
|
||||
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
if (!dev_priv->sarea) {
|
||||
DRM_ERROR("can not find sarea!\n");
|
||||
@ -543,7 +543,7 @@ static int i915_dispatch_flip(drm_device_t * dev)
|
||||
RING_LOCALS;
|
||||
|
||||
DRM_DEBUG("%s: page=%d pfCurrentPage=%d\n",
|
||||
__func__,
|
||||
__FUNCTION__,
|
||||
dev_priv->current_page,
|
||||
dev_priv->sarea_priv->pf_current_page);
|
||||
|
||||
@ -590,7 +590,7 @@ static int i915_quiescent(drm_device_t * dev)
|
||||
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
i915_kernel_lost_context(dev);
|
||||
return i915_wait_ring(dev, dev_priv->ring.Size - 8, __func__);
|
||||
return i915_wait_ring(dev, dev_priv->ring.Size - 8, __FUNCTION__);
|
||||
}
|
||||
|
||||
static int i915_flush_ioctl(DRM_IOCTL_ARGS)
|
||||
@ -676,7 +676,7 @@ static int i915_do_cleanup_pageflip(drm_device_t * dev)
|
||||
{
|
||||
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
if (dev_priv->current_page != 0)
|
||||
i915_dispatch_flip(dev);
|
||||
|
||||
@ -687,7 +687,7 @@ static int i915_flip_bufs(DRM_IOCTL_ARGS)
|
||||
{
|
||||
DRM_DEVICE;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
@ -702,7 +702,7 @@ static int i915_getparam(DRM_IOCTL_ARGS)
|
||||
int value;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -739,7 +739,7 @@ static int i915_setparam(DRM_IOCTL_ARGS)
|
||||
drm_i915_setparam_t param;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
|
@ -151,9 +151,9 @@ extern void i915_mem_release(drm_device_t * dev,
|
||||
#define BEGIN_LP_RING(n) do { \
|
||||
if (I915_VERBOSE) \
|
||||
DRM_DEBUG("BEGIN_LP_RING(%d) in %s\n", \
|
||||
(n), __func__); \
|
||||
(n), __FUNCTION__); \
|
||||
if (dev_priv->ring.space < (n)*4) \
|
||||
i915_wait_ring(dev, (n)*4, __func__); \
|
||||
i915_wait_ring(dev, (n)*4, __FUNCTION__); \
|
||||
outcount = 0; \
|
||||
outring = dev_priv->ring.tail; \
|
||||
ringmask = dev_priv->ring.tail_mask; \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: i915_irq.c,v 1.5 2008/05/19 00:15:44 bjs Exp $ */
|
||||
/* $NetBSD: i915_irq.c,v 1.6 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* i915_irq.c -- IRQ support for the I915 -*- linux-c -*-
|
||||
*/
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: i915_irq.c,v 1.5 2008/05/19 00:15:44 bjs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: i915_irq.c,v 1.6 2008/07/07 00:31:30 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/i915_irq.c,v 1.4 2006/09/07 23:04:47 anholt Exp $");
|
||||
*/
|
||||
@ -56,7 +56,7 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
|
||||
temp &= (USER_INT_FLAG | VSYNC_PIPEA_FLAG | VSYNC_PIPEB_FLAG);
|
||||
|
||||
/*
|
||||
DRM_DEBUG("%s flag=%08x\n", __func__, (int)temp);
|
||||
DRM_DEBUG("%s flag=%08x\n", __FUNCTION__, (int)temp);
|
||||
*/
|
||||
|
||||
if (temp == 0)
|
||||
@ -86,7 +86,7 @@ static int i915_emit_irq(drm_device_t * dev)
|
||||
|
||||
i915_kernel_lost_context(dev);
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
dev_priv->sarea_priv->last_enqueue = ++dev_priv->counter;
|
||||
|
||||
@ -113,7 +113,7 @@ static int i915_wait_irq(drm_device_t * dev, int irq_nr)
|
||||
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
|
||||
int ret = 0;
|
||||
|
||||
DRM_DEBUG("%s irq_nr=%d breadcrumb=%d\n", __func__, irq_nr,
|
||||
DRM_DEBUG("%s irq_nr=%d breadcrumb=%d\n", __FUNCTION__, irq_nr,
|
||||
(int)READ_BREADCRUMB(dev_priv));
|
||||
|
||||
if (READ_BREADCRUMB(dev_priv) >= irq_nr)
|
||||
@ -126,7 +126,7 @@ static int i915_wait_irq(drm_device_t * dev, int irq_nr)
|
||||
|
||||
if (ret == DRM_ERR(EBUSY)) {
|
||||
DRM_ERROR("%s: EBUSY -- rec: %d emitted: %d\n",
|
||||
__func__,
|
||||
__FUNCTION__,
|
||||
(int)READ_BREADCRUMB(dev_priv), (int)dev_priv->counter);
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ int i915_driver_vblank_wait(drm_device_t *dev, unsigned int *sequence)
|
||||
int ret = 0;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ int i915_irq_emit(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ int i915_irq_wait(DRM_IOCTL_ARGS)
|
||||
drm_i915_irq_wait_t irqwait;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ static int i915_enable_interrupt (drm_device_t *dev)
|
||||
flag |= VSYNC_PIPEB_FLAG;
|
||||
if (dev_priv->vblank_pipe & ~(DRM_I915_VBLANK_PIPE_A|DRM_I915_VBLANK_PIPE_B)) {
|
||||
DRM_ERROR("%s called with invalid pipe 0x%x\n",
|
||||
__func__, dev_priv->vblank_pipe);
|
||||
__FUNCTION__, dev_priv->vblank_pipe);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
I915_WRITE16(I915REG_INT_ENABLE_R, USER_INT_FLAG | flag);
|
||||
@ -230,7 +230,7 @@ int i915_vblank_pipe_set(DRM_IOCTL_ARGS)
|
||||
drm_i915_vblank_pipe_t pipe;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ int i915_vblank_pipe_get(DRM_IOCTL_ARGS)
|
||||
u16 flag;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: i915_mem.c,v 1.3 2007/12/15 00:39:31 perry Exp $ */
|
||||
/* $NetBSD: i915_mem.c,v 1.4 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* i915_mem.c -- Simple agp/fb memory manager for i915 -*- linux-c -*-
|
||||
*/
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: i915_mem.c,v 1.3 2007/12/15 00:39:31 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: i915_mem.c,v 1.4 2008/07/07 00:31:30 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/i915_mem.c,v 1.3 2006/04/09 20:45:45 anholt Exp $");
|
||||
*/
|
||||
@ -283,7 +283,7 @@ int i915_mem_alloc(DRM_IOCTL_ARGS)
|
||||
struct mem_block *block, **heap;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -323,7 +323,7 @@ int i915_mem_free(DRM_IOCTL_ARGS)
|
||||
struct mem_block *block, **heap;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -354,7 +354,7 @@ int i915_mem_init_heap(DRM_IOCTL_ARGS)
|
||||
struct mem_block **heap;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -382,7 +382,7 @@ int i915_mem_destroy_heap( DRM_IOCTL_ARGS )
|
||||
struct mem_block **heap;
|
||||
|
||||
if ( !dev_priv ) {
|
||||
DRM_ERROR( "%s called with no initialization\n", __func__ );
|
||||
DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mach64_dma.c,v 1.4 2007/12/15 00:39:31 perry Exp $ */
|
||||
/* $NetBSD: mach64_dma.c,v 1.5 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* mach64_dma.c -- DMA support for mach64 (Rage Pro) driver -*- linux-c -*- */
|
||||
/**
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach64_dma.c,v 1.4 2007/12/15 00:39:31 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach64_dma.c,v 1.5 2008/07/07 00:31:30 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/mach64_dma.c,v 1.2 2005/11/28 23:13:53 anholt Exp $");
|
||||
*/
|
||||
@ -76,7 +76,7 @@ int mach64_do_wait_for_fifo(drm_mach64_private_t * dev_priv, int entries)
|
||||
DRM_UDELAY(1);
|
||||
}
|
||||
|
||||
DRM_INFO("%s failed! slots=%d entries=%d\n", __func__, slots,
|
||||
DRM_INFO("%s failed! slots=%d entries=%d\n", __FUNCTION__, slots,
|
||||
entries);
|
||||
return DRM_ERR(EBUSY);
|
||||
}
|
||||
@ -99,7 +99,7 @@ int mach64_do_wait_for_idle(drm_mach64_private_t * dev_priv)
|
||||
DRM_UDELAY(1);
|
||||
}
|
||||
|
||||
DRM_INFO("%s failed! GUI_STAT=0x%08x\n", __func__,
|
||||
DRM_INFO("%s failed! GUI_STAT=0x%08x\n", __FUNCTION__,
|
||||
MACH64_READ(MACH64_GUI_STAT));
|
||||
mach64_dump_ring_info(dev_priv);
|
||||
return DRM_ERR(EBUSY);
|
||||
@ -133,7 +133,7 @@ int mach64_wait_ring(drm_mach64_private_t * dev_priv, int n)
|
||||
mach64_update_ring_snapshot(dev_priv);
|
||||
if (ring->space >= n) {
|
||||
if (i > 0) {
|
||||
DRM_DEBUG("%s: %d usecs\n", __func__, i);
|
||||
DRM_DEBUG("%s: %d usecs\n", __FUNCTION__, i);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -164,7 +164,7 @@ static int mach64_ring_idle(drm_mach64_private_t * dev_priv)
|
||||
if (ring->head == ring->tail &&
|
||||
!(MACH64_READ(MACH64_GUI_STAT) & MACH64_GUI_ACTIVE)) {
|
||||
if (i > 0) {
|
||||
DRM_DEBUG("%s: %d usecs\n", __func__, i);
|
||||
DRM_DEBUG("%s: %d usecs\n", __FUNCTION__, i);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -177,7 +177,7 @@ static int mach64_ring_idle(drm_mach64_private_t * dev_priv)
|
||||
DRM_UDELAY(1);
|
||||
}
|
||||
|
||||
DRM_INFO("%s failed! GUI_STAT=0x%08x\n", __func__,
|
||||
DRM_INFO("%s failed! GUI_STAT=0x%08x\n", __FUNCTION__,
|
||||
MACH64_READ(MACH64_GUI_STAT));
|
||||
mach64_dump_ring_info(dev_priv);
|
||||
return DRM_ERR(EBUSY);
|
||||
@ -225,7 +225,7 @@ int mach64_do_dma_idle(drm_mach64_private_t * dev_priv)
|
||||
/* wait for completion */
|
||||
if ((ret = mach64_ring_idle(dev_priv)) < 0) {
|
||||
DRM_ERROR("%s failed BM_GUI_TABLE=0x%08x tail: %u\n",
|
||||
__func__, MACH64_READ(MACH64_BM_GUI_TABLE),
|
||||
__FUNCTION__, MACH64_READ(MACH64_BM_GUI_TABLE),
|
||||
dev_priv->ring.tail);
|
||||
return ret;
|
||||
}
|
||||
@ -244,7 +244,7 @@ int mach64_do_engine_reset(drm_mach64_private_t * dev_priv)
|
||||
{
|
||||
u32 tmp;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
/* Kill off any outstanding DMA transfers.
|
||||
*/
|
||||
@ -590,7 +590,7 @@ static int mach64_bm_dma_test(drm_device_t * dev)
|
||||
u32 src_cntl, pat_reg0, pat_reg1;
|
||||
int i, count, failed;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
table = (u32 *) dev_priv->ring.start;
|
||||
|
||||
@ -766,7 +766,7 @@ static int mach64_do_dma_init(drm_device_t * dev, drm_mach64_init_t * init)
|
||||
u32 tmp;
|
||||
int i, ret;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
dev_priv = drm_alloc(sizeof(drm_mach64_private_t), DRM_MEM_DRIVER);
|
||||
if (dev_priv == NULL)
|
||||
@ -1010,7 +1010,7 @@ int mach64_do_dispatch_pseudo_dma(drm_mach64_private_t * dev_priv)
|
||||
if ((ret = mach64_do_wait_for_idle(dev_priv)) < 0) {
|
||||
DRM_INFO
|
||||
("%s: idle failed before pseudo-dma dispatch, resetting engine\n",
|
||||
__func__);
|
||||
__FUNCTION__);
|
||||
mach64_dump_engine_info(dev_priv);
|
||||
mach64_do_engine_reset(dev_priv);
|
||||
return ret;
|
||||
@ -1131,7 +1131,7 @@ int mach64_do_dispatch_pseudo_dma(drm_mach64_private_t * dev_priv)
|
||||
MACH64_WRITE(MACH64_BM_GUI_TABLE_CMD,
|
||||
ring->head_addr | MACH64_CIRCULAR_BUF_SIZE_16KB);
|
||||
|
||||
DRM_DEBUG("%s completed\n", __func__);
|
||||
DRM_DEBUG("%s completed\n", __FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1144,7 +1144,7 @@ int mach64_do_dispatch_pseudo_dma(drm_mach64_private_t * dev_priv)
|
||||
|
||||
int mach64_do_cleanup_dma(drm_device_t * dev)
|
||||
{
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
/* Make sure interrupts are disabled here because the uninstall ioctl
|
||||
* may not have been called from userspace and after dev_private
|
||||
@ -1192,7 +1192,7 @@ int mach64_dma_init(DRM_IOCTL_ARGS)
|
||||
DRM_DEVICE;
|
||||
drm_mach64_init_t init;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
@ -1214,7 +1214,7 @@ int mach64_dma_idle(DRM_IOCTL_ARGS)
|
||||
DRM_DEVICE;
|
||||
drm_mach64_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
@ -1226,7 +1226,7 @@ int mach64_dma_flush(DRM_IOCTL_ARGS)
|
||||
DRM_DEVICE;
|
||||
drm_mach64_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
@ -1238,7 +1238,7 @@ int mach64_engine_reset(DRM_IOCTL_ARGS)
|
||||
DRM_DEVICE;
|
||||
drm_mach64_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
@ -1260,7 +1260,7 @@ int mach64_init_freelist(drm_device_t * dev)
|
||||
struct list_head *ptr;
|
||||
int i;
|
||||
|
||||
DRM_DEBUG("%s: adding %d buffers to freelist\n", __func__,
|
||||
DRM_DEBUG("%s: adding %d buffers to freelist\n", __FUNCTION__,
|
||||
dma->buf_count);
|
||||
|
||||
for (i = 0; i < dma->buf_count; i++) {
|
||||
@ -1285,7 +1285,7 @@ void mach64_destroy_freelist(drm_device_t * dev)
|
||||
struct list_head *ptr;
|
||||
struct list_head *tmp;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
list_for_each_safe(ptr, tmp, &dev_priv->pending) {
|
||||
list_del(ptr);
|
||||
@ -1330,7 +1330,7 @@ int mach64_do_release_used_buffers(drm_mach64_private_t * dev_priv)
|
||||
}
|
||||
}
|
||||
|
||||
DRM_DEBUG("%s: released %d buffers from pending list\n", __func__,
|
||||
DRM_DEBUG("%s: released %d buffers from pending list\n", __FUNCTION__,
|
||||
i);
|
||||
|
||||
return 0;
|
||||
@ -1377,7 +1377,7 @@ drm_buf_t *mach64_freelist_get(drm_mach64_private_t * dev_priv)
|
||||
mach64_do_release_used_buffers(dev_priv);
|
||||
DRM_DEBUG
|
||||
("%s: idle engine, freed all buffers.\n",
|
||||
__func__);
|
||||
__FUNCTION__);
|
||||
if (list_empty(&dev_priv->free_list)) {
|
||||
DRM_ERROR
|
||||
("Freelist empty with idle engine\n");
|
||||
@ -1429,7 +1429,7 @@ drm_buf_t *mach64_freelist_get(drm_mach64_private_t * dev_priv)
|
||||
DRM_DEBUG
|
||||
("%s: freed processed buffer (head=%d tail=%d "
|
||||
"buf ring ofs=%d).\n",
|
||||
__func__, head, tail, ofs);
|
||||
__FUNCTION__, head, tail, ofs);
|
||||
return entry->buf;
|
||||
}
|
||||
}
|
||||
|
@ -603,7 +603,7 @@ static __inline__ void mach64_ring_start(drm_mach64_private_t * dev_priv)
|
||||
drm_mach64_descriptor_ring_t *ring = &dev_priv->ring;
|
||||
|
||||
DRM_DEBUG("%s: head_addr: 0x%08x head: %d tail: %d space: %d\n",
|
||||
__func__,
|
||||
__FUNCTION__,
|
||||
ring->head_addr, ring->head, ring->tail, ring->space);
|
||||
|
||||
if (mach64_do_wait_for_idle(dev_priv) < 0) {
|
||||
@ -630,7 +630,7 @@ static __inline__ void mach64_ring_resume(drm_mach64_private_t * dev_priv,
|
||||
drm_mach64_descriptor_ring_t * ring)
|
||||
{
|
||||
DRM_DEBUG("%s: head_addr: 0x%08x head: %d tail: %d space: %d\n",
|
||||
__func__,
|
||||
__FUNCTION__,
|
||||
ring->head_addr, ring->head, ring->tail, ring->space);
|
||||
|
||||
/* reset descriptor table ring head */
|
||||
@ -650,7 +650,7 @@ static __inline__ void mach64_ring_resume(drm_mach64_private_t * dev_priv,
|
||||
if (dev_priv->driver_mode == MACH64_MODE_DMA_SYNC) {
|
||||
if ((mach64_do_wait_for_idle(dev_priv)) < 0) {
|
||||
DRM_ERROR("%s: idle failed, resetting engine\n",
|
||||
__func__);
|
||||
__FUNCTION__);
|
||||
mach64_dump_engine_info(dev_priv);
|
||||
mach64_do_engine_reset(dev_priv);
|
||||
return;
|
||||
@ -664,7 +664,7 @@ static __inline__ void mach64_ring_tick(drm_mach64_private_t * dev_priv,
|
||||
drm_mach64_descriptor_ring_t * ring)
|
||||
{
|
||||
DRM_DEBUG("%s: head_addr: 0x%08x head: %d tail: %d space: %d\n",
|
||||
__func__,
|
||||
__FUNCTION__,
|
||||
ring->head_addr, ring->head, ring->tail, ring->space);
|
||||
|
||||
if (!dev_priv->ring_running) {
|
||||
@ -712,7 +712,7 @@ static __inline__ void mach64_ring_tick(drm_mach64_private_t * dev_priv,
|
||||
static __inline__ void mach64_ring_stop(drm_mach64_private_t * dev_priv)
|
||||
{
|
||||
DRM_DEBUG("%s: head_addr: 0x%08x head: %d tail: %d space: %d\n",
|
||||
__func__,
|
||||
__FUNCTION__,
|
||||
dev_priv->ring.head_addr, dev_priv->ring.head,
|
||||
dev_priv->ring.tail, dev_priv->ring.space);
|
||||
|
||||
@ -733,7 +733,7 @@ mach64_update_ring_snapshot(drm_mach64_private_t * dev_priv)
|
||||
{
|
||||
drm_mach64_descriptor_ring_t *ring = &dev_priv->ring;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
mach64_ring_tick(dev_priv, ring);
|
||||
|
||||
@ -756,7 +756,7 @@ mach64_update_ring_snapshot(drm_mach64_private_t * dev_priv)
|
||||
do { \
|
||||
if ( MACH64_VERBOSE ) { \
|
||||
DRM_INFO( "BEGIN_RING( %d ) in %s\n", \
|
||||
(n), __func__ ); \
|
||||
(n), __FUNCTION__ ); \
|
||||
} \
|
||||
if ( dev_priv->ring.space <= (n) * sizeof(u32) ) { \
|
||||
int __ret; \
|
||||
@ -822,7 +822,7 @@ static __inline__ int mach64_find_pending_buf_entry(drm_mach64_private_t *
|
||||
struct list_head *ptr;
|
||||
#if MACH64_EXTRA_CHECKING
|
||||
if (list_empty(&dev_priv->pending)) {
|
||||
DRM_ERROR("Empty pending list in %s\n", __func__);
|
||||
DRM_ERROR("Empty pending list in %s\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
#endif
|
||||
@ -850,17 +850,17 @@ do { \
|
||||
do { \
|
||||
if ( MACH64_VERBOSE ) { \
|
||||
DRM_INFO( "DMAGETPTR( %d ) in %s\n", \
|
||||
n, __func__ ); \
|
||||
n, __FUNCTION__ ); \
|
||||
} \
|
||||
_buf = mach64_freelist_get( dev_priv ); \
|
||||
if (_buf == NULL) { \
|
||||
DRM_ERROR("%s: couldn't get buffer in DMAGETPTR\n", \
|
||||
__func__ ); \
|
||||
__FUNCTION__ ); \
|
||||
return DRM_ERR(EAGAIN); \
|
||||
} \
|
||||
if (_buf->pending) { \
|
||||
DRM_ERROR("%s: pending buf in DMAGETPTR\n", \
|
||||
__func__ ); \
|
||||
__FUNCTION__ ); \
|
||||
return DRM_ERR(EFAULT); \
|
||||
} \
|
||||
_buf->filp = filp; \
|
||||
@ -886,12 +886,12 @@ do { \
|
||||
RING_LOCALS; \
|
||||
\
|
||||
if ( MACH64_VERBOSE ) { \
|
||||
DRM_INFO( "DMAADVANCE() in %s\n", __func__ ); \
|
||||
DRM_INFO( "DMAADVANCE() in %s\n", __FUNCTION__ ); \
|
||||
} \
|
||||
\
|
||||
if (_buf->used <= 0) { \
|
||||
DRM_ERROR( "DMAADVANCE() in %s: sending empty buf %d\n", \
|
||||
__func__, _buf->idx ); \
|
||||
__FUNCTION__, _buf->idx ); \
|
||||
return DRM_ERR(EFAULT); \
|
||||
} \
|
||||
if (_buf->pending) { \
|
||||
@ -899,18 +899,18 @@ do { \
|
||||
int __ret; \
|
||||
if ( (__ret=mach64_find_pending_buf_entry(dev_priv, &_entry, _buf)) ) { \
|
||||
DRM_ERROR( "DMAADVANCE() in %s: couldn't find pending buf %d\n", \
|
||||
__func__, _buf->idx ); \
|
||||
__FUNCTION__, _buf->idx ); \
|
||||
return __ret; \
|
||||
} \
|
||||
if (_entry->discard) { \
|
||||
DRM_ERROR( "DMAADVANCE() in %s: sending discarded pending buf %d\n", \
|
||||
__func__, _buf->idx ); \
|
||||
__FUNCTION__, _buf->idx ); \
|
||||
return DRM_ERR(EFAULT); \
|
||||
} \
|
||||
} else { \
|
||||
if (list_empty(&dev_priv->placeholders)) { \
|
||||
DRM_ERROR( "DMAADVANCE() in %s: empty placeholder list\n", \
|
||||
__func__ ); \
|
||||
__FUNCTION__ ); \
|
||||
return DRM_ERR(EFAULT); \
|
||||
} \
|
||||
ptr = dev_priv->placeholders.next; \
|
||||
@ -930,7 +930,7 @@ do { \
|
||||
int __ret; \
|
||||
if ( (__ret=mach64_find_pending_buf_entry(dev_priv, &_entry, _buf)) ) { \
|
||||
DRM_ERROR( "%s: couldn't find pending buf %d\n", \
|
||||
__func__, _buf->idx ); \
|
||||
__FUNCTION__, _buf->idx ); \
|
||||
return __ret; \
|
||||
} \
|
||||
} \
|
||||
@ -981,17 +981,17 @@ do { \
|
||||
RING_LOCALS; \
|
||||
\
|
||||
if ( MACH64_VERBOSE ) { \
|
||||
DRM_INFO( "DMAADVANCEHOSTDATA() in %s\n", __func__ ); \
|
||||
DRM_INFO( "DMAADVANCEHOSTDATA() in %s\n", __FUNCTION__ ); \
|
||||
} \
|
||||
\
|
||||
if (_buf->used <= 0) { \
|
||||
DRM_ERROR( "DMAADVANCEHOSTDATA() in %s: sending empty buf %d\n", \
|
||||
__func__, _buf->idx ); \
|
||||
__FUNCTION__, _buf->idx ); \
|
||||
return DRM_ERR(EFAULT); \
|
||||
} \
|
||||
if (list_empty(&dev_priv->placeholders)) { \
|
||||
DRM_ERROR( "%s: empty placeholder list in DMAADVANCEHOSTDATA()\n", \
|
||||
__func__ ); \
|
||||
__FUNCTION__ ); \
|
||||
return DRM_ERR(EFAULT); \
|
||||
} \
|
||||
\
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mach64_state.c,v 1.4 2007/12/15 00:39:31 perry Exp $ */
|
||||
/* $NetBSD: mach64_state.c,v 1.5 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* mach64_state.c -- State support for mach64 (Rage Pro) driver -*- linux-c -*-
|
||||
* Created: Sun Dec 03 19:20:26 2000 by gareth@valinux.com
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach64_state.c,v 1.4 2007/12/15 00:39:31 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach64_state.c,v 1.5 2008/07/07 00:31:30 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/mach64_state.c,v 1.2 2005/11/28 23:13:53 anholt Exp $");
|
||||
*/
|
||||
@ -102,7 +102,7 @@ static int mach64_emit_cliprect(DRMFILE filp, drm_mach64_private_t * dev_priv,
|
||||
drm_mach64_context_regs_t *regs = &sarea_priv->context_state;
|
||||
DMALOCALS;
|
||||
|
||||
DRM_DEBUG("%s: box=%p\n", __func__, box);
|
||||
DRM_DEBUG("%s: box=%p\n", __FUNCTION__, box);
|
||||
|
||||
/* Get GL scissor */
|
||||
/* FIXME: store scissor in SAREA as a cliprect instead of in
|
||||
@ -151,9 +151,9 @@ static __inline__ int mach64_emit_state(DRMFILE filp,
|
||||
DMALOCALS;
|
||||
|
||||
if (MACH64_VERBOSE) {
|
||||
mach64_print_dirty(__func__, dirty);
|
||||
mach64_print_dirty(__FUNCTION__, dirty);
|
||||
} else {
|
||||
DRM_DEBUG("%s: dirty=0x%08x\n", __func__, dirty);
|
||||
DRM_DEBUG("%s: dirty=0x%08x\n", __FUNCTION__, dirty);
|
||||
}
|
||||
|
||||
DMAGETPTR(filp, dev_priv, 17); /* returns on failure to get buffer */
|
||||
@ -235,7 +235,7 @@ static int mach64_dma_dispatch_clear(DRMFILE filp, drm_device_t * dev,
|
||||
int i;
|
||||
DMALOCALS;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
switch (dev_priv->fb_bpp) {
|
||||
case 16:
|
||||
@ -373,7 +373,7 @@ static int mach64_dma_dispatch_swap(DRMFILE filp, drm_device_t * dev)
|
||||
int i;
|
||||
DMALOCALS;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
switch (dev_priv->fb_bpp) {
|
||||
case 16:
|
||||
@ -450,7 +450,7 @@ static int mach64_do_get_frames_queued(drm_mach64_private_t * dev_priv)
|
||||
int i, start;
|
||||
u32 head, tail, ofs;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
if (sarea_priv->frames_queued == 0)
|
||||
return 0;
|
||||
@ -531,14 +531,14 @@ static __inline__ int copy_and_verify_from_user(u32 *to,
|
||||
to += count;
|
||||
} else {
|
||||
DRM_ERROR("%s: Got bad command: 0x%04x\n",
|
||||
__func__, reg);
|
||||
__FUNCTION__, reg);
|
||||
drm_free(orig_from, bytes, DRM_MEM_DRIVER);
|
||||
return DRM_ERR(EACCES);
|
||||
}
|
||||
} else {
|
||||
DRM_ERROR
|
||||
("%s: Got bad command count(=%u) dwords remaining=%lu\n",
|
||||
__func__, count, n);
|
||||
__FUNCTION__, count, n);
|
||||
drm_free(orig_from, bytes, DRM_MEM_DRIVER);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
@ -548,7 +548,7 @@ static __inline__ int copy_and_verify_from_user(u32 *to,
|
||||
if (n == 0)
|
||||
return 0;
|
||||
else {
|
||||
DRM_ERROR("%s: Bad buf->used(=%lu)\n", __func__, bytes);
|
||||
DRM_ERROR("%s: Bad buf->used(=%lu)\n", __FUNCTION__, bytes);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
}
|
||||
@ -565,7 +565,7 @@ static int mach64_dma_dispatch_vertex(DRMFILE filp, drm_device_t * dev,
|
||||
DMALOCALS;
|
||||
|
||||
DRM_DEBUG("%s: buf=%p used=%lu nbox=%d\n",
|
||||
__func__, buf, used, sarea_priv->nbox);
|
||||
__FUNCTION__, buf, used, sarea_priv->nbox);
|
||||
|
||||
if (used) {
|
||||
int ret = 0;
|
||||
@ -574,7 +574,7 @@ static int mach64_dma_dispatch_vertex(DRMFILE filp, drm_device_t * dev,
|
||||
copy_buf = mach64_freelist_get(dev_priv);
|
||||
if (copy_buf == NULL) {
|
||||
DRM_ERROR("%s: couldn't get buffer in DMAGETPTR\n",
|
||||
__func__);
|
||||
__FUNCTION__);
|
||||
return DRM_ERR(EAGAIN);
|
||||
}
|
||||
|
||||
@ -632,7 +632,7 @@ static int mach64_dma_dispatch_vertex(DRMFILE filp, drm_device_t * dev,
|
||||
if (copy_buf == entry->buf) {
|
||||
DRM_ERROR
|
||||
("%s: Trying to release a pending buf\n",
|
||||
__func__);
|
||||
__FUNCTION__);
|
||||
return DRM_ERR(EFAULT);
|
||||
}
|
||||
}
|
||||
@ -753,7 +753,7 @@ static int mach64_dma_dispatch_blit(DRMFILE filp, drm_device_t * dev,
|
||||
DMAOUTREG(MACH64_DST_X_Y, (blit->y << 16) | blit->x);
|
||||
DMAOUTREG(MACH64_DST_WIDTH_HEIGHT, (blit->height << 16) | blit->width);
|
||||
|
||||
DRM_DEBUG("%s: %d bytes\n", __func__, buf->used);
|
||||
DRM_DEBUG("%s: %d bytes\n", __FUNCTION__, buf->used);
|
||||
|
||||
/* Add the buffer to the queue */
|
||||
DMAADVANCEHOSTDATA(dev_priv);
|
||||
@ -773,7 +773,7 @@ int mach64_dma_clear(DRM_IOCTL_ARGS)
|
||||
drm_mach64_clear_t clear;
|
||||
int ret;
|
||||
|
||||
DRM_DEBUG("%s: pid=%d\n", __func__, DRM_CURRENTPID);
|
||||
DRM_DEBUG("%s: pid=%d\n", __FUNCTION__, DRM_CURRENTPID);
|
||||
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
@ -800,7 +800,7 @@ int mach64_dma_swap(DRM_IOCTL_ARGS)
|
||||
drm_mach64_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
||||
int ret;
|
||||
|
||||
DRM_DEBUG("%s: pid=%d\n", __func__, DRM_CURRENTPID);
|
||||
DRM_DEBUG("%s: pid=%d\n", __FUNCTION__, DRM_CURRENTPID);
|
||||
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
@ -825,7 +825,7 @@ int mach64_dma_vertex(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -833,7 +833,7 @@ int mach64_dma_vertex(DRM_IOCTL_ARGS)
|
||||
sizeof(vertex));
|
||||
|
||||
DRM_DEBUG("%s: pid=%d buf=%p used=%lu discard=%d\n",
|
||||
__func__, DRM_CURRENTPID,
|
||||
__FUNCTION__, DRM_CURRENTPID,
|
||||
vertex.buf, vertex.used, vertex.discard);
|
||||
|
||||
if (vertex.prim < 0 || vertex.prim > MACH64_PRIM_POLYGON) {
|
||||
@ -869,7 +869,7 @@ int mach64_dma_blit(DRM_IOCTL_ARGS)
|
||||
sizeof(blit));
|
||||
|
||||
DRM_DEBUG("%s: pid=%d index=%d\n",
|
||||
__func__, DRM_CURRENTPID, blit.idx);
|
||||
__FUNCTION__, DRM_CURRENTPID, blit.idx);
|
||||
|
||||
if (blit.idx < 0 || blit.idx >= dma->buf_count) {
|
||||
DRM_ERROR("buffer index %d (of %d max)\n",
|
||||
@ -894,10 +894,10 @@ int mach64_get_param(DRM_IOCTL_ARGS)
|
||||
drm_mach64_getparam_t param;
|
||||
int value;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mga_dma.c,v 1.4 2007/12/15 00:39:31 perry Exp $ */
|
||||
/* $NetBSD: mga_dma.c,v 1.5 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* mga_dma.c -- DMA support for mga g200/g400 -*- linux-c -*-
|
||||
* Created: Mon Dec 13 01:50:01 1999 by jhartmann@precisioninsight.com
|
||||
@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mga_dma.c,v 1.4 2007/12/15 00:39:31 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mga_dma.c,v 1.5 2008/07/07 00:31:30 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/mga_dma.c,v 1.13 2005/11/28 23:13:53 anholt Exp $");
|
||||
*/
|
||||
@ -1074,7 +1074,7 @@ int mga_dma_flush(DRM_IOCTL_ARGS)
|
||||
#if MGA_DMA_DEBUG
|
||||
int ret = mga_do_wait_for_idle(dev_priv);
|
||||
if (ret < 0)
|
||||
DRM_INFO("%s: -EBUSY\n", __func__);
|
||||
DRM_INFO("%s: -EBUSY\n", __FUNCTION__);
|
||||
return ret;
|
||||
#else
|
||||
return mga_do_wait_for_idle(dev_priv);
|
||||
|
@ -249,7 +249,7 @@ do { \
|
||||
} else if ( dev_priv->prim.space < \
|
||||
dev_priv->prim.high_mark ) { \
|
||||
if ( MGA_DMA_DEBUG ) \
|
||||
DRM_INFO( "%s: wrap...\n", __func__ ); \
|
||||
DRM_INFO( "%s: wrap...\n", __FUNCTION__ ); \
|
||||
return DRM_ERR(EBUSY); \
|
||||
} \
|
||||
} \
|
||||
@ -260,7 +260,7 @@ do { \
|
||||
if ( test_bit( 0, &dev_priv->prim.wrapped ) ) { \
|
||||
if ( mga_do_wait_for_idle( dev_priv ) < 0 ) { \
|
||||
if ( MGA_DMA_DEBUG ) \
|
||||
DRM_INFO( "%s: wrap...\n", __func__ ); \
|
||||
DRM_INFO( "%s: wrap...\n", __FUNCTION__ ); \
|
||||
return DRM_ERR(EBUSY); \
|
||||
} \
|
||||
mga_do_dma_wrap_end( dev_priv ); \
|
||||
@ -281,7 +281,7 @@ do { \
|
||||
do { \
|
||||
if ( MGA_VERBOSE ) { \
|
||||
DRM_INFO( "BEGIN_DMA( %d ) in %s\n", \
|
||||
(n), __func__ ); \
|
||||
(n), __FUNCTION__ ); \
|
||||
DRM_INFO( " space=0x%x req=0x%Zx\n", \
|
||||
dev_priv->prim.space, (n) * DMA_BLOCK_SIZE ); \
|
||||
} \
|
||||
@ -292,7 +292,7 @@ do { \
|
||||
#define BEGIN_DMA_WRAP() \
|
||||
do { \
|
||||
if ( MGA_VERBOSE ) { \
|
||||
DRM_INFO( "BEGIN_DMA() in %s\n", __func__ ); \
|
||||
DRM_INFO( "BEGIN_DMA() in %s\n", __FUNCTION__ ); \
|
||||
DRM_INFO( " space=0x%x\n", dev_priv->prim.space ); \
|
||||
} \
|
||||
prim = dev_priv->prim.start; \
|
||||
@ -311,7 +311,7 @@ do { \
|
||||
#define FLUSH_DMA() \
|
||||
do { \
|
||||
if ( 0 ) { \
|
||||
DRM_INFO( "%s:\n", __func__ ); \
|
||||
DRM_INFO( "%s:\n", __FUNCTION__ ); \
|
||||
DRM_INFO( " tail=0x%06x head=0x%06lx\n", \
|
||||
dev_priv->prim.tail, \
|
||||
MGA_READ( MGA_PRIMADDRESS ) - \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mga_state.c,v 1.5 2007/12/15 00:39:32 perry Exp $ */
|
||||
/* $NetBSD: mga_state.c,v 1.6 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* mga_state.c -- State support for MGA G200/G400 -*- linux-c -*-
|
||||
* Created: Thu Jan 27 02:53:43 2000 by jhartmann@precisioninsight.com
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mga_state.c,v 1.5 2007/12/15 00:39:32 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mga_state.c,v 1.6 2008/07/07 00:31:30 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/mga_state.c,v 1.11 2005/11/28 23:13:53 anholt Exp $");
|
||||
*/
|
||||
@ -656,7 +656,7 @@ static void mga_dma_dispatch_swap(drm_device_t * dev)
|
||||
|
||||
FLUSH_DMA();
|
||||
|
||||
DRM_DEBUG("%s... done.\n", __func__);
|
||||
DRM_DEBUG("%s... done.\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
static void mga_dma_dispatch_vertex(drm_device_t * dev, drm_buf_t * buf)
|
||||
@ -1019,7 +1019,7 @@ static int mga_dma_iload(DRM_IOCTL_ARGS)
|
||||
#if 0
|
||||
if (mga_do_wait_for_idle(dev_priv) < 0) {
|
||||
if (MGA_DMA_DEBUG)
|
||||
DRM_INFO("%s: -EBUSY\n", __func__);
|
||||
DRM_INFO("%s: -EBUSY\n", __FUNCTION__);
|
||||
return DRM_ERR(EBUSY);
|
||||
}
|
||||
#endif
|
||||
@ -1083,7 +1083,7 @@ static int mga_getparam(DRM_IOCTL_ARGS)
|
||||
int value;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -1119,7 +1119,7 @@ static int mga_set_fence(DRM_IOCTL_ARGS)
|
||||
DMA_LOCALS;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -1151,7 +1151,7 @@ static int mga_wait_fence(DRM_IOCTL_ARGS)
|
||||
u32 fence;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: r128_cce.c,v 1.6 2008/05/02 01:29:36 bjs Exp $ */
|
||||
/* $NetBSD: r128_cce.c,v 1.7 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* r128_cce.c -- ATI Rage 128 driver -*- linux-c -*-
|
||||
* Created: Wed Apr 5 19:24:19 2000 by kevin@precisioninsight.com
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: r128_cce.c,v 1.6 2008/05/02 01:29:36 bjs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: r128_cce.c,v 1.7 2008/07/07 00:31:30 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/r128_cce.c,v 1.14 2005/11/28 23:13:53 anholt Exp $");
|
||||
*/
|
||||
@ -662,7 +662,7 @@ int r128_cce_start(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (dev_priv->cce_running || dev_priv->cce_mode == R128_PM4_NONPM4) {
|
||||
DRM_DEBUG("%s while CCE running\n", __func__);
|
||||
DRM_DEBUG("%s while CCE running\n", __FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -726,7 +726,7 @@ int r128_cce_reset(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_DEBUG("%s called before init done\n", __func__);
|
||||
DRM_DEBUG("%s called before init done\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
|
@ -465,7 +465,7 @@ do { \
|
||||
#define BEGIN_RING( n ) do { \
|
||||
if ( R128_VERBOSE ) { \
|
||||
DRM_INFO( "BEGIN_RING( %d ) in %s\n", \
|
||||
(n), __func__ ); \
|
||||
(n), __FUNCTION__ ); \
|
||||
} \
|
||||
if ( dev_priv->ring.space <= (n) * sizeof(u32) ) { \
|
||||
COMMIT_RING(); \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: r128_state.c,v 1.4 2007/12/15 00:39:33 perry Exp $ */
|
||||
/* $NetBSD: r128_state.c,v 1.5 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* r128_state.c -- State support for r128 -*- linux-c -*-
|
||||
* Created: Thu Jan 27 02:53:43 2000 by gareth@valinux.com
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: r128_state.c,v 1.4 2007/12/15 00:39:33 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: r128_state.c,v 1.5 2008/07/07 00:31:30 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/r128_state.c,v 1.13 2005/11/28 23:13:53 anholt Exp $");
|
||||
*/
|
||||
@ -50,7 +50,7 @@ static void r128_emit_clip_rects(drm_r128_private_t * dev_priv,
|
||||
{
|
||||
u32 aux_sc_cntl = 0x00000000;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG(" %s\n", __func__);
|
||||
DRM_DEBUG(" %s\n", __FUNCTION__);
|
||||
|
||||
BEGIN_RING((count < 3 ? count : 3) * 5 + 2);
|
||||
|
||||
@ -93,7 +93,7 @@ static __inline__ void r128_emit_core(drm_r128_private_t * dev_priv)
|
||||
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
||||
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG(" %s\n", __func__);
|
||||
DRM_DEBUG(" %s\n", __FUNCTION__);
|
||||
|
||||
BEGIN_RING(2);
|
||||
|
||||
@ -108,7 +108,7 @@ static __inline__ void r128_emit_context(drm_r128_private_t * dev_priv)
|
||||
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
||||
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG(" %s\n", __func__);
|
||||
DRM_DEBUG(" %s\n", __FUNCTION__);
|
||||
|
||||
BEGIN_RING(13);
|
||||
|
||||
@ -134,7 +134,7 @@ static __inline__ void r128_emit_setup(drm_r128_private_t * dev_priv)
|
||||
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
||||
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG(" %s\n", __func__);
|
||||
DRM_DEBUG(" %s\n", __FUNCTION__);
|
||||
|
||||
BEGIN_RING(3);
|
||||
|
||||
@ -150,7 +150,7 @@ static __inline__ void r128_emit_masks(drm_r128_private_t * dev_priv)
|
||||
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
||||
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG(" %s\n", __func__);
|
||||
DRM_DEBUG(" %s\n", __FUNCTION__);
|
||||
|
||||
BEGIN_RING(5);
|
||||
|
||||
@ -169,7 +169,7 @@ static __inline__ void r128_emit_window(drm_r128_private_t * dev_priv)
|
||||
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
||||
drm_r128_context_regs_t *ctx = &sarea_priv->context_state;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG(" %s\n", __func__);
|
||||
DRM_DEBUG(" %s\n", __FUNCTION__);
|
||||
|
||||
BEGIN_RING(2);
|
||||
|
||||
@ -186,7 +186,7 @@ static __inline__ void r128_emit_tex0(drm_r128_private_t * dev_priv)
|
||||
drm_r128_texture_regs_t *tex = &sarea_priv->tex_state[0];
|
||||
int i;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG(" %s\n", __func__);
|
||||
DRM_DEBUG(" %s\n", __FUNCTION__);
|
||||
|
||||
BEGIN_RING(7 + R128_MAX_TEXTURE_LEVELS);
|
||||
|
||||
@ -212,7 +212,7 @@ static __inline__ void r128_emit_tex1(drm_r128_private_t * dev_priv)
|
||||
drm_r128_texture_regs_t *tex = &sarea_priv->tex_state[1];
|
||||
int i;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG(" %s\n", __func__);
|
||||
DRM_DEBUG(" %s\n", __FUNCTION__);
|
||||
|
||||
BEGIN_RING(5 + R128_MAX_TEXTURE_LEVELS);
|
||||
|
||||
@ -234,7 +234,7 @@ static __inline__ void r128_emit_state(drm_r128_private_t * dev_priv)
|
||||
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
||||
unsigned int dirty = sarea_priv->dirty;
|
||||
|
||||
DRM_DEBUG("%s: dirty=0x%08x\n", __func__, dirty);
|
||||
DRM_DEBUG("%s: dirty=0x%08x\n", __FUNCTION__, dirty);
|
||||
|
||||
if (dirty & R128_UPLOAD_CORE) {
|
||||
r128_emit_core(dev_priv);
|
||||
@ -370,7 +370,7 @@ static void r128_cce_dispatch_clear(drm_device_t * dev,
|
||||
unsigned int flags = clear->flags;
|
||||
int i;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
if (dev_priv->page_flipping && dev_priv->current_page == 1) {
|
||||
unsigned int tmp = flags;
|
||||
@ -474,7 +474,7 @@ static void r128_cce_dispatch_swap(drm_device_t * dev)
|
||||
drm_clip_rect_t *pbox = sarea_priv->boxes;
|
||||
int i;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
#if R128_PERFORMANCE_BOXES
|
||||
/* Do some trivial performance monitoring...
|
||||
@ -537,7 +537,7 @@ static void r128_cce_dispatch_flip(drm_device_t * dev)
|
||||
drm_r128_private_t *dev_priv = dev->dev_private;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG("%s: page=%d pfCurrentPage=%d\n",
|
||||
__func__,
|
||||
__FUNCTION__,
|
||||
dev_priv->current_page, dev_priv->sarea_priv->pfCurrentPage);
|
||||
|
||||
#if R128_PERFORMANCE_BOXES
|
||||
@ -1163,7 +1163,7 @@ static int r128_cce_dispatch_read_pixels(drm_device_t * dev,
|
||||
int count, *x, *y;
|
||||
int i, xbuf_size, ybuf_size;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
count = depth->n;
|
||||
if (count > 4096 || count <= 0)
|
||||
@ -1233,7 +1233,7 @@ static void r128_cce_dispatch_stipple(drm_device_t * dev, u32 * stipple)
|
||||
drm_r128_private_t *dev_priv = dev->dev_private;
|
||||
int i;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
BEGIN_RING(33);
|
||||
|
||||
@ -1321,7 +1321,7 @@ static int r128_cce_flip(DRM_IOCTL_ARGS)
|
||||
{
|
||||
DRM_DEVICE;
|
||||
drm_r128_private_t *dev_priv = dev->dev_private;
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
@ -1341,7 +1341,7 @@ static int r128_cce_swap(DRM_IOCTL_ARGS)
|
||||
DRM_DEVICE;
|
||||
drm_r128_private_t *dev_priv = dev->dev_private;
|
||||
drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
@ -1370,7 +1370,7 @@ static int r128_cce_vertex(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -1430,7 +1430,7 @@ static int r128_cce_indices(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -1590,7 +1590,7 @@ static int r128_cce_indirect(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -1658,7 +1658,7 @@ static int r128_getparam(DRM_IOCTL_ARGS)
|
||||
int value;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: radeon_cp.c,v 1.8 2008/05/02 01:29:36 bjs Exp $ */
|
||||
/* $NetBSD: radeon_cp.c,v 1.9 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* radeon_cp.c -- CP support for Radeon -*- linux-c -*- */
|
||||
/*-
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: radeon_cp.c,v 1.8 2008/05/02 01:29:36 bjs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: radeon_cp.c,v 1.9 2008/07/07 00:31:30 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/radeon_cp.c,v 1.19 2006/09/07 23:04:47 anholt Exp $");
|
||||
*/
|
||||
@ -850,7 +850,7 @@ static u32 RADEON_READ_IGPGART(drm_radeon_private_t *dev_priv, int addr)
|
||||
#if RADEON_FIFO_DEBUG
|
||||
static void radeon_status(drm_radeon_private_t * dev_priv)
|
||||
{
|
||||
printf("%s:\n", __func__);
|
||||
printf("%s:\n", __FUNCTION__);
|
||||
printf("RBBM_STATUS = 0x%08x\n",
|
||||
(unsigned int)RADEON_READ(RADEON_RBBM_STATUS));
|
||||
printf("CP_RB_RTPR = 0x%08x\n",
|
||||
@ -1866,12 +1866,12 @@ int radeon_cp_start(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (dev_priv->cp_running) {
|
||||
DRM_DEBUG("%s while CP running\n", __func__);
|
||||
DRM_DEBUG("%s while CP running\n", __FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
if (dev_priv->cp_mode == RADEON_CSQ_PRIDIS_INDDIS) {
|
||||
DRM_DEBUG("%s called with bogus CP mode (%d)\n",
|
||||
__func__, dev_priv->cp_mode);
|
||||
__FUNCTION__, dev_priv->cp_mode);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1987,7 +1987,7 @@ int radeon_cp_reset(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_DEBUG("%s called before init done\n", __func__);
|
||||
DRM_DEBUG("%s called before init done\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
|
@ -1173,7 +1173,7 @@ do { \
|
||||
#define BEGIN_RING( n ) do { \
|
||||
if ( RADEON_VERBOSE ) { \
|
||||
DRM_INFO( "BEGIN_RING( %d ) in %s\n", \
|
||||
n, __func__ ); \
|
||||
n, __FUNCTION__ ); \
|
||||
} \
|
||||
if ( dev_priv->ring.space <= (n) * sizeof(u32) ) { \
|
||||
COMMIT_RING(); \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: radeon_irq.c,v 1.6 2008/05/19 00:15:44 bjs Exp $ */
|
||||
/* $NetBSD: radeon_irq.c,v 1.7 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* radeon_irq.c -- IRQ handling for radeon -*- linux-c -*- */
|
||||
/*-
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: radeon_irq.c,v 1.6 2008/05/19 00:15:44 bjs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: radeon_irq.c,v 1.7 2008/07/07 00:31:30 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/radeon_irq.c,v 1.7 2005/11/28 23:13:54 anholt Exp $");
|
||||
*/
|
||||
@ -143,7 +143,7 @@ int radeon_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence)
|
||||
int ret = 0;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ int radeon_irq_emit(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ int radeon_irq_wait(DRM_IOCTL_ARGS)
|
||||
drm_radeon_irq_wait_t irqwait;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: radeon_mem.c,v 1.4 2007/12/15 00:39:34 perry Exp $ */
|
||||
/* $NetBSD: radeon_mem.c,v 1.5 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* radeon_mem.c -- Simple GART/fb memory manager for radeon -*- linux-c -*- */
|
||||
/*-
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: radeon_mem.c,v 1.4 2007/12/15 00:39:34 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: radeon_mem.c,v 1.5 2008/07/07 00:31:30 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/radeon_mem.c,v 1.8 2005/11/28 23:13:54 anholt Exp $");
|
||||
*/
|
||||
@ -233,7 +233,7 @@ int radeon_mem_alloc(DRM_IOCTL_ARGS)
|
||||
struct mem_block *block, **heap;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ int radeon_mem_free(DRM_IOCTL_ARGS)
|
||||
struct mem_block *block, **heap;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -301,7 +301,7 @@ int radeon_mem_init_heap(DRM_IOCTL_ARGS)
|
||||
struct mem_block **heap;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: radeon_state.c,v 1.7 2008/05/02 01:29:36 bjs Exp $ */
|
||||
/* $NetBSD: radeon_state.c,v 1.8 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* radeon_state.c -- State support for Radeon -*- linux-c -*- */
|
||||
/*-
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: radeon_state.c,v 1.7 2008/05/02 01:29:36 bjs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: radeon_state.c,v 1.8 2008/07/07 00:31:30 mrg Exp $");
|
||||
/*
|
||||
__FBSDID("$FreeBSD: src/sys/dev/drm/radeon_state.c,v 1.22 2006/09/07 23:04:47 anholt Exp $");
|
||||
*/
|
||||
@ -1324,7 +1324,7 @@ static void radeon_cp_dispatch_flip(drm_device_t * dev)
|
||||
? dev_priv->front_offset : dev_priv->back_offset;
|
||||
RING_LOCALS;
|
||||
DRM_DEBUG("%s: pfCurrentPage=%d\n",
|
||||
__func__,
|
||||
__FUNCTION__,
|
||||
dev_priv->sarea_priv->pfCurrentPage);
|
||||
|
||||
/* Do some trivial performance monitoring...
|
||||
@ -1986,7 +1986,7 @@ static int radeon_surface_alloc(DRM_IOCTL_ARGS)
|
||||
drm_radeon_surface_alloc_t alloc;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -2007,7 +2007,7 @@ static int radeon_surface_free(DRM_IOCTL_ARGS)
|
||||
drm_radeon_surface_free_t memfree;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -2133,7 +2133,7 @@ static int radeon_cp_vertex(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -2224,7 +2224,7 @@ static int radeon_cp_indices(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
sarea_priv = dev_priv->sarea_priv;
|
||||
@ -2375,7 +2375,7 @@ static int radeon_cp_indirect(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -2452,7 +2452,7 @@ static int radeon_cp_vertex2(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -2762,7 +2762,7 @@ static int radeon_emit_wait(drm_device_t * dev, int flags)
|
||||
drm_radeon_private_t *dev_priv = dev->dev_private;
|
||||
RING_LOCALS;
|
||||
|
||||
DRM_DEBUG("%s: %x\n", __func__, flags);
|
||||
DRM_DEBUG("%s: %x\n", __FUNCTION__, flags);
|
||||
switch (flags) {
|
||||
case RADEON_WAIT_2D:
|
||||
BEGIN_RING(2);
|
||||
@ -2802,7 +2802,7 @@ static int radeon_cp_cmdbuf(DRM_IOCTL_ARGS)
|
||||
LOCK_TEST_WITH_RETURN(dev, filp);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -2969,7 +2969,7 @@ static int radeon_cp_getparam(DRM_IOCTL_ARGS)
|
||||
int value;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -3059,7 +3059,7 @@ static int radeon_cp_setparam(DRM_IOCTL_ARGS)
|
||||
struct drm_radeon_driver_file_fields *radeon_priv;
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: via_dma.c,v 1.3 2007/12/15 00:39:34 perry Exp $ */
|
||||
/* $NetBSD: via_dma.c,v 1.4 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* via_dma.c -- DMA support for the VIA Unichrome/Pro
|
||||
*
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: via_dma.c,v 1.3 2007/12/15 00:39:34 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: via_dma.c,v 1.4 2008/07/07 00:31:30 mrg Exp $");
|
||||
|
||||
#include <dev/drm/drmP.h>
|
||||
#include <dev/drm/drm.h>
|
||||
@ -173,13 +173,13 @@ static int via_initialize(drm_device_t * dev,
|
||||
|
||||
if (dev_priv->ring.virtual_start != NULL) {
|
||||
DRM_ERROR("%s called again without calling cleanup\n",
|
||||
__func__);
|
||||
__FUNCTION__);
|
||||
return DRM_ERR(EFAULT);
|
||||
}
|
||||
|
||||
if (!dev->agp || !dev->agp->base) {
|
||||
DRM_ERROR("%s called with no agp memory available\n",
|
||||
__func__);
|
||||
__FUNCTION__);
|
||||
return DRM_ERR(EFAULT);
|
||||
}
|
||||
|
||||
@ -267,7 +267,7 @@ static int via_dispatch_cmdbuffer(drm_device_t * dev, drm_via_cmdbuffer_t * cmd)
|
||||
|
||||
if (dev_priv->ring.virtual_start == NULL) {
|
||||
DRM_ERROR("%s called without initializing AGP ring buffer.\n",
|
||||
__func__);
|
||||
__FUNCTION__);
|
||||
return DRM_ERR(EFAULT);
|
||||
}
|
||||
|
||||
@ -670,7 +670,7 @@ static int via_cmdbuf_size(DRM_IOCTL_ARGS)
|
||||
|
||||
if (dev_priv->ring.virtual_start == NULL) {
|
||||
DRM_ERROR("%s called without initializing AGP ring buffer.\n",
|
||||
__func__);
|
||||
__FUNCTION__);
|
||||
return DRM_ERR(EFAULT);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: via_irq.c,v 1.5 2008/05/19 00:15:44 bjs Exp $ */
|
||||
/* $NetBSD: via_irq.c,v 1.6 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/* via_irq.c
|
||||
*
|
||||
@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: via_irq.c,v 1.5 2008/05/19 00:15:44 bjs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: via_irq.c,v 1.6 2008/07/07 00:31:30 mrg Exp $");
|
||||
|
||||
#include <dev/drm/drmP.h>
|
||||
#include <dev/drm/drm.h>
|
||||
@ -185,7 +185,7 @@ int via_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence)
|
||||
|
||||
DRM_DEBUG("viadrv_vblank_wait\n");
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -215,15 +215,15 @@ via_driver_irq_wait(drm_device_t * dev, unsigned int irq, int force_sequence,
|
||||
maskarray_t *masks;
|
||||
int real_irq;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
if (!dev_priv) {
|
||||
DRM_ERROR("%s called with no initialization\n", __func__);
|
||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
if (irq >= drm_via_irq_num ) {
|
||||
DRM_ERROR("%s Trying to wait on unknown irq %d\n", __func__,
|
||||
DRM_ERROR("%s Trying to wait on unknown irq %d\n", __FUNCTION__,
|
||||
irq);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
@ -232,7 +232,7 @@ via_driver_irq_wait(drm_device_t * dev, unsigned int irq, int force_sequence,
|
||||
|
||||
if (real_irq < 0) {
|
||||
DRM_ERROR("%s Video IRQ %d not available on this hardware.\n",
|
||||
__func__, irq);
|
||||
__FUNCTION__, irq);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
@ -362,7 +362,7 @@ int via_wait_irq(DRM_IOCTL_ARGS)
|
||||
|
||||
DRM_COPY_FROM_USER_IOCTL(irqwait, argp, sizeof(irqwait));
|
||||
if (irqwait.request.irq >= dev_priv->num_irqs) {
|
||||
DRM_ERROR("%s Trying to wait on unknown irq %d\n", __func__,
|
||||
DRM_ERROR("%s Trying to wait on unknown irq %d\n", __FUNCTION__,
|
||||
irqwait.request.irq);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
@ -381,7 +381,7 @@ int via_wait_irq(DRM_IOCTL_ARGS)
|
||||
|
||||
if (irqwait.request.type & VIA_IRQ_SIGNAL) {
|
||||
DRM_ERROR("%s Signals on Via IRQs not implemented yet.\n",
|
||||
__func__);
|
||||
__FUNCTION__);
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: via_map.c,v 1.3 2007/12/15 00:39:35 perry Exp $ */
|
||||
/* $NetBSD: via_map.c,v 1.4 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
|
||||
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: via_map.c,v 1.3 2007/12/15 00:39:35 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: via_map.c,v 1.4 2008/07/07 00:31:30 mrg Exp $");
|
||||
|
||||
#include <dev/drm/drmP.h>
|
||||
#include <dev/pci/drm/via_drm.h>
|
||||
@ -36,7 +36,7 @@ static int via_do_init_map(drm_device_t * dev, drm_via_init_t * init)
|
||||
drm_via_private_t *dev_priv = dev->dev_private;
|
||||
int ret = 0;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
DRM_GETSAREA();
|
||||
if (!dev_priv->sarea) {
|
||||
@ -102,7 +102,7 @@ int via_map_init(DRM_IOCTL_ARGS)
|
||||
DRM_DEVICE;
|
||||
drm_via_init_t init;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
DRM_COPY_FROM_USER_IOCTL(init, (drm_via_init_t __user *) data,
|
||||
sizeof(init));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: via_video.c,v 1.5 2008/05/19 00:15:44 bjs Exp $ */
|
||||
/* $NetBSD: via_video.c,v 1.6 2008/07/07 00:31:30 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2005 Thomas Hellstrom. All Rights Reserved.
|
||||
@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: via_video.c,v 1.5 2008/05/19 00:15:44 bjs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: via_video.c,v 1.6 2008/07/07 00:31:30 mrg Exp $");
|
||||
|
||||
#include <dev/drm/drmP.h>
|
||||
#include <dev/pci/drm/via_drm.h>
|
||||
@ -38,7 +38,7 @@ void via_init_futex(drm_via_private_t * dev_priv)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
for (i = 0; i < VIA_NR_XVMC_LOCKS; ++i) {
|
||||
DRM_INIT_WAITQUEUE(&(dev_priv->decoder_queue[i]));
|
||||
@ -79,7 +79,7 @@ int via_decoder_futex(DRM_IOCTL_ARGS)
|
||||
drm_via_sarea_t *sAPriv = dev_priv->sarea_priv;
|
||||
int ret = 0;
|
||||
|
||||
DRM_DEBUG("%s\n", __func__);
|
||||
DRM_DEBUG("%s\n", __FUNCTION__);
|
||||
|
||||
DRM_COPY_FROM_USER_IOCTL(fx, (drm_via_futex_t __user *) data,
|
||||
sizeof(fx));
|
||||
|
Loading…
Reference in New Issue
Block a user