mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-11 07:18:08 +02:00
merge from trunk
This commit is contained in:
parent
ebad310901
commit
97bee70a1a
4 changed files with 22 additions and 4 deletions
|
|
@ -142,7 +142,7 @@ do { \
|
|||
#define DRM_HZ hz
|
||||
|
||||
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
|
||||
while (condition) { \
|
||||
while (!condition) { \
|
||||
ret = tsleep( &(queue), PZERO | PCATCH, "drmwtq", (timeout) ); \
|
||||
if ( ret ) \
|
||||
return ret; \
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ do { \
|
|||
#define DRM_HZ hz
|
||||
|
||||
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
|
||||
while (condition) { \
|
||||
while (!condition) { \
|
||||
ret = tsleep( &(queue), PZERO | PCATCH, "drmwtq", (timeout) ); \
|
||||
if ( ret ) \
|
||||
return ret; \
|
||||
|
|
|
|||
|
|
@ -157,9 +157,18 @@ 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;
|
||||
u32 status = 0;
|
||||
int i;
|
||||
DMA_LOCALS;
|
||||
DRM_DEBUG( "\n" );
|
||||
|
||||
/* We need to wait so that we can do an safe flush */
|
||||
for ( i = 0 ; i < dev_priv->usec_timeout ; i++ ) {
|
||||
status = MGA_READ( MGA_STATUS ) & MGA_ENGINE_IDLE_MASK;
|
||||
if ( status == MGA_ENDPRDMASTS ) break;
|
||||
udelay( 1 );
|
||||
}
|
||||
|
||||
if ( primary->tail == primary->last_flush ) {
|
||||
DRM_DEBUG( " bailing out...\n" );
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -157,9 +157,18 @@ 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;
|
||||
u32 status = 0;
|
||||
int i;
|
||||
DMA_LOCALS;
|
||||
DRM_DEBUG( "\n" );
|
||||
|
||||
/* We need to wait so that we can do an safe flush */
|
||||
for ( i = 0 ; i < dev_priv->usec_timeout ; i++ ) {
|
||||
status = MGA_READ( MGA_STATUS ) & MGA_ENGINE_IDLE_MASK;
|
||||
if ( status == MGA_ENDPRDMASTS ) break;
|
||||
udelay( 1 );
|
||||
}
|
||||
|
||||
if ( primary->tail == primary->last_flush ) {
|
||||
DRM_DEBUG( " bailing out...\n" );
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue