diff options
author | Michel Daenzer <michel@daenzer.net> | 2002-11-30 14:24:07 +0000 |
---|---|---|
committer | Michel Daenzer <michel@daenzer.net> | 2002-11-30 14:24:07 +0000 |
commit | 40891ac190fb74f389ea1a9758249a2f642fd99b (patch) | |
tree | 00acdea17e37ac7578a68bba12b739d1366f6637 /shared-core | |
parent | c869f4a1e59c4fa0bed5681cad5ad49e685603eb (diff) |
vertical blank ioctl can send signal instead of blocking
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/drm.h | 21 | ||||
-rw-r--r-- | shared-core/mga_irq.c | 4 | ||||
-rw-r--r-- | shared-core/r128_irq.c | 4 | ||||
-rw-r--r-- | shared-core/radeon_irq.c | 8 |
4 files changed, 29 insertions, 8 deletions
diff --git a/shared-core/drm.h b/shared-core/drm.h index f26d4442..d3c9f158 100644 --- a/shared-core/drm.h +++ b/shared-core/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-core/mga_irq.c b/shared-core/mga_irq.c index 568d193f..30ee7834 100644 --- a/shared-core/mga_irq.c +++ b/shared-core/mga_irq.c @@ -50,6 +50,10 @@ void mga_dma_service( DRM_IRQ_ARGS ) MGA_WRITE( MGA_ICLEAR, MGA_VLINEICLR ); atomic_inc(&dev->vbl_received); DRM_WAKEUP(&dev->vbl_queue); + + /* kick off bottom half for signals */ + queue_task(&dev->vbl_tq, &tq_immediate); + mark_bh(IMMEDIATE_BH); } } diff --git a/shared-core/r128_irq.c b/shared-core/r128_irq.c index a29a81b5..722f2362 100644 --- a/shared-core/r128_irq.c +++ b/shared-core/r128_irq.c @@ -50,6 +50,10 @@ 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); + + /* kick off bottom half for signals */ + queue_task(&dev->vbl_tq, &tq_immediate); + mark_bh(IMMEDIATE_BH); } } diff --git a/shared-core/radeon_irq.c b/shared-core/radeon_irq.c index 54702bee..b8f33f95 100644 --- a/shared-core/radeon_irq.c +++ b/shared-core/radeon_irq.c @@ -70,13 +70,15 @@ 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); + + /* kick off bottom half for signals */ + queue_task(&dev->vbl_tq, &tq_immediate); + mark_bh(IMMEDIATE_BH); } -#endif /* Acknowledge all the bits in GEN_INT_STATUS -- seem to get * more than we asked for... @@ -138,7 +140,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 = @@ -167,7 +168,6 @@ int DRM(vblank_wait)(drm_device_t *dev, unsigned int *sequence) return ret; } -#endif /* Needs the lock as it touches the ring. |