diff options
author | Michel Daenzer <michel@daenzer.net> | 2002-12-04 15:39:53 +0000 |
---|---|---|
committer | Michel Daenzer <michel@daenzer.net> | 2002-12-04 15:39:53 +0000 |
commit | 85025d4f2ad25258fb7678395b8c7ce1be1f0063 (patch) | |
tree | 57d2ba992694b7de9f14d9059b44fc8dd3753bbe | |
parent | 4acba63bb7045e6bf665580cf6cea111f0786f77 (diff) |
further vertical blank interrupt cleanups: remove unused variable,
non-ambiguous variable names, don't express subtraction in
unnecessarily complicated ways
-rw-r--r-- | linux-core/drm_dma.c | 11 | ||||
-rw-r--r-- | linux/drm_dma.h | 11 | ||||
-rw-r--r-- | shared-core/mga_irq.c | 2 | ||||
-rw-r--r-- | shared-core/r128_irq.c | 2 | ||||
-rw-r--r-- | shared-core/radeon_irq.c | 2 | ||||
-rw-r--r-- | shared/mga_irq.c | 2 | ||||
-rw-r--r-- | shared/r128_irq.c | 2 | ||||
-rw-r--r-- | shared/radeon_irq.c | 2 |
8 files changed, 14 insertions, 20 deletions
diff --git a/linux-core/drm_dma.c b/linux-core/drm_dma.c index 9dd46d21..46393a5d 100644 --- a/linux-core/drm_dma.c +++ b/linux-core/drm_dma.c @@ -509,9 +509,6 @@ int DRM(dma_get_buffers)(drm_device_t *dev, drm_dma_t *dma) int DRM(irq_install)( drm_device_t *dev, int irq ) { int ret; -#if __HAVE_VBL_IRQ - unsigned long flags; -#endif if ( !irq ) return -EINVAL; @@ -638,7 +635,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS ) flags = vblwait.request.type & _DRM_VBLANK_FLAGS_MASK; if ( flags & _DRM_VBLANK_SIGNAL ) { - unsigned long flags; + unsigned long irqflags; drm_vbl_sig_t *vbl_sig = DRM_MALLOC( sizeof( drm_vbl_sig_t ) ); if ( !vbl_sig ) @@ -653,11 +650,11 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS ) vblwait.reply.sequence = atomic_read( &dev->vbl_received ); /* Hook signal entry into list */ - spin_lock_irqsave( &dev->vbl_lock, flags ); + spin_lock_irqsave( &dev->vbl_lock, irqflags ); list_add_tail( (struct list_head *) vbl_sig, &dev->vbl_sigs.head ); - spin_unlock_irqrestore( &dev->vbl_lock, flags ); + spin_unlock_irqrestore( &dev->vbl_lock, irqflags ); } else { ret = DRM(vblank_wait)( dev, &vblwait.request.sequence ); @@ -685,7 +682,7 @@ void DRM(vbl_send_signals)( drm_device_t *dev ) vbl_sig = (drm_vbl_sig_t *) entry; - if ( ( vbl_seq + ~vbl_sig->sequence + 1 ) <= (1<<23) ) { + if ( ( vbl_seq - vbl_sig->sequence ) <= (1<<23) ) { vbl_sig->info.si_code = atomic_read( &dev->vbl_received ); send_sig_info( vbl_sig->info.si_signo, &vbl_sig->info, vbl_sig->task ); diff --git a/linux/drm_dma.h b/linux/drm_dma.h index 9dd46d21..46393a5d 100644 --- a/linux/drm_dma.h +++ b/linux/drm_dma.h @@ -509,9 +509,6 @@ int DRM(dma_get_buffers)(drm_device_t *dev, drm_dma_t *dma) int DRM(irq_install)( drm_device_t *dev, int irq ) { int ret; -#if __HAVE_VBL_IRQ - unsigned long flags; -#endif if ( !irq ) return -EINVAL; @@ -638,7 +635,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS ) flags = vblwait.request.type & _DRM_VBLANK_FLAGS_MASK; if ( flags & _DRM_VBLANK_SIGNAL ) { - unsigned long flags; + unsigned long irqflags; drm_vbl_sig_t *vbl_sig = DRM_MALLOC( sizeof( drm_vbl_sig_t ) ); if ( !vbl_sig ) @@ -653,11 +650,11 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS ) vblwait.reply.sequence = atomic_read( &dev->vbl_received ); /* Hook signal entry into list */ - spin_lock_irqsave( &dev->vbl_lock, flags ); + spin_lock_irqsave( &dev->vbl_lock, irqflags ); list_add_tail( (struct list_head *) vbl_sig, &dev->vbl_sigs.head ); - spin_unlock_irqrestore( &dev->vbl_lock, flags ); + spin_unlock_irqrestore( &dev->vbl_lock, irqflags ); } else { ret = DRM(vblank_wait)( dev, &vblwait.request.sequence ); @@ -685,7 +682,7 @@ void DRM(vbl_send_signals)( drm_device_t *dev ) vbl_sig = (drm_vbl_sig_t *) entry; - if ( ( vbl_seq + ~vbl_sig->sequence + 1 ) <= (1<<23) ) { + if ( ( vbl_seq - vbl_sig->sequence ) <= (1<<23) ) { vbl_sig->info.si_code = atomic_read( &dev->vbl_received ); send_sig_info( vbl_sig->info.si_signo, &vbl_sig->info, vbl_sig->task ); diff --git a/shared-core/mga_irq.c b/shared-core/mga_irq.c index 66236053..28e9a262 100644 --- a/shared-core/mga_irq.c +++ b/shared-core/mga_irq.c @@ -65,7 +65,7 @@ int mga_vblank_wait(drm_device_t *dev, unsigned int *sequence) */ DRM_WAIT_ON( ret, dev->vbl_queue, 3*DRM_HZ, ( ( ( cur_vblank = atomic_read(&dev->vbl_received ) ) - + ~*sequence + 1 ) <= (1<<23) ) ); + - *sequence ) <= (1<<23) ) ); *sequence = cur_vblank; diff --git a/shared-core/r128_irq.c b/shared-core/r128_irq.c index 8dfee07e..bfc30405 100644 --- a/shared-core/r128_irq.c +++ b/shared-core/r128_irq.c @@ -65,7 +65,7 @@ int DRM(vblank_wait)(drm_device_t *dev, unsigned int *sequence) */ DRM_WAIT_ON( ret, dev->vbl_queue, 3*DRM_HZ, ( ( ( cur_vblank = atomic_read(&dev->vbl_received ) ) - + ~*sequence + 1 ) <= (1<<23) ) ); + - *sequence ) <= (1<<23) ) ); *sequence = cur_vblank; diff --git a/shared-core/radeon_irq.c b/shared-core/radeon_irq.c index e2182ff7..c5cd61c5 100644 --- a/shared-core/radeon_irq.c +++ b/shared-core/radeon_irq.c @@ -159,7 +159,7 @@ int DRM(vblank_wait)(drm_device_t *dev, unsigned int *sequence) */ DRM_WAIT_ON( ret, dev->vbl_queue, 3*DRM_HZ, ( ( ( cur_vblank = atomic_read(&dev->vbl_received ) ) - + ~*sequence + 1 ) <= (1<<23) ) ); + - *sequence ) <= (1<<23) ) ); *sequence = cur_vblank; diff --git a/shared/mga_irq.c b/shared/mga_irq.c index 66236053..28e9a262 100644 --- a/shared/mga_irq.c +++ b/shared/mga_irq.c @@ -65,7 +65,7 @@ int mga_vblank_wait(drm_device_t *dev, unsigned int *sequence) */ DRM_WAIT_ON( ret, dev->vbl_queue, 3*DRM_HZ, ( ( ( cur_vblank = atomic_read(&dev->vbl_received ) ) - + ~*sequence + 1 ) <= (1<<23) ) ); + - *sequence ) <= (1<<23) ) ); *sequence = cur_vblank; diff --git a/shared/r128_irq.c b/shared/r128_irq.c index 8dfee07e..bfc30405 100644 --- a/shared/r128_irq.c +++ b/shared/r128_irq.c @@ -65,7 +65,7 @@ int DRM(vblank_wait)(drm_device_t *dev, unsigned int *sequence) */ DRM_WAIT_ON( ret, dev->vbl_queue, 3*DRM_HZ, ( ( ( cur_vblank = atomic_read(&dev->vbl_received ) ) - + ~*sequence + 1 ) <= (1<<23) ) ); + - *sequence ) <= (1<<23) ) ); *sequence = cur_vblank; diff --git a/shared/radeon_irq.c b/shared/radeon_irq.c index e2182ff7..c5cd61c5 100644 --- a/shared/radeon_irq.c +++ b/shared/radeon_irq.c @@ -159,7 +159,7 @@ int DRM(vblank_wait)(drm_device_t *dev, unsigned int *sequence) */ DRM_WAIT_ON( ret, dev->vbl_queue, 3*DRM_HZ, ( ( ( cur_vblank = atomic_read(&dev->vbl_received ) ) - + ~*sequence + 1 ) <= (1<<23) ) ); + - *sequence ) <= (1<<23) ) ); *sequence = cur_vblank; |