diff options
author | anholt <anholt@FreeBSD.org> | 2002-05-31 23:19:50 +0000 |
---|---|---|
committer | anholt <anholt@FreeBSD.org> | 2002-05-31 23:19:50 +0000 |
commit | b1848cc8d244b95193cdec9bd23e1bd837c4a03c (patch) | |
tree | f8c216beb294e0702ffab9c769c9f9060eedf0e8 | |
parent | c83ce35c4a5b4f3347fe5e2337b74d6099d64c08 (diff) | |
download | FreeBSD-src-b1848cc8d244b95193cdec9bd23e1bd837c4a03c.zip FreeBSD-src-b1848cc8d244b95193cdec9bd23e1bd837c4a03c.tar.gz |
Warnings cleanup for gcc3. Also __FUNCTION__ -> __func__
Approved by: des
-rw-r--r-- | sys/dev/drm/drm_dma.h | 4 | ||||
-rw-r--r-- | sys/dev/drm/drm_os_freebsd.h | 19 | ||||
-rw-r--r-- | sys/dev/drm/drm_scatter.h | 2 | ||||
-rw-r--r-- | sys/dev/drm/gamma_drv.h | 2 | ||||
-rw-r--r-- | sys/dev/drm/mga_dma.c | 36 | ||||
-rw-r--r-- | sys/dev/drm/mga_drv.h | 15 | ||||
-rw-r--r-- | sys/dev/drm/mga_state.c | 16 | ||||
-rw-r--r-- | sys/dev/drm/r128_cce.c | 32 | ||||
-rw-r--r-- | sys/dev/drm/r128_drv.h | 12 | ||||
-rw-r--r-- | sys/dev/drm/r128_state.c | 54 | ||||
-rw-r--r-- | sys/dev/drm/radeon_cp.c | 40 | ||||
-rw-r--r-- | sys/dev/drm/radeon_drv.h | 14 | ||||
-rw-r--r-- | sys/dev/drm/radeon_state.c | 50 |
13 files changed, 148 insertions, 148 deletions
diff --git a/sys/dev/drm/drm_dma.h b/sys/dev/drm/drm_dma.h index e5e9948..0ca180b 100644 --- a/sys/dev/drm/drm_dma.h +++ b/sys/dev/drm/drm_dma.h @@ -573,7 +573,7 @@ int DRM(irq_install)( drm_device_t *dev, int irq ) dev->irq = irq; DRM_OS_UNLOCK; - DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, irq ); + DRM_DEBUG( "%s: irq=%d\n", __func__, irq ); dev->context_flag = 0; dev->interrupt_flag = 0; @@ -642,7 +642,7 @@ int DRM(irq_uninstall)( drm_device_t *dev ) if ( !irq ) return DRM_OS_ERR(EINVAL); - DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, irq ); + DRM_DEBUG( "%s: irq=%d\n", __func__, irq ); DRIVER_UNINSTALL(); diff --git a/sys/dev/drm/drm_os_freebsd.h b/sys/dev/drm/drm_os_freebsd.h index c2bb845..7672f18 100644 --- a/sys/dev/drm/drm_os_freebsd.h +++ b/sys/dev/drm/drm_os_freebsd.h @@ -119,7 +119,7 @@ do { \ #define DRM_OS_READMEMORYBARRIER \ { \ int xchangeDummy; \ - DRM_DEBUG("%s\n", __FUNCTION__); \ + DRM_DEBUG("%s\n", __func__); \ __asm__ volatile(" push %%eax ; xchg %%eax, %0 ; pop %%eax" : : "m" (xchangeDummy)); \ __asm__ volatile(" push %%eax ; push %%ebx ; push %%ecx ; push %%edx ;" \ " movl $0,%%eax ; cpuid ; pop %%edx ; pop %%ecx ; pop %%ebx ;" \ @@ -242,18 +242,19 @@ find_first_zero_bit(volatile unsigned long *p, int max) /* Macros to make printf easier */ #define DRM_ERROR(fmt, arg...) \ - printf("error: " "[" DRM_NAME ":" __FUNCTION__ "] *ERROR* " fmt , ##arg) + printf("error: [" DRM_NAME ":%s] *ERROR* " fmt , \ + __func__, ##arg) #define DRM_MEM_ERROR(area, fmt, arg...) \ - printf("error: " "[" DRM_NAME ":" __FUNCTION__ ":%s] *ERROR* " fmt , \ - DRM(mem_stats)[area].name , ##arg) + printf("error: [" DRM_NAME ":%s:%s] *ERROR* " fmt , \ + __func__, DRM(mem_stats)[area].name , ##arg) #define DRM_INFO(fmt, arg...) printf("info: " "[" DRM_NAME "] " fmt , ##arg) #if DRM_DEBUG_CODE -#define DRM_DEBUG(fmt, arg...) \ - do { \ - if (DRM(flags) & DRM_FLAG_DEBUG) \ - printf("[" DRM_NAME ":" __FUNCTION__ "] " fmt , \ - ##arg); \ +#define DRM_DEBUG(fmt, arg...) \ + do { \ + if (DRM(flags) & DRM_FLAG_DEBUG) \ + printf("[" DRM_NAME ":%s] " fmt , \ + __func__, ##arg); \ } while (0) #else #define DRM_DEBUG(fmt, arg...) do { } while (0) diff --git a/sys/dev/drm/drm_scatter.h b/sys/dev/drm/drm_scatter.h index c089704..d7f090f 100644 --- a/sys/dev/drm/drm_scatter.h +++ b/sys/dev/drm/drm_scatter.h @@ -72,7 +72,7 @@ int DRM(sg_alloc)( struct inode *inode, struct file *filp, pmd_t *pmd; pte_t *pte; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); if ( dev->sg ) return DRM_OS_ERR(EINVAL); diff --git a/sys/dev/drm/gamma_drv.h b/sys/dev/drm/gamma_drv.h index f6a8978..255c361 100644 --- a/sys/dev/drm/gamma_drv.h +++ b/sys/dev/drm/gamma_drv.h @@ -47,7 +47,7 @@ do { \ if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \ dev->lock.pid != DRM_OS_CURRENTPID ) { \ DRM_ERROR( "%s called without lock held\n", \ - __FUNCTION__ ); \ + __func__ ); \ return DRM_OS_ERR(EINVAL); \ } \ } while (0) diff --git a/sys/dev/drm/mga_dma.c b/sys/dev/drm/mga_dma.c index 83bbfe9..c6c2236 100644 --- a/sys/dev/drm/mga_dma.c +++ b/sys/dev/drm/mga_dma.c @@ -58,7 +58,7 @@ int mga_do_wait_for_idle( drm_mga_private_t *dev_priv ) { u32 status = 0; int i; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); for ( i = 0 ; i < dev_priv->usec_timeout ; i++ ) { status = MGA_READ( MGA_STATUS ) & MGA_ENGINE_IDLE_MASK; @@ -80,7 +80,7 @@ int mga_do_dma_idle( drm_mga_private_t *dev_priv ) { u32 status = 0; int i; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); for ( i = 0 ; i < dev_priv->usec_timeout ; i++ ) { status = MGA_READ( MGA_STATUS ) & MGA_DMA_IDLE_MASK; @@ -99,7 +99,7 @@ int mga_do_dma_reset( drm_mga_private_t *dev_priv ) drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_mga_primary_buffer_t *primary = &dev_priv->prim; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); /* The primary DMA stream should look like new right about now. */ @@ -120,7 +120,7 @@ int mga_do_dma_reset( drm_mga_private_t *dev_priv ) int mga_do_engine_reset( drm_mga_private_t *dev_priv ) { - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); /* Okay, so we've completely screwed up and locked the engine. * How about we clean up after ourselves? @@ -165,7 +165,7 @@ void mga_do_dma_flush( drm_mga_private_t *dev_priv ) drm_mga_primary_buffer_t *primary = &dev_priv->prim; u32 head, tail; DMA_LOCALS; - DRM_DEBUG( "%s:\n", __FUNCTION__ ); + DRM_DEBUG( "%s:\n", __func__ ); if ( primary->tail == primary->last_flush ) { DRM_DEBUG( " bailing out...\n" ); @@ -204,7 +204,7 @@ void mga_do_dma_flush( drm_mga_private_t *dev_priv ) mga_flush_write_combine(); MGA_WRITE( MGA_PRIMEND, tail | MGA_PAGPXFER ); - DRM_DEBUG( "%s: done.\n", __FUNCTION__ ); + DRM_DEBUG( "%s: done.\n", __func__ ); } void mga_do_dma_wrap_start( drm_mga_private_t *dev_priv ) @@ -212,7 +212,7 @@ void mga_do_dma_wrap_start( drm_mga_private_t *dev_priv ) drm_mga_primary_buffer_t *primary = &dev_priv->prim; u32 head, tail; DMA_LOCALS; - DRM_DEBUG( "%s:\n", __FUNCTION__ ); + DRM_DEBUG( "%s:\n", __func__ ); BEGIN_DMA_WRAP(); @@ -247,7 +247,7 @@ void mga_do_dma_wrap_start( drm_mga_private_t *dev_priv ) MGA_WRITE( MGA_PRIMEND, tail | MGA_PAGPXFER ); set_bit( 0, &primary->wrapped ); - DRM_DEBUG( "%s: done.\n", __FUNCTION__ ); + DRM_DEBUG( "%s: done.\n", __func__ ); } void mga_do_dma_wrap_end( drm_mga_private_t *dev_priv ) @@ -255,7 +255,7 @@ void mga_do_dma_wrap_end( drm_mga_private_t *dev_priv ) drm_mga_primary_buffer_t *primary = &dev_priv->prim; drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv; u32 head = dev_priv->primary->offset; - DRM_DEBUG( "%s:\n", __FUNCTION__ ); + DRM_DEBUG( "%s:\n", __func__ ); sarea_priv->last_wrap++; DRM_DEBUG( " wrap = %d\n", sarea_priv->last_wrap ); @@ -264,7 +264,7 @@ void mga_do_dma_wrap_end( drm_mga_private_t *dev_priv ) MGA_WRITE( MGA_PRIMADDRESS, head | MGA_DMA_GENERAL ); clear_bit( 0, &primary->wrapped ); - DRM_DEBUG( "%s: done.\n", __FUNCTION__ ); + DRM_DEBUG( "%s: done.\n", __func__ ); } @@ -305,7 +305,7 @@ static int mga_freelist_init( drm_device_t *dev, drm_mga_private_t *dev_priv ) drm_mga_freelist_t *entry; int i; DRM_DEBUG( "%s: count=%d\n", - __FUNCTION__, dma->buf_count ); + __func__, dma->buf_count ); dev_priv->head = DRM(alloc)( sizeof(drm_mga_freelist_t), DRM_MEM_DRIVER ); @@ -351,7 +351,7 @@ static void mga_freelist_cleanup( drm_device_t *dev ) drm_mga_private_t *dev_priv = dev->dev_private; drm_mga_freelist_t *entry; drm_mga_freelist_t *next; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); entry = dev_priv->head; while ( entry ) { @@ -389,7 +389,7 @@ static drm_buf_t *mga_freelist_get( drm_device_t *dev ) drm_mga_freelist_t *prev; drm_mga_freelist_t *tail = dev_priv->tail; u32 head, wrap; - DRM_DEBUG( "%s:\n", __FUNCTION__ ); + DRM_DEBUG( "%s:\n", __func__ ); head = MGA_READ( MGA_PRIMADDRESS ); wrap = dev_priv->sarea_priv->last_wrap; @@ -422,7 +422,7 @@ int mga_freelist_put( drm_device_t *dev, drm_buf_t *buf ) drm_mga_freelist_t *head, *entry, *prev; DRM_DEBUG( "%s: age=0x%06lx wrap=%d\n", - __FUNCTION__, + __func__, buf_priv->list_entry->age.head - dev_priv->primary->offset, buf_priv->list_entry->age.wrap ); @@ -462,7 +462,7 @@ static int mga_do_init_dma( drm_device_t *dev, drm_mga_init_t *init ) drm_map_list_entry_t *listentry; #endif /* __FreeBSD__ */ int ret; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); dev_priv = DRM(alloc)( sizeof(drm_mga_private_t), DRM_MEM_DRIVER ); if ( !dev_priv ) @@ -667,7 +667,7 @@ static int mga_do_init_dma( drm_device_t *dev, drm_mga_init_t *init ) int mga_do_cleanup_dma( drm_device_t *dev ) { - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); if ( dev->dev_private ) { drm_mga_private_t *dev_priv = dev->dev_private; @@ -721,7 +721,7 @@ int mga_dma_flush( DRM_OS_IOCTL ) DRM_OS_KRNFROMUSR( lock, (drm_lock_t *) data, sizeof(lock) ); DRM_DEBUG( "%s: %s%s%s\n", - __FUNCTION__, + __func__, (lock.flags & _DRM_LOCK_FLUSH) ? "flush, " : "", (lock.flags & _DRM_LOCK_FLUSH_ALL) ? "flush all, " : "", (lock.flags & _DRM_LOCK_QUIESCENT) ? "idle, " : "" ); @@ -736,7 +736,7 @@ int mga_dma_flush( DRM_OS_IOCTL ) #if MGA_DMA_DEBUG int ret = mga_do_wait_for_idle( dev_priv ); if ( ret ) - DRM_INFO( __FUNCTION__": -EBUSY\n" ); + DRM_INFO( "%s: -EBUSY\n", __func__ ); return ret; #else return mga_do_wait_for_idle( dev_priv ); diff --git a/sys/dev/drm/mga_drv.h b/sys/dev/drm/mga_drv.h index 9483068..be8ecf9 100644 --- a/sys/dev/drm/mga_drv.h +++ b/sys/dev/drm/mga_drv.h @@ -196,8 +196,7 @@ do { \ do { \ if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \ dev->lock.pid != DRM_OS_CURRENTPID ) { \ - DRM_ERROR( "%s called without lock held\n", \ - __FUNCTION__ ); \ + DRM_ERROR( "%s called without lock held\n", __func__ ); \ return DRM_OS_ERR(EINVAL); \ } \ } while (0) @@ -210,8 +209,8 @@ do { \ } else if ( dev_priv->prim.space < \ dev_priv->prim.high_mark ) { \ if ( MGA_DMA_DEBUG ) \ - DRM_INFO( __FUNCTION__": wrap...\n" ); \ - return DRM_OS_ERR(EBUSY); \ + DRM_INFO( "%s: wrap...\n", __func__ ); \ + return DRM_OS_ERR(EBUSY); \ } \ } \ } while (0) @@ -221,7 +220,7 @@ do { \ if ( test_bit( 0, &dev_priv->prim.wrapped ) ) { \ if ( mga_do_wait_for_idle( dev_priv ) ) { \ if ( MGA_DMA_DEBUG ) \ - DRM_INFO( __FUNCTION__": wrap...\n" ); \ + DRM_INFO( "%s: wrap...\n", __func__ ); \ return DRM_OS_ERR(EBUSY); \ } \ mga_do_dma_wrap_end( dev_priv ); \ @@ -243,7 +242,7 @@ do { \ do { \ if ( MGA_VERBOSE ) { \ DRM_INFO( "BEGIN_DMA( %d ) in %s\n", \ - (n), __FUNCTION__ ); \ + (n), __func__ ); \ DRM_INFO( " space=0x%x req=0x%x\n", \ dev_priv->prim.space, (n) * DMA_BLOCK_SIZE ); \ } \ @@ -254,7 +253,7 @@ do { \ #define BEGIN_DMA_WRAP() \ do { \ if ( MGA_VERBOSE ) { \ - DRM_INFO( "BEGIN_DMA() in %s\n", __FUNCTION__ ); \ + DRM_INFO( "BEGIN_DMA() in %s\n", __func__ ); \ DRM_INFO( " space=0x%x\n", dev_priv->prim.space ); \ } \ prim = dev_priv->prim.start; \ @@ -273,7 +272,7 @@ do { \ #define FLUSH_DMA() \ do { \ if ( 0 ) { \ - DRM_INFO( __FUNCTION__ ":\n" ); \ + DRM_INFO( "%s:\n", __func__ ); \ DRM_INFO( " tail=0x%06x head=0x%06lx\n", \ dev_priv->prim.tail, \ MGA_READ( MGA_PRIMADDRESS ) - \ diff --git a/sys/dev/drm/mga_state.c b/sys/dev/drm/mga_state.c index 2d6454a..f1b7ac1 100644 --- a/sys/dev/drm/mga_state.c +++ b/sys/dev/drm/mga_state.c @@ -516,7 +516,7 @@ static void mga_dma_dispatch_clear( drm_device_t *dev, int nbox = sarea_priv->nbox; int i; DMA_LOCALS; - DRM_DEBUG( __FUNCTION__ ":\n" ); + DRM_DEBUG( "%s:\n", __func__ ); BEGIN_DMA( 1 ); @@ -610,7 +610,7 @@ static void mga_dma_dispatch_swap( drm_device_t *dev ) int nbox = sarea_priv->nbox; int i; DMA_LOCALS; - DRM_DEBUG( __FUNCTION__ ":\n" ); + DRM_DEBUG( "%s:\n", __func__ ); sarea_priv->last_frame.head = dev_priv->prim.tail; sarea_priv->last_frame.wrap = dev_priv->prim.last_wrap; @@ -656,7 +656,7 @@ static void mga_dma_dispatch_swap( drm_device_t *dev ) FLUSH_DMA(); - DRM_DEBUG( "%s... done.\n", __FUNCTION__ ); + DRM_DEBUG( "%s... done.\n", __func__ ); } static void mga_dma_dispatch_vertex( drm_device_t *dev, drm_buf_t *buf ) @@ -765,7 +765,7 @@ static void mga_dma_dispatch_iload( drm_device_t *dev, drm_buf_t *buf, u32 y2; DMA_LOCALS; DRM_DEBUG( "%s: buf=%d used=%d\n", - __FUNCTION__, buf->idx, buf->used ); + __func__, buf->idx, buf->used ); y2 = length / 64; @@ -819,7 +819,7 @@ static void mga_dma_dispatch_blit( drm_device_t *dev, int nbox = sarea_priv->nbox; u32 scandir = 0, i; DMA_LOCALS; - DRM_DEBUG( __FUNCTION__ ":\n" ); + DRM_DEBUG( "%s:\n", __func__ ); BEGIN_DMA( 4 + nbox ); @@ -1005,7 +1005,7 @@ int mga_dma_iload( DRM_OS_IOCTL ) drm_buf_t *buf; drm_mga_buf_priv_t *buf_priv; drm_mga_iload_t iload; - DRM_DEBUG( __FUNCTION__ ":\n" ); + DRM_DEBUG( "%s:\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); @@ -1014,7 +1014,7 @@ int mga_dma_iload( DRM_OS_IOCTL ) #if 0 if ( mga_do_wait_for_idle( dev_priv ) ) { if ( MGA_DMA_DEBUG ) - DRM_INFO( __FUNCTION__": -EBUSY\n" ); + DRM_INFO( "%s: -EBUSY\n", __func__ ); return DRM_OS_ERR(EBUSY); } #endif @@ -1045,7 +1045,7 @@ int mga_dma_blit( DRM_OS_IOCTL ) drm_mga_private_t *dev_priv = dev->dev_private; drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_mga_blit_t blit; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s:\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); diff --git a/sys/dev/drm/r128_cce.c b/sys/dev/drm/r128_cce.c index 50e44eb..092242c 100644 --- a/sys/dev/drm/r128_cce.c +++ b/sys/dev/drm/r128_cce.c @@ -138,7 +138,7 @@ static int r128_do_pixcache_flush( drm_r128_private_t *dev_priv ) } #if R128_FIFO_DEBUG - DRM_ERROR( "%s failed!\n", __FUNCTION__ ); + DRM_ERROR( "%s failed!\n", __func__ ); #endif return DRM_OS_ERR(EBUSY); } @@ -154,7 +154,7 @@ static int r128_do_wait_for_fifo( drm_r128_private_t *dev_priv, int entries ) } #if R128_FIFO_DEBUG - DRM_ERROR( "%s failed!\n", __FUNCTION__ ); + DRM_ERROR( "%s failed!\n", __func__ ); #endif return DRM_OS_ERR(EBUSY); } @@ -175,7 +175,7 @@ int r128_do_wait_for_idle( drm_r128_private_t *dev_priv ) } #if R128_FIFO_DEBUG - DRM_ERROR( "%s failed!\n", __FUNCTION__ ); + DRM_ERROR( "%s failed!\n", __func__ ); #endif return DRM_OS_ERR(EBUSY); } @@ -190,7 +190,7 @@ static void r128_cce_load_microcode( drm_r128_private_t *dev_priv ) { int i; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); r128_do_wait_for_idle( dev_priv ); @@ -326,7 +326,7 @@ static void r128_cce_init_ring_buffer( drm_device_t *dev, u32 ring_start; u32 tmp; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); /* The manual (p. 2) says this address is in "VM space". This * means it's an offset from the start of AGP space. @@ -392,7 +392,7 @@ static int r128_do_init_cce( drm_device_t *dev, drm_r128_init_t *init ) drm_map_list_entry_t *listentry; #endif /* __FreeBSD__ */ - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); dev_priv = DRM(alloc)( sizeof(drm_r128_private_t), DRM_MEM_DRIVER ); if ( dev_priv == NULL ) @@ -681,7 +681,7 @@ int r128_cce_init( DRM_OS_IOCTL ) DRM_OS_DEVICE; drm_r128_init_t init; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); DRM_OS_KRNFROMUSR( init, (drm_r128_init_t *)data, sizeof(init) ); @@ -699,12 +699,12 @@ int r128_cce_start( DRM_OS_IOCTL ) { DRM_OS_DEVICE; drm_r128_private_t *dev_priv = dev->dev_private; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); if ( dev_priv->cce_running || dev_priv->cce_mode == R128_PM4_NONPM4 ) { - DRM_DEBUG( "%s while CCE running\n", __FUNCTION__ ); + DRM_DEBUG( "%s while CCE running\n", __func__ ); return 0; } @@ -722,7 +722,7 @@ int r128_cce_stop( DRM_OS_IOCTL ) drm_r128_private_t *dev_priv = dev->dev_private; drm_r128_cce_stop_t stop; int ret; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); @@ -766,12 +766,12 @@ int r128_cce_reset( DRM_OS_IOCTL ) { DRM_OS_DEVICE; drm_r128_private_t *dev_priv = dev->dev_private; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); if ( !dev_priv ) { - DRM_DEBUG( "%s called before init done\n", __FUNCTION__ ); + DRM_DEBUG( "%s called before init done\n", __func__ ); return DRM_OS_ERR(EINVAL); } @@ -787,7 +787,7 @@ int r128_cce_idle( DRM_OS_IOCTL ) { DRM_OS_DEVICE; drm_r128_private_t *dev_priv = dev->dev_private; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); @@ -801,7 +801,7 @@ int r128_cce_idle( DRM_OS_IOCTL ) int r128_engine_reset( DRM_OS_IOCTL ) { DRM_OS_DEVICE; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); @@ -816,7 +816,7 @@ int r128_engine_reset( DRM_OS_IOCTL ) static int r128_do_init_pageflip( drm_device_t *dev ) { drm_r128_private_t *dev_priv = dev->dev_private; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); dev_priv->crtc_offset = R128_READ( R128_CRTC_OFFSET ); dev_priv->crtc_offset_cntl = R128_READ( R128_CRTC_OFFSET_CNTL ); @@ -834,7 +834,7 @@ static int r128_do_init_pageflip( drm_device_t *dev ) int r128_do_cleanup_pageflip( drm_device_t *dev ) { drm_r128_private_t *dev_priv = dev->dev_private; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); R128_WRITE( R128_CRTC_OFFSET, dev_priv->crtc_offset ); R128_WRITE( R128_CRTC_OFFSET_CNTL, dev_priv->crtc_offset_cntl ); diff --git a/sys/dev/drm/r128_drv.h b/sys/dev/drm/r128_drv.h index 16fd323..a10fd14 100644 --- a/sys/dev/drm/r128_drv.h +++ b/sys/dev/drm/r128_drv.h @@ -448,10 +448,9 @@ extern int R128_READ_PLL(drm_device_t *dev, int addr); #define LOCK_TEST_WITH_RETURN( dev ) \ do { \ if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \ - dev->lock.pid != DRM_OS_CURRENTPID ) { \ - DRM_ERROR( "%s called without lock held\n", \ - __FUNCTION__ ); \ - return DRM_OS_ERR(EINVAL); \ + dev->lock.pid != DRM_OS_CURRENTPID ) { \ + DRM_ERROR( "%s called without lock held\n", __func__ ); \ + return DRM_OS_ERR(EINVAL); \ } \ } while (0) @@ -463,12 +462,13 @@ do { \ r128_update_ring_snapshot( ring ); \ if ( ring->space >= ring->high_mark ) \ goto __ring_space_done; \ - DRM_OS_DELAY( 1 ); \ + DRM_OS_DELAY( 1 ); \ } \ DRM_ERROR( "ring space check failed!\n" ); \ return DRM_OS_ERR(EBUSY); \ } \ __ring_space_done: \ + ; \ } while (0) #define VB_AGE_TEST_WITH_RETURN( dev_priv ) \ @@ -503,7 +503,7 @@ do { \ #define BEGIN_RING( n ) do { \ if ( R128_VERBOSE ) { \ DRM_INFO( "BEGIN_RING( %d ) in %s\n", \ - (n), __FUNCTION__ ); \ + (n), __func__ ); \ } \ if ( dev_priv->ring.space <= (n) * sizeof(u32) ) { \ r128_wait_ring( dev_priv, (n) * sizeof(u32) ); \ diff --git a/sys/dev/drm/r128_state.c b/sys/dev/drm/r128_state.c index ac086be..94ba460 100644 --- a/sys/dev/drm/r128_state.c +++ b/sys/dev/drm/r128_state.c @@ -51,7 +51,7 @@ static void r128_emit_clip_rects( drm_r128_private_t *dev_priv, { u32 aux_sc_cntl = 0x00000000; RING_LOCALS; - DRM_DEBUG( " %s\n", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 17 ); @@ -94,7 +94,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", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 2 ); @@ -109,7 +109,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", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 13 ); @@ -135,7 +135,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", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 3 ); @@ -151,7 +151,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", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 5 ); @@ -170,7 +170,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", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 2 ); @@ -187,7 +187,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", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 7 + R128_MAX_TEXTURE_LEVELS ); @@ -213,7 +213,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", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 5 + R128_MAX_TEXTURE_LEVELS ); @@ -236,7 +236,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", __FUNCTION__, dirty ); + DRM_DEBUG( "%s: dirty=0x%08x\n", __func__, dirty ); if ( dirty & R128_UPLOAD_CORE ) { r128_emit_core( dev_priv ); @@ -377,7 +377,7 @@ static void r128_cce_dispatch_clear( drm_device_t *dev, unsigned int flags = clear->flags; int i; RING_LOCALS; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); if ( dev_priv->page_flipping && dev_priv->current_page == 1 ) { unsigned int tmp = flags; @@ -480,7 +480,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", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); #if R128_PERFORMANCE_BOXES /* Do some trivial performance monitoring... @@ -536,7 +536,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\n", __FUNCTION__, dev_priv->current_page ); + DRM_DEBUG( "%s: page=%d\n", __func__, dev_priv->current_page ); #if R128_PERFORMANCE_BOXES /* Do some trivial performance monitoring... @@ -586,7 +586,7 @@ static void r128_cce_dispatch_vertex( drm_device_t *dev, int i = 0; RING_LOCALS; DRM_DEBUG( "%s: buf=%d nbox=%d\n", - __FUNCTION__, buf->idx, sarea_priv->nbox ); + __func__, buf->idx, sarea_priv->nbox ); if ( 0 ) r128_print_dirty( "dispatch_vertex", sarea_priv->dirty ); @@ -797,7 +797,7 @@ static int r128_cce_dispatch_blit( drm_device_t *dev, u32 *data; int dword_shift, dwords; RING_LOCALS; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); /* The compiler won't optimize away a division by a variable, * even if the only legal values are powers of two. Thus, we'll @@ -907,7 +907,7 @@ static int r128_cce_dispatch_write_span( drm_device_t *dev, u8 *mask; int i; RING_LOCALS; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); count = depth->n; if ( DRM_OS_COPYFROMUSR( &x, depth->x, sizeof(x) ) ) { @@ -1000,7 +1000,7 @@ static int r128_cce_dispatch_write_pixels( drm_device_t *dev, u8 *mask; int i; RING_LOCALS; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); count = depth->n; @@ -1115,7 +1115,7 @@ static int r128_cce_dispatch_read_span( drm_device_t *dev, drm_r128_private_t *dev_priv = dev->dev_private; int count, x, y; RING_LOCALS; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); count = depth->n; if ( DRM_OS_COPYFROMUSR( &x, depth->x, sizeof(x) ) ) { @@ -1157,7 +1157,7 @@ static int r128_cce_dispatch_read_pixels( drm_device_t *dev, int count, *x, *y; int i; RING_LOCALS; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); count = depth->n; if ( count > dev_priv->depth_pitch ) { @@ -1224,7 +1224,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", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); BEGIN_RING( 33 ); @@ -1247,7 +1247,7 @@ int r128_cce_clear( DRM_OS_IOCTL ) drm_r128_private_t *dev_priv = dev->dev_private; drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_r128_clear_t clear; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); @@ -1273,7 +1273,7 @@ int r128_cce_swap( DRM_OS_IOCTL ) DRM_OS_DEVICE; drm_r128_private_t *dev_priv = dev->dev_private; drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); @@ -1305,7 +1305,7 @@ int r128_cce_vertex( DRM_OS_IOCTL ) LOCK_TEST_WITH_RETURN( dev ); if ( !dev_priv ) { - DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ ); + DRM_ERROR( "%s called with no initialization\n", __func__ ); return DRM_OS_ERR(EINVAL); } @@ -1313,7 +1313,7 @@ int r128_cce_vertex( DRM_OS_IOCTL ) sizeof(vertex) ); DRM_DEBUG( "%s: pid=%d index=%d count=%d discard=%d\n", - __FUNCTION__, DRM_OS_CURRENTPID, + __func__, DRM_OS_CURRENTPID, vertex.idx, vertex.count, vertex.discard ); if ( vertex.idx < 0 || vertex.idx >= dma->buf_count ) { @@ -1365,7 +1365,7 @@ int r128_cce_indices( DRM_OS_IOCTL ) LOCK_TEST_WITH_RETURN( dev ); if ( !dev_priv ) { - DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ ); + DRM_ERROR( "%s called with no initialization\n", __func__ ); return DRM_OS_ERR(EINVAL); } @@ -1373,7 +1373,7 @@ int r128_cce_indices( DRM_OS_IOCTL ) sizeof(elts) ); DRM_DEBUG( "%s: pid=%d buf=%d s=%d e=%d d=%d\n", - __FUNCTION__, DRM_OS_CURRENTPID, + __func__, DRM_OS_CURRENTPID, elts.idx, elts.start, elts.end, elts.discard ); if ( elts.idx < 0 || elts.idx >= dma->buf_count ) { @@ -1437,7 +1437,7 @@ int r128_cce_blit( DRM_OS_IOCTL ) sizeof(blit) ); DRM_DEBUG( "%s: pid=%d index=%d\n", - __FUNCTION__, DRM_OS_CURRENTPID, blit.idx ); + __func__, DRM_OS_CURRENTPID, blit.idx ); if ( blit.idx < 0 || blit.idx >= dma->buf_count ) { DRM_ERROR( "buffer index %d (of %d max)\n", @@ -1516,7 +1516,7 @@ int r128_cce_indirect( DRM_OS_IOCTL ) LOCK_TEST_WITH_RETURN( dev ); if ( !dev_priv ) { - DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ ); + DRM_ERROR( "%s called with no initialization\n", __func__ ); return DRM_OS_ERR(EINVAL); } diff --git a/sys/dev/drm/radeon_cp.c b/sys/dev/drm/radeon_cp.c index f5b72ca..16b03cb 100644 --- a/sys/dev/drm/radeon_cp.c +++ b/sys/dev/drm/radeon_cp.c @@ -326,7 +326,7 @@ int RADEON_READ_PLL(drm_device_t *dev, int addr) #if RADEON_FIFO_DEBUG static void radeon_status( drm_radeon_private_t *dev_priv ) { - printk( "%s:\n", __FUNCTION__ ); + printk( "%s:\n", __func__ ); printk( "RBBM_STATUS = 0x%08x\n", (unsigned int)RADEON_READ( RADEON_RBBM_STATUS ) ); printk( "CP_RB_RTPR = 0x%08x\n", @@ -425,7 +425,7 @@ static int radeon_do_wait_for_idle( drm_radeon_private_t *dev_priv ) static void radeon_cp_load_microcode( drm_radeon_private_t *dev_priv ) { int i; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); radeon_do_wait_for_idle( dev_priv ); @@ -444,7 +444,7 @@ static void radeon_cp_load_microcode( drm_radeon_private_t *dev_priv ) */ static void radeon_do_cp_flush( drm_radeon_private_t *dev_priv ) { - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); #if 0 u32 tmp; @@ -458,7 +458,7 @@ static void radeon_do_cp_flush( drm_radeon_private_t *dev_priv ) int radeon_do_cp_idle( drm_radeon_private_t *dev_priv ) { RING_LOCALS; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); BEGIN_RING( 6 ); @@ -476,7 +476,7 @@ int radeon_do_cp_idle( drm_radeon_private_t *dev_priv ) static void radeon_do_cp_start( drm_radeon_private_t *dev_priv ) { RING_LOCALS; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); radeon_do_wait_for_idle( dev_priv ); @@ -500,7 +500,7 @@ static void radeon_do_cp_start( drm_radeon_private_t *dev_priv ) static void radeon_do_cp_reset( drm_radeon_private_t *dev_priv ) { u32 cur_read_ptr; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); cur_read_ptr = RADEON_READ( RADEON_CP_RB_RPTR ); RADEON_WRITE( RADEON_CP_RB_WPTR, cur_read_ptr ); @@ -514,7 +514,7 @@ static void radeon_do_cp_reset( drm_radeon_private_t *dev_priv ) */ static void radeon_do_cp_stop( drm_radeon_private_t *dev_priv ) { - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); RADEON_WRITE( RADEON_CP_CSQ_CNTL, RADEON_CSQ_PRIDIS_INDDIS ); @@ -527,7 +527,7 @@ static int radeon_do_engine_reset( drm_device_t *dev ) { drm_radeon_private_t *dev_priv = dev->dev_private; u32 clock_cntl_index, mclk_cntl, rbbm_soft_reset; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); radeon_do_pixcache_flush( dev_priv ); @@ -667,7 +667,7 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) drm_map_list_entry_t *listentry; #endif /* __FreeBSD__ */ u32 tmp; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); dev_priv = DRM(alloc)( sizeof(drm_radeon_private_t), DRM_MEM_DRIVER ); if ( dev_priv == NULL ) @@ -1011,7 +1011,7 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) int radeon_do_cleanup_cp( drm_device_t *dev ) { - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); if ( dev->dev_private ) { drm_radeon_private_t *dev_priv = dev->dev_private; @@ -1060,17 +1060,17 @@ int radeon_cp_start( DRM_OS_IOCTL ) { DRM_OS_DEVICE; drm_radeon_private_t *dev_priv = dev->dev_private; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); if ( dev_priv->cp_running ) { - DRM_DEBUG( "%s while CP running\n", __FUNCTION__ ); + DRM_DEBUG( "%s while CP running\n", __func__ ); return 0; } if ( dev_priv->cp_mode == RADEON_CSQ_PRIDIS_INDDIS ) { DRM_DEBUG( "%s called with bogus CP mode (%d)\n", - __FUNCTION__, dev_priv->cp_mode ); + __func__, dev_priv->cp_mode ); return 0; } @@ -1088,7 +1088,7 @@ int radeon_cp_stop( DRM_OS_IOCTL ) drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_cp_stop_t stop; int ret; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); @@ -1127,12 +1127,12 @@ int radeon_cp_reset( DRM_OS_IOCTL ) { DRM_OS_DEVICE; drm_radeon_private_t *dev_priv = dev->dev_private; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); if ( !dev_priv ) { - DRM_DEBUG( "%s called before init done\n", __FUNCTION__ ); + DRM_DEBUG( "%s called before init done\n", __func__ ); return DRM_OS_ERR(EINVAL); } @@ -1148,7 +1148,7 @@ int radeon_cp_idle( DRM_OS_IOCTL ) { DRM_OS_DEVICE; drm_radeon_private_t *dev_priv = dev->dev_private; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); @@ -1158,7 +1158,7 @@ int radeon_cp_idle( DRM_OS_IOCTL ) int radeon_engine_reset( DRM_OS_IOCTL ) { DRM_OS_DEVICE; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); @@ -1173,7 +1173,7 @@ int radeon_engine_reset( DRM_OS_IOCTL ) static int radeon_do_init_pageflip( drm_device_t *dev ) { drm_radeon_private_t *dev_priv = dev->dev_private; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); dev_priv->crtc_offset = RADEON_READ( RADEON_CRTC_OFFSET ); dev_priv->crtc_offset_cntl = RADEON_READ( RADEON_CRTC_OFFSET_CNTL ); @@ -1192,7 +1192,7 @@ static int radeon_do_init_pageflip( drm_device_t *dev ) int radeon_do_cleanup_pageflip( drm_device_t *dev ) { drm_radeon_private_t *dev_priv = dev->dev_private; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); RADEON_WRITE( RADEON_CRTC_OFFSET, dev_priv->crtc_offset ); RADEON_WRITE( RADEON_CRTC_OFFSET_CNTL, dev_priv->crtc_offset_cntl ); diff --git a/sys/dev/drm/radeon_drv.h b/sys/dev/drm/radeon_drv.h index 51fa987..731c093 100644 --- a/sys/dev/drm/radeon_drv.h +++ b/sys/dev/drm/radeon_drv.h @@ -628,10 +628,9 @@ extern int RADEON_READ_PLL( drm_device_t *dev, int addr ); #define LOCK_TEST_WITH_RETURN( dev ) \ do { \ if ( !_DRM_LOCK_IS_HELD( dev->lock.hw_lock->lock ) || \ - dev->lock.pid != DRM_OS_CURRENTPID ) { \ - DRM_ERROR( "%s called without lock held\n", \ - __FUNCTION__ ); \ - return DRM_OS_ERR(EINVAL); \ + dev->lock.pid != DRM_OS_CURRENTPID ) { \ + DRM_ERROR( "%s called without lock held\n", __func__ ); \ + return DRM_OS_ERR(EINVAL); \ } \ } while (0) @@ -643,12 +642,13 @@ do { \ radeon_update_ring_snapshot( ring ); \ if ( ring->space >= ring->high_mark ) \ goto __ring_space_done; \ - DRM_OS_DELAY( 1 ); \ + DRM_OS_DELAY( 1 ); \ } \ DRM_ERROR( "ring space check failed!\n" ); \ - return DRM_OS_ERR(EBUSY); \ + return DRM_OS_ERR(EBUSY); \ } \ __ring_space_done: \ + ; \ } while (0) #ifdef __linux__ @@ -706,7 +706,7 @@ do { \ #define BEGIN_RING( n ) do { \ if ( RADEON_VERBOSE ) { \ DRM_INFO( "BEGIN_RING( %d ) in %s\n", \ - n, __FUNCTION__ ); \ + n, __func__ ); \ } \ if ( dev_priv->ring.space <= (n) * sizeof(u32) ) { \ radeon_wait_ring( dev_priv, (n) * sizeof(u32) ); \ diff --git a/sys/dev/drm/radeon_state.c b/sys/dev/drm/radeon_state.c index 0b2a1cb..b0468a0 100644 --- a/sys/dev/drm/radeon_state.c +++ b/sys/dev/drm/radeon_state.c @@ -68,7 +68,7 @@ static __inline__ void radeon_emit_context( drm_radeon_private_t *dev_priv ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_context_regs_t *ctx = &sarea_priv->context_state; RING_LOCALS; - DRM_DEBUG( " %s\n", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 14 ); @@ -97,7 +97,7 @@ static __inline__ void radeon_emit_vertfmt( drm_radeon_private_t *dev_priv ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_context_regs_t *ctx = &sarea_priv->context_state; RING_LOCALS; - DRM_DEBUG( " %s\n", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 2 ); @@ -112,7 +112,7 @@ static __inline__ void radeon_emit_line( drm_radeon_private_t *dev_priv ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_context_regs_t *ctx = &sarea_priv->context_state; RING_LOCALS; - DRM_DEBUG( " %s\n", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 5 ); @@ -131,7 +131,7 @@ static __inline__ void radeon_emit_bumpmap( drm_radeon_private_t *dev_priv ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_context_regs_t *ctx = &sarea_priv->context_state; RING_LOCALS; - DRM_DEBUG( " %s\n", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 5 ); @@ -150,7 +150,7 @@ static __inline__ void radeon_emit_masks( drm_radeon_private_t *dev_priv ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_context_regs_t *ctx = &sarea_priv->context_state; RING_LOCALS; - DRM_DEBUG( " %s\n", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 4 ); @@ -167,7 +167,7 @@ static __inline__ void radeon_emit_viewport( drm_radeon_private_t *dev_priv ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_context_regs_t *ctx = &sarea_priv->context_state; RING_LOCALS; - DRM_DEBUG( " %s\n", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 7 ); @@ -187,7 +187,7 @@ static __inline__ void radeon_emit_setup( drm_radeon_private_t *dev_priv ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_context_regs_t *ctx = &sarea_priv->context_state; RING_LOCALS; - DRM_DEBUG( " %s\n", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 4 ); @@ -205,7 +205,7 @@ static __inline__ void radeon_emit_tcl( drm_radeon_private_t *dev_priv ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_context_regs_t *ctx = &sarea_priv->context_state; RING_LOCALS; - DRM_DEBUG( " %s\n", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 29 ); @@ -249,7 +249,7 @@ static __inline__ void radeon_emit_misc( drm_radeon_private_t *dev_priv ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_context_regs_t *ctx = &sarea_priv->context_state; RING_LOCALS; - DRM_DEBUG( " %s\n", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 2 ); @@ -264,7 +264,7 @@ static __inline__ void radeon_emit_tex0( drm_radeon_private_t *dev_priv ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_texture_regs_t *tex = &sarea_priv->tex_state[0]; RING_LOCALS; - DRM_DEBUG( " %s: offset=0x%x\n", __FUNCTION__, tex->pp_txoffset ); + DRM_DEBUG( " %s: offset=0x%x\n", __func__, tex->pp_txoffset ); BEGIN_RING( 9 ); @@ -287,7 +287,7 @@ static __inline__ void radeon_emit_tex1( drm_radeon_private_t *dev_priv ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_texture_regs_t *tex = &sarea_priv->tex_state[1]; RING_LOCALS; - DRM_DEBUG( " %s: offset=0x%x\n", __FUNCTION__, tex->pp_txoffset ); + DRM_DEBUG( " %s: offset=0x%x\n", __func__, tex->pp_txoffset ); BEGIN_RING( 9 ); @@ -310,7 +310,7 @@ static __inline__ void radeon_emit_tex2( drm_radeon_private_t *dev_priv ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_texture_regs_t *tex = &sarea_priv->tex_state[2]; RING_LOCALS; - DRM_DEBUG( " %s\n", __FUNCTION__ ); + DRM_DEBUG( " %s\n", __func__ ); BEGIN_RING( 9 ); @@ -333,7 +333,7 @@ static __inline__ void radeon_emit_state( drm_radeon_private_t *dev_priv ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; unsigned int dirty = sarea_priv->dirty; - DRM_DEBUG( "%s: dirty=0x%08x\n", __FUNCTION__, dirty ); + DRM_DEBUG( "%s: dirty=0x%08x\n", __func__, dirty ); if ( dirty & RADEON_UPLOAD_CONTEXT ) { radeon_emit_context( dev_priv ); @@ -501,7 +501,7 @@ static void radeon_cp_dispatch_clear( drm_device_t *dev, unsigned int flags = clear->flags; int i; RING_LOCALS; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); if ( dev_priv->page_flipping && dev_priv->current_page == 1 ) { unsigned int tmp = flags; @@ -657,7 +657,7 @@ static void radeon_cp_dispatch_swap( drm_device_t *dev ) drm_clip_rect_t *pbox = sarea_priv->boxes; int i; RING_LOCALS; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); #if RADEON_PERFORMANCE_BOXES /* Do some trivial performance monitoring... @@ -724,7 +724,7 @@ static void radeon_cp_dispatch_flip( drm_device_t *dev ) { drm_radeon_private_t *dev_priv = dev->dev_private; RING_LOCALS; - DRM_DEBUG( "%s: page=%d\n", __FUNCTION__, dev_priv->current_page ); + DRM_DEBUG( "%s: page=%d\n", __func__, dev_priv->current_page ); #if RADEON_PERFORMANCE_BOXES /* Do some trivial performance monitoring... @@ -774,7 +774,7 @@ static void radeon_cp_dispatch_vertex( drm_device_t *dev, int prim = buf_priv->prim; int i = 0; RING_LOCALS; - DRM_DEBUG( "%s: nbox=%d\n", __FUNCTION__, sarea_priv->nbox ); + DRM_DEBUG( "%s: nbox=%d\n", __func__, sarea_priv->nbox ); if ( 0 ) radeon_print_dirty( "dispatch_vertex", sarea_priv->dirty ); @@ -1141,7 +1141,7 @@ static void radeon_cp_dispatch_stipple( drm_device_t *dev, u32 *stipple ) drm_radeon_private_t *dev_priv = dev->dev_private; int i; RING_LOCALS; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); BEGIN_RING( 35 ); @@ -1168,7 +1168,7 @@ int radeon_cp_clear( DRM_OS_IOCTL ) drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; drm_radeon_clear_t clear; drm_radeon_clear_rect_t depth_boxes[RADEON_NR_SAREA_CLIPRECTS]; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); @@ -1194,7 +1194,7 @@ int radeon_cp_swap( DRM_OS_IOCTL ) DRM_OS_DEVICE; drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv; - DRM_DEBUG( "%s\n", __FUNCTION__ ); + DRM_DEBUG( "%s\n", __func__ ); LOCK_TEST_WITH_RETURN( dev ); @@ -1226,7 +1226,7 @@ int radeon_cp_vertex( DRM_OS_IOCTL ) LOCK_TEST_WITH_RETURN( dev ); if ( !dev_priv ) { - DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ ); + DRM_ERROR( "%s called with no initialization\n", __func__ ); return DRM_OS_ERR(EINVAL); } @@ -1234,7 +1234,7 @@ int radeon_cp_vertex( DRM_OS_IOCTL ) sizeof(vertex) ); DRM_DEBUG( "%s: pid=%d index=%d count=%d discard=%d\n", - __FUNCTION__, DRM_OS_CURRENTPID, + __func__, DRM_OS_CURRENTPID, vertex.idx, vertex.count, vertex.discard ); if ( vertex.idx < 0 || vertex.idx >= dma->buf_count ) { @@ -1286,7 +1286,7 @@ int radeon_cp_indices( DRM_OS_IOCTL ) LOCK_TEST_WITH_RETURN( dev ); if ( !dev_priv ) { - DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ ); + DRM_ERROR( "%s called with no initialization\n", __func__ ); return DRM_OS_ERR(EINVAL); } @@ -1294,7 +1294,7 @@ int radeon_cp_indices( DRM_OS_IOCTL ) sizeof(elts) ); DRM_DEBUG( "%s: pid=%d index=%d start=%d end=%d discard=%d\n", - __FUNCTION__, DRM_OS_CURRENTPID, + __func__, DRM_OS_CURRENTPID, elts.idx, elts.start, elts.end, elts.discard ); if ( elts.idx < 0 || elts.idx >= dma->buf_count ) { @@ -1407,7 +1407,7 @@ int radeon_cp_indirect( DRM_OS_IOCTL ) LOCK_TEST_WITH_RETURN( dev ); if ( !dev_priv ) { - DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ ); + DRM_ERROR( "%s called with no initialization\n", __func__ ); return DRM_OS_ERR(EINVAL); } |