Lines Matching refs:prim_buffer

289 	drm_mga_prim_buf_t *prim_buffer;  in mga_init_primary_bufs()  local
319 prim_buffer = drm_alloc(sizeof(drm_mga_prim_buf_t), in mga_init_primary_bufs()
321 if(prim_buffer == NULL) return -ENOMEM; in mga_init_primary_bufs()
322 memset(prim_buffer, 0, sizeof(drm_mga_prim_buf_t)); in mga_init_primary_bufs()
323 prim_buffer->phys_head = offset + dev->agp->base; in mga_init_primary_bufs()
324 prim_buffer->current_dma_ptr = in mga_init_primary_bufs()
325 prim_buffer->head = in mga_init_primary_bufs()
329 prim_buffer->num_dwords = 0; in mga_init_primary_bufs()
330 prim_buffer->max_dwords = size_of_buf / sizeof(u32); in mga_init_primary_bufs()
331 prim_buffer->max_dwords -= 5; /* Leave room for the softrap */ in mga_init_primary_bufs()
332 prim_buffer->sec_used = 0; in mga_init_primary_bufs()
333 prim_buffer->idx = i; in mga_init_primary_bufs()
334 prim_buffer->prim_age = i + 1; in mga_init_primary_bufs()
336 dev_priv->prim_bufs[i] = prim_buffer; in mga_init_primary_bufs()
429 drm_mga_prim_buf_t *prim_buffer; in mga_advance_primary() local
441 prim_buffer = dev_priv->prim_bufs[next_prim_idx]; in mga_advance_primary()
446 if(test_and_set_bit(MGA_BUF_IN_USE, &prim_buffer->buffer_status)) { in mga_advance_primary()
452 &prim_buffer->buffer_status)) in mga_advance_primary()
469 prim_buffer->current_dma_ptr = prim_buffer->head; in mga_advance_primary()
470 prim_buffer->num_dwords = 0; in mga_advance_primary()
471 prim_buffer->sec_used = 0; in mga_advance_primary()
472 prim_buffer->prim_age = dev_priv->next_prim_age++; in mga_advance_primary()
473 if(prim_buffer->prim_age == 0 || prim_buffer->prim_age == 0xffffffff) { in mga_advance_primary()
477 prim_buffer->prim_age = (dev_priv->next_prim_age += 2); in mga_advance_primary()
481 clear_bit(MGA_BUF_NEEDS_OVERFLOW, &prim_buffer->buffer_status); in mga_advance_primary()
482 clear_bit(MGA_BUF_FORCE_FIRE, &prim_buffer->buffer_status); in mga_advance_primary()
483 clear_bit(MGA_BUF_SWAP_PENDING, &prim_buffer->buffer_status); in mga_advance_primary()
485 dev_priv->current_prim = prim_buffer; in mga_advance_primary()