diff options
author | Ian Romanick <idr@us.ibm.com> | 2002-12-05 15:28:13 +0000 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2002-12-05 15:28:13 +0000 |
commit | a790687c9a4b369094a2a56e29a8240db573a54a (patch) | |
tree | d6a1201e666b487fac353e4aa70312ee1646c33c /shared | |
parent | 9cfbdbadecaa7f2c89bd361d157e23a885ae5d10 (diff) |
Massive trunk-to-branch merge. This includes the Mesa-5.x updates.texmem-0-0-1-20030123-trunk-premerge
Diffstat (limited to 'shared')
-rw-r--r-- | shared/drm.h | 21 | ||||
-rw-r--r-- | shared/mga_irq.c | 3 | ||||
-rw-r--r-- | shared/r128_irq.c | 3 | ||||
-rw-r--r-- | shared/radeon_cp.c | 2 | ||||
-rw-r--r-- | shared/radeon_irq.c | 7 |
5 files changed, 24 insertions, 12 deletions
diff --git a/shared/drm.h b/shared/drm.h index f26d4442..d3c9f158 100644 --- a/shared/drm.h +++ b/shared/drm.h @@ -346,17 +346,30 @@ typedef struct drm_irq_busid { } drm_irq_busid_t; typedef enum { - _DRM_VBLANK_ABSOLUTE = 0x0, /* Wait for specific vblank sequence number */ - _DRM_VBLANK_RELATIVE = 0x1 /* Wait for given number of vblanks */ + _DRM_VBLANK_ABSOLUTE = 0x0, /* Wait for specific vblank sequence number */ + _DRM_VBLANK_RELATIVE = 0x1, /* Wait for given number of vblanks */ + _DRM_VBLANK_SIGNAL = 0x80000000 /* Send signal instead of blocking */ } drm_vblank_seq_type_t; -typedef struct drm_radeon_vbl_wait { +#define _DRM_VBLANK_FLAGS_MASK _DRM_VBLANK_SIGNAL + +struct drm_wait_vblank_request { + drm_vblank_seq_type_t type; + unsigned int sequence; + unsigned long signal; +}; + +struct drm_wait_vblank_reply { drm_vblank_seq_type_t type; unsigned int sequence; long tval_sec; long tval_usec; -} drm_wait_vblank_t; +}; +typedef union drm_wait_vblank { + struct drm_wait_vblank_request request; + struct drm_wait_vblank_reply reply; +} drm_wait_vblank_t; typedef struct drm_agp_mode { unsigned long mode; diff --git a/shared/mga_irq.c b/shared/mga_irq.c index 568d193f..28e9a262 100644 --- a/shared/mga_irq.c +++ b/shared/mga_irq.c @@ -50,6 +50,7 @@ void mga_dma_service( DRM_IRQ_ARGS ) MGA_WRITE( MGA_ICLEAR, MGA_VLINEICLR ); atomic_inc(&dev->vbl_received); DRM_WAKEUP(&dev->vbl_queue); + DRM(vbl_send_signals)( dev ); } } @@ -64,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 a29a81b5..bfc30405 100644 --- a/shared/r128_irq.c +++ b/shared/r128_irq.c @@ -50,6 +50,7 @@ void r128_dma_service( DRM_IRQ_ARGS ) R128_WRITE( R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK ); atomic_inc(&dev->vbl_received); DRM_WAKEUP(&dev->vbl_queue); + DRM(vbl_send_signals)( dev ); } } @@ -64,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_cp.c b/shared/radeon_cp.c index c0fb63ef..7c869c02 100644 --- a/shared/radeon_cp.c +++ b/shared/radeon_cp.c @@ -1497,7 +1497,7 @@ drm_buf_t *radeon_freelist_get( drm_device_t *dev ) } } - DRM_ERROR( "returning NULL!\n" ); + DRM_DEBUG( "returning NULL!\n" ); return NULL; } #if 0 diff --git a/shared/radeon_irq.c b/shared/radeon_irq.c index 54702bee..c5cd61c5 100644 --- a/shared/radeon_irq.c +++ b/shared/radeon_irq.c @@ -70,13 +70,12 @@ void DRM(dma_service)( DRM_IRQ_ARGS ) DRM_WAKEUP( &dev_priv->swi_queue ); } -#if __HAVE_VBL_IRQ /* VBLANK interrupt */ if (stat & RADEON_CRTC_VBLANK_STAT) { atomic_inc(&dev->vbl_received); DRM_WAKEUP(&dev->vbl_queue); + DRM(vbl_send_signals)( dev ); } -#endif /* Acknowledge all the bits in GEN_INT_STATUS -- seem to get * more than we asked for... @@ -138,7 +137,6 @@ int radeon_emit_and_wait_irq(drm_device_t *dev) } -#if __HAVE_VBL_IRQ int DRM(vblank_wait)(drm_device_t *dev, unsigned int *sequence) { drm_radeon_private_t *dev_priv = @@ -161,13 +159,12 @@ 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; return ret; } -#endif /* Needs the lock as it touches the ring. |