mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-14 06:28:05 +02:00
Put PRIMEND write after DMAPADs to prevent race condition.
This commit is contained in:
parent
5f15407b9c
commit
c76a35b3c8
1 changed files with 3 additions and 6 deletions
|
|
@ -1158,10 +1158,6 @@ void mga_do_dma_flush( drm_mga_private_t *dev_priv )
|
|||
|
||||
tail = primary->tail + dev_priv->primary->offset;
|
||||
|
||||
mga_flush_write_combine();
|
||||
|
||||
MGA_WRITE( MGA_PRIMEND, tail | MGA_PRIMNOSTART | MGA_PAGPXFER );
|
||||
|
||||
BEGIN_DMA( 1 );
|
||||
|
||||
DMA_BLOCK( MGA_DMAPAD, 0x00000000,
|
||||
|
|
@ -1171,6 +1167,9 @@ void mga_do_dma_flush( drm_mga_private_t *dev_priv )
|
|||
|
||||
ADVANCE_DMA();
|
||||
|
||||
mga_flush_write_combine();
|
||||
MGA_WRITE( MGA_PRIMEND, tail | MGA_PRIMNOSTART | MGA_PAGPXFER );
|
||||
|
||||
head = *primary->head;
|
||||
|
||||
DRM_DEBUG( " head = 0x%06lx\n", head - dev_priv->primary->offset );
|
||||
|
|
@ -1209,7 +1208,6 @@ void mga_do_dma_wrap( drm_mga_private_t *dev_priv )
|
|||
tail = primary->tail + dev_priv->primary->offset;
|
||||
|
||||
mga_flush_write_combine();
|
||||
|
||||
MGA_WRITE( MGA_PRIMEND, tail | MGA_PRIMNOSTART | MGA_PAGPXFER );
|
||||
|
||||
spin_lock_irqsave( &primary->lock, flags );
|
||||
|
|
@ -1265,7 +1263,6 @@ static void mga_dma_service( int irq, void *device, struct pt_regs *regs )
|
|||
DRM_DEBUG( " tail = 0x%06x\n", tail - dev_priv->primary->offset );
|
||||
|
||||
mga_flush_write_combine();
|
||||
|
||||
MGA_WRITE( MGA_PRIMADDRESS, head | MGA_DMA_GENERAL );
|
||||
MGA_WRITE( MGA_PRIMEND, tail | MGA_PRIMNOSTART | MGA_PAGPXFER );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue