mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-07 19:18:04 +02:00
texture aging
This commit is contained in:
parent
72abcbcf88
commit
378cc6b8cf
6 changed files with 559 additions and 236 deletions
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
#define BEGIN_LP_RING(n) do { \
|
||||
if (I810_VERBOSE) \
|
||||
printk("BEGIN_LP_RING(%d) in %s\n", n, __FUNCTION__); \
|
||||
DRM_DEBUG("BEGIN_LP_RING(%d) in %s\n", n, __FUNCTION__); \
|
||||
if (dev_priv->ring.space < n*4) i810_wait_ring(dev, n*4, 0); \
|
||||
dev_priv->ring.space -= n*4; \
|
||||
outring = dev_priv->ring.tail; \
|
||||
|
|
@ -65,13 +65,13 @@
|
|||
} while (0)
|
||||
|
||||
#define ADVANCE_LP_RING() do { \
|
||||
if (I810_VERBOSE) printk("ADVANCE_LP_RING\n"); \
|
||||
if (I810_VERBOSE) DRM_DEBUG("ADVANCE_LP_RING\n"); \
|
||||
dev_priv->ring.tail = outring; \
|
||||
I810_WRITE(LP_RING + RING_TAIL, outring); \
|
||||
} while(0)
|
||||
|
||||
#define OUT_RING(n) do { \
|
||||
if (I810_VERBOSE) printk(" OUT_RING %x\n", (int)(n)); \
|
||||
if (I810_VERBOSE) DRM_DEBUG(" OUT_RING %x\n", (int)(n)); \
|
||||
*(volatile unsigned int *)(virt + outring) = n; \
|
||||
outring += 4; \
|
||||
outring &= ringmask; \
|
||||
|
|
@ -115,12 +115,12 @@ static int i810_alloc_kernel_queue(drm_device_t *dev)
|
|||
* queue is empty.
|
||||
*/
|
||||
queue = dev->queuelist[DRM_KERNEL_CONTEXT];
|
||||
printk("Kernel queue already allocated\n");
|
||||
DRM_DEBUG("Kernel queue already allocated\n");
|
||||
} else {
|
||||
queue = drm_alloc(sizeof(*queue), DRM_MEM_QUEUES);
|
||||
if(!queue) {
|
||||
up(&dev->struct_sem);
|
||||
printk("out of memory\n");
|
||||
DRM_DEBUG("out of memory\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
++dev->queue_count;
|
||||
|
|
@ -129,7 +129,7 @@ static int i810_alloc_kernel_queue(drm_device_t *dev)
|
|||
if(!dev->queuelist) {
|
||||
up(&dev->struct_sem);
|
||||
drm_free(queue, sizeof(*queue), DRM_MEM_QUEUES);
|
||||
printk("out of memory\n");
|
||||
DRM_DEBUG("out of memory\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
|
@ -157,13 +157,13 @@ static int i810_alloc_kernel_queue(drm_device_t *dev)
|
|||
dev->queue_count--;
|
||||
|
||||
up(&dev->struct_sem);
|
||||
printk("%d (new)\n", dev->queue_count - 1);
|
||||
if (I810_VERBOSE) DRM_DEBUG("%d (new)\n", dev->queue_count - 1);
|
||||
return DRM_KERNEL_CONTEXT;
|
||||
}
|
||||
|
||||
static int i810_dma_cleanup(drm_device_t *dev)
|
||||
{
|
||||
printk("i810_dma_cleanup\n");
|
||||
if (I810_VERBOSE) DRM_DEBUG("i810_dma_cleanup\n");
|
||||
|
||||
if(dev->dev_private) {
|
||||
drm_i810_private_t *dev_priv =
|
||||
|
|
@ -202,7 +202,7 @@ static int i810_wait_ring(drm_device_t *dev, int n, int timeout_millis)
|
|||
|
||||
if (timeout_millis == 0) timeout_millis = 3000;
|
||||
|
||||
printk( "i810_wait_ring %d\n", n);
|
||||
if (I810_VERBOSE) DRM_DEBUG( "i810_wait_ring %d\n", n);
|
||||
|
||||
while (ring->space < n) {
|
||||
int i;
|
||||
|
|
@ -234,15 +234,15 @@ static void i810_kernel_lost_context(drm_device_t *dev)
|
|||
drm_i810_private_t *dev_priv = dev->dev_private;
|
||||
drm_i810_ring_buffer_t *ring = &(dev_priv->ring);
|
||||
|
||||
printk("i810_kernel_lost_context, old ring (%x,%x)\n",
|
||||
ring->head, ring->tail);
|
||||
if (0) DRM_DEBUG("i810_kernel_lost_context, old ring (%x,%x)\n",
|
||||
ring->head, ring->tail);
|
||||
|
||||
ring->head = I810_READ(LP_RING + RING_HEAD) & HEAD_ADDR;
|
||||
ring->tail = I810_READ(LP_RING + RING_TAIL);
|
||||
ring->space = ring->head - (ring->tail+8);
|
||||
if (ring->space < 0) ring->space += ring->Size;
|
||||
|
||||
printk("new ring (%x,%x)\n", ring->head, ring->tail);
|
||||
if (0) DRM_DEBUG("new ring (%x,%x)\n", ring->head, ring->tail);
|
||||
}
|
||||
|
||||
static inline void i810_ring_write_status(drm_device_t *dev)
|
||||
|
|
@ -271,11 +271,11 @@ static inline void i810_print_status_page(drm_device_t *dev)
|
|||
drm_i810_private_t *dev_priv = dev->dev_private;
|
||||
u32 *temp = (u32 *)dev_priv->hw_status_page;
|
||||
|
||||
printk( "hw_status: Interrupt Status : %x\n", temp[0]);
|
||||
printk( "hw_status: LpRing Head ptr : %x\n", temp[1]);
|
||||
printk( "hw_status: IRing Head ptr : %x\n", temp[2]);
|
||||
printk( "hw_status: Reserved : %x\n", temp[3]);
|
||||
printk( "hw_status: Driver Counter : %d\n", temp[5]);
|
||||
DRM_DEBUG( "hw_status: Interrupt Status : %x\n", temp[0]);
|
||||
DRM_DEBUG( "hw_status: LpRing Head ptr : %x\n", temp[1]);
|
||||
DRM_DEBUG( "hw_status: IRing Head ptr : %x\n", temp[2]);
|
||||
DRM_DEBUG( "hw_status: Reserved : %x\n", temp[3]);
|
||||
DRM_DEBUG( "hw_status: Driver Counter : %d\n", temp[5]);
|
||||
}
|
||||
|
||||
static int i810_dma_initialize(drm_device_t *dev,
|
||||
|
|
@ -284,7 +284,7 @@ static int i810_dma_initialize(drm_device_t *dev,
|
|||
{
|
||||
drm_map_t *sarea_map;
|
||||
|
||||
printk( "i810_dma_init\n");
|
||||
DRM_DEBUG( "i810_dma_init\n");
|
||||
dev->dev_private = (void *) dev_priv;
|
||||
memset(dev_priv, 0, sizeof(drm_i810_private_t));
|
||||
|
||||
|
|
@ -335,16 +335,16 @@ static int i810_dma_initialize(drm_device_t *dev,
|
|||
DRM_ERROR("Can not allocate hardware status page\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
printk("hw status page @ %lx\n", dev_priv->hw_status_page);
|
||||
DRM_DEBUG("hw status page @ %lx\n", dev_priv->hw_status_page);
|
||||
|
||||
I810_WRITE(0x02080, virt_to_bus((void *)dev_priv->hw_status_page));
|
||||
printk("Enabled hardware status page\n");
|
||||
DRM_DEBUG("Enabled hardware status page\n");
|
||||
#if 0
|
||||
printk("Doing first ring buffer write\n");
|
||||
DRM_DEBUG("Doing first ring buffer write\n");
|
||||
i810_ring_write_status(dev);
|
||||
printk("First ring write succeeded\n");
|
||||
DRM_DEBUG("First ring write succeeded\n");
|
||||
i810_print_status_page(dev);
|
||||
printk("Status page dump succeeded\n");
|
||||
DRM_DEBUG("Status page dump succeeded\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -381,18 +381,21 @@ int i810_dma_init(struct inode *inode, struct file *filp,
|
|||
|
||||
static void i810_dma_dispatch_general(drm_device_t *dev, drm_buf_t *buf)
|
||||
{
|
||||
drm_i810_buf_priv_t *buf_priv = buf->dev_private;
|
||||
drm_i810_private_t *dev_priv = dev->dev_private;
|
||||
drm_i810_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
||||
unsigned long address = (unsigned long)buf->bus_address;
|
||||
unsigned long start = address - dev->agp->base;
|
||||
int length = buf->used;
|
||||
RING_LOCALS;
|
||||
|
||||
dev_priv->counter++;
|
||||
printk( "dispatch counter : %ld\n", dev_priv->counter);
|
||||
printk( "i810_dma_dispatch\n");
|
||||
printk( "start : 0x%lx\n", start);
|
||||
printk( "length : 0x%x\n", length);
|
||||
printk( "start + length - 4 : 0x%lx\n", start + length - 4);
|
||||
sarea_priv->last_dispatch = buf_priv->age;
|
||||
dev_priv->counter++;
|
||||
DRM_DEBUG( "dispatch counter : %ld\n", dev_priv->counter);
|
||||
DRM_DEBUG( "i810_dma_dispatch\n");
|
||||
DRM_DEBUG( "start : 0x%lx\n", start);
|
||||
DRM_DEBUG( "length : 0x%x\n", length);
|
||||
DRM_DEBUG( "start + length - 4 : 0x%lx\n", start + length - 4);
|
||||
i810_kernel_lost_context(dev);
|
||||
|
||||
|
||||
|
|
@ -407,7 +410,7 @@ static void i810_dma_dispatch_general(drm_device_t *dev, drm_buf_t *buf)
|
|||
OUT_RING( GFX_OP_BREAKPOINT_INTERRUPT );
|
||||
ADVANCE_LP_RING();
|
||||
|
||||
i810_print_status_page(dev);
|
||||
/* i810_print_status_page(dev); */
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -418,6 +421,7 @@ static void i810_dma_dispatch_vertex(drm_device_t *dev, drm_buf_t *buf)
|
|||
{
|
||||
drm_i810_private_t *dev_priv = dev->dev_private;
|
||||
drm_i810_buf_priv_t *buf_priv = buf->dev_private;
|
||||
drm_i810_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
||||
drm_buf_t *real_buf = dev->dma->buflist[ buf_priv->vertex_real_idx ];
|
||||
unsigned long address = (unsigned long)real_buf->bus_address;
|
||||
unsigned long start = address - dev->agp->base;
|
||||
|
|
@ -427,15 +431,16 @@ static void i810_dma_dispatch_vertex(drm_device_t *dev, drm_buf_t *buf)
|
|||
RING_LOCALS;
|
||||
|
||||
if (I810_VERBOSE)
|
||||
printk("dispatch vertex addr 0x%lx, length 0x%x nbox %d\n",
|
||||
DRM_DEBUG("dispatch vertex addr 0x%lx, length 0x%x nbox %d\n",
|
||||
address, length, buf_priv->nbox);
|
||||
|
||||
dev_priv->counter++;
|
||||
printk( "dispatch counter : %ld\n", dev_priv->counter);
|
||||
printk( "i810_dma_dispatch\n");
|
||||
printk( "start : %lx\n", start);
|
||||
printk( "length : %d\n", length);
|
||||
printk( "start + length - 4 : %ld\n", start + length - 4);
|
||||
sarea_priv->last_dispatch = buf_priv->age;
|
||||
dev_priv->counter++;
|
||||
DRM_DEBUG( "dispatch counter : %ld\n", dev_priv->counter);
|
||||
DRM_DEBUG( "i810_dma_dispatch\n");
|
||||
DRM_DEBUG( "start : %lx\n", start);
|
||||
DRM_DEBUG( "length : %d\n", length);
|
||||
DRM_DEBUG( "start + length - 4 : %ld\n", start + length - 4);
|
||||
i810_kernel_lost_context(dev);
|
||||
|
||||
if (!buf_priv->vertex_discard) {
|
||||
|
|
@ -478,7 +483,8 @@ static inline void i810_dma_quiescent(drm_device_t *dev)
|
|||
{
|
||||
drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
|
||||
|
||||
printk( "i810_dma_quiescent\n");
|
||||
|
||||
/* DRM_DEBUG( "i810_dma_quiescent\n"); */
|
||||
while(1) {
|
||||
atomic_inc(&dev_priv->dispatch_lock);
|
||||
if(atomic_read(&dev_priv->dispatch_lock) == 1) {
|
||||
|
|
@ -493,13 +499,13 @@ static inline void i810_dma_quiescent(drm_device_t *dev)
|
|||
static inline void i810_dma_ready(drm_device_t *dev)
|
||||
{
|
||||
i810_dma_quiescent(dev);
|
||||
printk( "i810_dma_ready\n");
|
||||
/* DRM_DEBUG( "i810_dma_ready\n"); */
|
||||
}
|
||||
|
||||
static inline int i810_dma_is_ready(drm_device_t *dev)
|
||||
{
|
||||
drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
|
||||
printk( "i810_dma_is_ready\n");
|
||||
/* DRM_DEBUG( "i810_dma_is_ready\n"); */
|
||||
atomic_inc(&dev_priv->dispatch_lock);
|
||||
if(atomic_read(&dev_priv->dispatch_lock) == 1) {
|
||||
/* We got the lock */
|
||||
|
|
@ -532,8 +538,8 @@ static void i810_dma_service(int irq, void *device, struct pt_regs *regs)
|
|||
u16 temp;
|
||||
|
||||
atomic_inc(&dev->total_irq);
|
||||
printk("Interrupt Handler\n");
|
||||
i810_print_status_page(dev);
|
||||
/* DRM_DEBUG("Interrupt Handler\n"); */
|
||||
/* i810_print_status_page(dev); */
|
||||
temp = I810_READ16(I810REG_INT_IDENTITY_R);
|
||||
temp = temp & ~(0x6000);
|
||||
if(temp != 0) I810_WRITE16(I810REG_INT_IDENTITY_R,
|
||||
|
|
@ -566,7 +572,7 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
drm_i810_buf_priv_t *buf_priv;
|
||||
|
||||
|
||||
printk("i810_do_dma\n");
|
||||
DRM_DEBUG("i810_do_dma\n");
|
||||
if (test_and_set_bit(0, &dev->dma_flag)) {
|
||||
atomic_inc(&dma->total_missed_dma);
|
||||
return -EBUSY;
|
||||
|
|
@ -580,16 +586,19 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
|
||||
buf = dma->next_buffer;
|
||||
|
||||
printk("context %d, buffer %d\n", buf->context, buf->idx);
|
||||
DRM_DEBUG("context %d, buffer %d\n", buf->context, buf->idx);
|
||||
|
||||
if (buf->list == DRM_LIST_RECLAIM) {
|
||||
drm_clear_next_buffer(dev);
|
||||
drm_free_buffer(dev, buf);
|
||||
atomic_dec(&dev_priv->pending_bufs);
|
||||
if(!(atomic_read(&dev_priv->pending_bufs))) {
|
||||
DRM_DEBUG("i810_do_dma: pending %d\n",atomic_read( &dev_priv->pending_bufs ));
|
||||
if(!(atomic_read(&dev_priv->pending_bufs))) {
|
||||
wake_up_interruptible(&dev->queuelist[DRM_KERNEL_CONTEXT]->flush_queue);
|
||||
}
|
||||
clear_bit(0, &dev->dma_flag);
|
||||
DRM_DEBUG("RECLIAM\n");
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -598,27 +607,31 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
drm_clear_next_buffer(dev);
|
||||
drm_free_buffer(dev, buf);
|
||||
clear_bit(0, &dev->dma_flag);
|
||||
DRM_DEBUG("NOT USED\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (i810_dma_is_ready(dev) == 0) {
|
||||
clear_bit(0, &dev->dma_flag);
|
||||
DRM_DEBUG("NOT READY\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
/* Always hold the hardware lock while dispatching.
|
||||
*/
|
||||
|
||||
if ( ((!locked) ||
|
||||
(atomic_read(&dev_priv->in_flush) != 1))
|
||||
&& !drm_lock_take(&dev->lock.hw_lock->lock,
|
||||
DRM_KERNEL_CONTEXT)) {
|
||||
DRM_DEBUG("--inflush: %d\n", atomic_read(&dev_priv->in_flush));
|
||||
|
||||
if ( !locked &&
|
||||
!atomic_read(&dev_priv->in_flush) &&
|
||||
!drm_lock_take(&dev->lock.hw_lock->lock, DRM_KERNEL_CONTEXT))
|
||||
{
|
||||
atomic_inc(&dma->total_missed_lock);
|
||||
clear_bit(0, &dev->dma_flag);
|
||||
atomic_dec(&dev_priv->dispatch_lock);
|
||||
DRM_DEBUG("NOT LOCKED\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
|
||||
dma->next_queue = dev->queuelist[DRM_KERNEL_CONTEXT];
|
||||
drm_clear_next_buffer(dev);
|
||||
buf->pending = 1;
|
||||
|
|
@ -626,7 +639,12 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
buf->list = DRM_LIST_PEND;
|
||||
|
||||
buf_priv = buf->dev_private;
|
||||
if (I810_VERBOSE) printk("i810_do_dma - type %d\n", buf_priv->dma_type);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DRM_DEBUG("i810_do_dma - type %d\n", buf_priv->dma_type);
|
||||
|
||||
switch (buf_priv->dma_type) {
|
||||
case I810_DMA_GENERAL:
|
||||
|
|
@ -636,10 +654,11 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
i810_dma_dispatch_vertex( dev, buf );
|
||||
break;
|
||||
default:
|
||||
printk("bad buffer type %x in dispatch\n", buf_priv->dma_type);
|
||||
DRM_DEBUG("bad buffer type %x in dispatch\n", buf_priv->dma_type);
|
||||
break;
|
||||
}
|
||||
|
||||
DRM_DEBUG("DONE\n");
|
||||
|
||||
atomic_dec(&dev_priv->pending_bufs);
|
||||
|
||||
|
|
@ -652,8 +671,9 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
atomic_add(buf->used, &dma->total_bytes);
|
||||
atomic_inc(&dma->total_dmas);
|
||||
|
||||
if ((!locked)
|
||||
|| (atomic_read(&dev_priv->in_flush) != 1)) {
|
||||
DRM_DEBUG("inflush: %d\n", atomic_read(&dev_priv->in_flush));
|
||||
if (!locked &&
|
||||
!atomic_read(&dev_priv->in_flush)) {
|
||||
if (drm_lock_free(dev, &dev->lock.hw_lock->lock,
|
||||
DRM_KERNEL_CONTEXT)) {
|
||||
DRM_ERROR("\n");
|
||||
|
|
@ -662,6 +682,7 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
|
||||
clear_bit(0, &dev->dma_flag);
|
||||
|
||||
DRM_DEBUG("i810_do_dma2: pending %d\n",atomic_read( &dev_priv->pending_bufs ));
|
||||
if(!(atomic_read(&dev_priv->pending_bufs))) {
|
||||
wake_up_interruptible(&dev->queuelist[DRM_KERNEL_CONTEXT]->flush_queue);
|
||||
}
|
||||
|
|
@ -674,7 +695,8 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
|
||||
static void i810_dma_schedule_tq_wrapper(void *dev)
|
||||
{
|
||||
i810_dma_schedule(dev, 0);
|
||||
drm_i810_private_t *dev_priv = ((drm_device_t *)dev)->dev_private;
|
||||
i810_dma_schedule(dev, atomic_read(&dev_priv->in_flush));
|
||||
}
|
||||
|
||||
int i810_dma_schedule(drm_device_t *dev, int locked)
|
||||
|
|
@ -689,7 +711,7 @@ int i810_dma_schedule(drm_device_t *dev, int locked)
|
|||
drm_i810_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
|
||||
printk("i810_dma_schedule\n");
|
||||
DRM_DEBUG("i810_dma_schedule\n");
|
||||
|
||||
if (test_and_set_bit(0, &dev->interrupt_flag)) {
|
||||
/* Not reentrant */
|
||||
|
|
@ -707,11 +729,12 @@ again:
|
|||
dma->next_buffer = buf;
|
||||
dma->next_queue = q;
|
||||
if (buf && buf->list == DRM_LIST_RECLAIM) {
|
||||
printk("reclaiming in i810_dma_schedule\n");
|
||||
DRM_DEBUG("reclaiming in i810_dma_schedule\n");
|
||||
drm_clear_next_buffer(dev);
|
||||
drm_free_buffer(dev, buf);
|
||||
atomic_dec(&dev_priv->pending_bufs);
|
||||
printk("pending bufs : %d\n", atomic_read(&dev_priv->pending_bufs));
|
||||
DRM_DEBUG("fred pending bufs : %d\n",
|
||||
atomic_read(&dev_priv->pending_bufs));
|
||||
if(!(atomic_read(&dev_priv->pending_bufs))) {
|
||||
wake_up_interruptible(&dev->queuelist[DRM_KERNEL_CONTEXT]->flush_queue);
|
||||
}
|
||||
|
|
@ -724,6 +747,8 @@ again:
|
|||
if (!(retcode = i810_do_dma(dev, locked)))
|
||||
++processed;
|
||||
}
|
||||
DRM_DEBUG("ixxx810_do_dma: pending %d\n",atomic_read( &dev_priv->pending_bufs ));
|
||||
|
||||
if(!(atomic_read(&dev_priv->pending_bufs))) {
|
||||
wake_up_interruptible(&dev->queuelist[DRM_KERNEL_CONTEXT]->flush_queue);
|
||||
}
|
||||
|
|
@ -767,8 +792,7 @@ int i810_irq_install(drm_device_t *dev, int irq)
|
|||
dev->irq = irq;
|
||||
up(&dev->struct_sem);
|
||||
|
||||
printk( "Interrupt Install : %d\n", irq);
|
||||
printk("%d\n", irq);
|
||||
DRM_DEBUG( "Interrupt Install : %d\n", irq);
|
||||
|
||||
dev->context_flag = 0;
|
||||
dev->interrupt_flag = 0;
|
||||
|
|
@ -826,10 +850,7 @@ int i810_irq_uninstall(drm_device_t *dev)
|
|||
|
||||
if (!irq) return -EINVAL;
|
||||
|
||||
printk( "Interrupt UnInstall: %d\n", irq);
|
||||
|
||||
|
||||
printk("%d\n", irq);
|
||||
DRM_DEBUG( "Interrupt UnInstall: %d\n", irq);
|
||||
|
||||
temp = I810_READ16(I810REG_INT_IDENTITY_R);
|
||||
temp = temp & ~(0x6000);
|
||||
|
|
@ -854,7 +875,7 @@ int i810_control(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
drm_control_t ctl;
|
||||
int retcode;
|
||||
|
||||
printk( "i810_control\n");
|
||||
/* DRM_DEBUG( "i810_control\n"); */
|
||||
|
||||
copy_from_user_ret(&ctl, (drm_control_t *)arg, sizeof(ctl), -EFAULT);
|
||||
|
||||
|
|
@ -880,24 +901,24 @@ int i810_flush_queue(drm_device_t *dev)
|
|||
drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
|
||||
int ret = 0;
|
||||
|
||||
printk("i810_flush_queue\n");
|
||||
printk("pending_bufs : %d\n", atomic_read(&dev_priv->pending_bufs));
|
||||
DRM_DEBUG("i810_flush_queue\n");
|
||||
DRM_DEBUG("pending_bufs : %d\n", atomic_read(&dev_priv->pending_bufs));
|
||||
if(atomic_read(&dev_priv->pending_bufs) != 0) {
|
||||
printk("got to flush\n");
|
||||
DRM_DEBUG("got to flush\n");
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
add_wait_queue(&q->flush_queue, &entry);
|
||||
for (;;) {
|
||||
if (!atomic_read(&dev_priv->pending_bufs)) break;
|
||||
printk("Calling schedule from flush_queue : %d\n",
|
||||
DRM_DEBUG("Calling schedule from flush_queue : %d\n",
|
||||
atomic_read(&dev_priv->pending_bufs));
|
||||
i810_dma_schedule(dev, 0);
|
||||
schedule();
|
||||
schedule_timeout(DRM_LOCK_SLICE);
|
||||
if (signal_pending(current)) {
|
||||
ret = -EINTR; /* Can't restart */
|
||||
break;
|
||||
}
|
||||
}
|
||||
printk("Exited out of schedule from flush_queue\n");
|
||||
DRM_DEBUG("Exited out of schedule from flush_queue\n");
|
||||
current->state = TASK_RUNNING;
|
||||
remove_wait_queue(&q->flush_queue, &entry);
|
||||
}
|
||||
|
|
@ -924,13 +945,14 @@ int i810_lock(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
printk("%d (pid %d) requests lock (0x%08x), flags = 0x%08x\n",
|
||||
DRM_DEBUG("%d (pid %d) requests lock (0x%08x), flags = 0x%08x\n",
|
||||
lock.context, current->pid, dev->lock.hw_lock->lock,
|
||||
lock.flags);
|
||||
|
||||
if (lock.context < 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Only one queue:
|
||||
*/
|
||||
|
||||
|
|
@ -954,7 +976,7 @@ int i810_lock(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
atomic_inc(&dev->total_sleeps);
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
current->policy |= SCHED_YIELD;
|
||||
printk("Calling lock schedule\n");
|
||||
DRM_DEBUG("Calling lock schedule\n");
|
||||
schedule();
|
||||
if (signal_pending(current)) {
|
||||
ret = -ERESTARTSYS;
|
||||
|
|
@ -967,14 +989,14 @@ int i810_lock(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
|
||||
if (!ret) {
|
||||
if (lock.flags & _DRM_LOCK_QUIESCENT) {
|
||||
printk("_DRM_LOCK_QUIESCENT\n");
|
||||
DRM_DEBUG("_DRM_LOCK_QUIESCENT\n");
|
||||
atomic_set(&dev_priv->in_flush, 1);
|
||||
i810_flush_queue(dev);
|
||||
i810_dma_quiescent(dev);
|
||||
atomic_set(&dev_priv->in_flush, 0);
|
||||
}
|
||||
}
|
||||
printk("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
|
||||
DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -985,7 +1007,7 @@ int i810_flush_ioctl(struct inode *inode, struct file *filp,
|
|||
drm_device_t *dev = priv->dev;
|
||||
drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private;
|
||||
|
||||
printk("i810_flush_ioctl\n");
|
||||
DRM_DEBUG("i810_flush_ioctl\n");
|
||||
atomic_set(&dev_priv->in_flush, 1);
|
||||
i810_flush_queue(dev);
|
||||
i810_dma_quiescent(dev);
|
||||
|
|
|
|||
|
|
@ -157,3 +157,331 @@ $(PROGOBJS): $(PROGHEADERS)
|
|||
clean:
|
||||
rm -f *.o *.a *.po *~ core $(PROGS)
|
||||
|
||||
# DO NOT DELETE
|
||||
|
||||
agpsupport.o: drmP.h
|
||||
auth.o: drmP.h
|
||||
bufs.o: drmP.h /usr/include/linux/un.h
|
||||
context.o: drmP.h
|
||||
ctxbitmap.o: drmP.h
|
||||
dma.o: drmP.h /usr/include/linux/interrupt.h /usr/include/linux/kernel.h
|
||||
dma.o: /usr/include/asm/bitops.h /usr/include/asm/atomic.h
|
||||
dma.o: /usr/include/asm/hardirq.h /usr/include/linux/threads.h
|
||||
dma.o: /usr/include/asm/softirq.h
|
||||
drawable.o: drmP.h
|
||||
drm.o: /usr/include/asm/ioctl.h
|
||||
drmstat.o: /usr/include/stdio.h /usr/include/features.h
|
||||
drmstat.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
|
||||
drmstat.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stddef.h
|
||||
drmstat.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stdarg.h
|
||||
drmstat.o: /usr/include/bits/types.h /usr/include/libio.h
|
||||
drmstat.o: /usr/include/_G_config.h /usr/include/bits/stdio_lim.h
|
||||
drmstat.o: /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h
|
||||
drmstat.o: /usr/include/endian.h /usr/include/bits/endian.h
|
||||
drmstat.o: /usr/include/sys/select.h /usr/include/bits/select.h
|
||||
drmstat.o: /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h
|
||||
drmstat.o: /usr/include/alloca.h /usr/include/unistd.h
|
||||
drmstat.o: /usr/include/bits/posix_opt.h /usr/include/bits/confname.h
|
||||
drmstat.o: /usr/include/getopt.h /usr/include/sys/time.h
|
||||
drmstat.o: /usr/include/bits/time.h /usr/include/sys/mman.h
|
||||
drmstat.o: /usr/include/bits/mman.h /usr/include/strings.h
|
||||
drmstat.o: /usr/include/errno.h /usr/include/bits/errno.h
|
||||
drmstat.o: /usr/include/linux/errno.h /usr/include/asm/errno.h
|
||||
drmstat.o: /usr/include/signal.h /usr/include/bits/signum.h
|
||||
drmstat.o: /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h
|
||||
drmstat.o: /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h
|
||||
drmstat.o: /usr/include/bits/sigstack.h /usr/include/fcntl.h
|
||||
drmstat.o: /usr/include/bits/fcntl.h xf86drm.h
|
||||
fops.o: drmP.h /usr/include/linux/poll.h /usr/include/asm/poll.h
|
||||
gamma_dma.o: drmP.h gamma_drv.h /usr/include/linux/interrupt.h
|
||||
gamma_dma.o: /usr/include/linux/kernel.h /usr/include/asm/bitops.h
|
||||
gamma_dma.o: /usr/include/asm/atomic.h /usr/include/asm/hardirq.h
|
||||
gamma_dma.o: /usr/include/linux/threads.h /usr/include/asm/softirq.h
|
||||
gamma_drv.o: drmP.h gamma_drv.h
|
||||
i810_bufs.o: drmP.h i810_drv.h i810_drm_public.h i810_dma.h
|
||||
i810_bufs.o: /usr/include/linux/un.h
|
||||
i810_clear.o: drmP.h i810_drv.h i810_drm_public.h i810_dma.h
|
||||
i810_context.o: /usr/include/linux/sched.h /usr/include/asm/param.h
|
||||
i810_context.o: /usr/include/linux/binfmts.h /usr/include/linux/ptrace.h
|
||||
i810_context.o: /usr/include/asm/ptrace.h /usr/include/linux/capability.h
|
||||
i810_context.o: /usr/include/linux/types.h /usr/include/linux/config.h
|
||||
i810_context.o: /usr/include/linux/autoconf.h
|
||||
i810_context.o: /usr/include/linux/posix_types.h /usr/include/linux/stddef.h
|
||||
i810_context.o: /usr/include/asm/posix_types.h /usr/include/asm/types.h
|
||||
i810_context.o: /usr/include/linux/fs.h /usr/include/linux/linkage.h
|
||||
i810_context.o: /usr/include/linux/limits.h /usr/include/linux/wait.h
|
||||
i810_context.o: /usr/include/linux/vfs.h /usr/include/asm/statfs.h
|
||||
i810_context.o: /usr/include/linux/net.h /usr/include/linux/socket.h
|
||||
i810_context.o: /usr/include/asm/socket.h /usr/include/asm/sockios.h
|
||||
i810_context.o: /usr/include/linux/sockios.h /usr/include/linux/uio.h
|
||||
i810_context.o: /usr/include/linux/kdev_t.h /usr/include/linux/ioctl.h
|
||||
i810_context.o: /usr/include/asm/ioctl.h /usr/include/linux/list.h
|
||||
i810_context.o: /usr/include/linux/dcache.h /usr/include/linux/stat.h
|
||||
i810_context.o: /usr/include/linux/cache.h /usr/include/asm/cache.h
|
||||
i810_context.o: /usr/include/asm/atomic.h /usr/include/asm/bitops.h
|
||||
i810_context.o: /usr/include/linux/personality.h /usr/include/linux/threads.h
|
||||
i810_context.o: /usr/include/linux/kernel.h /usr/include/linux/times.h
|
||||
i810_context.o: /usr/include/linux/timex.h /usr/include/asm/timex.h
|
||||
i810_context.o: /usr/include/asm/msr.h /usr/include/asm/system.h
|
||||
i810_context.o: /usr/include/asm/segment.h /usr/include/linux/bitops.h
|
||||
i810_context.o: /usr/include/asm/semaphore.h /usr/include/asm/rwlock.h
|
||||
i810_context.o: /usr/include/asm/page.h /usr/include/linux/smp.h
|
||||
i810_context.o: /usr/include/linux/tty.h /usr/include/linux/sem.h
|
||||
i810_context.o: /usr/include/linux/ipc.h /usr/include/asm/ipcbuf.h
|
||||
i810_context.o: /usr/include/asm/sembuf.h /usr/include/linux/signal.h
|
||||
i810_context.o: /usr/include/asm/signal.h /usr/include/asm/siginfo.h
|
||||
i810_context.o: /usr/include/linux/securebits.h /usr/include/linux/time.h
|
||||
i810_context.o: /usr/include/linux/param.h /usr/include/linux/resource.h
|
||||
i810_context.o: /usr/include/asm/resource.h /usr/include/linux/timer.h
|
||||
i810_context.o: /usr/include/asm/processor.h /usr/include/asm/vm86.h
|
||||
i810_context.o: /usr/include/asm/math_emu.h /usr/include/asm/sigcontext.h
|
||||
i810_context.o: drmP.h i810_drv.h i810_drm_public.h
|
||||
i810_dma.o: drmP.h i810_drm_public.h i810_drv.h i810_dma.h
|
||||
i810_dma.o: /usr/include/linux/interrupt.h /usr/include/linux/kernel.h
|
||||
i810_dma.o: /usr/include/asm/bitops.h /usr/include/asm/atomic.h
|
||||
i810_dma.o: /usr/include/asm/hardirq.h /usr/include/linux/threads.h
|
||||
i810_dma.o: /usr/include/asm/softirq.h /usr/include/linux/time.h
|
||||
i810_dma.o: /usr/include/asm/param.h /usr/include/linux/types.h
|
||||
i810_dma.o: /usr/include/linux/config.h /usr/include/linux/autoconf.h
|
||||
i810_dma.o: /usr/include/linux/posix_types.h /usr/include/linux/stddef.h
|
||||
i810_dma.o: /usr/include/asm/posix_types.h /usr/include/asm/types.h
|
||||
i810_dma.o: i810_drm_public.h
|
||||
i810_dma_jeff.o: drmP.h i810_drm_public.h i810_drv.h
|
||||
i810_dma_jeff.o: /usr/include/linux/interrupt.h /usr/include/linux/kernel.h
|
||||
i810_dma_jeff.o: /usr/include/asm/bitops.h /usr/include/asm/atomic.h
|
||||
i810_dma_jeff.o: /usr/include/asm/hardirq.h /usr/include/linux/threads.h
|
||||
i810_dma_jeff.o: /usr/include/asm/softirq.h /usr/include/linux/time.h
|
||||
i810_dma_jeff.o: /usr/include/asm/param.h /usr/include/linux/types.h
|
||||
i810_dma_jeff.o: /usr/include/linux/config.h /usr/include/linux/autoconf.h
|
||||
i810_dma_jeff.o: /usr/include/linux/posix_types.h /usr/include/linux/stddef.h
|
||||
i810_dma_jeff.o: /usr/include/asm/posix_types.h /usr/include/asm/types.h
|
||||
i810_dmamine.o: drmP.h i810_drm_public.h i810_drv.h i810_dma.h
|
||||
i810_dmamine.o: /usr/include/linux/interrupt.h /usr/include/linux/kernel.h
|
||||
i810_dmamine.o: /usr/include/asm/bitops.h /usr/include/asm/atomic.h
|
||||
i810_dmamine.o: /usr/include/asm/hardirq.h /usr/include/linux/threads.h
|
||||
i810_dmamine.o: /usr/include/asm/softirq.h /usr/include/linux/time.h
|
||||
i810_dmamine.o: /usr/include/asm/param.h /usr/include/linux/types.h
|
||||
i810_dmamine.o: /usr/include/linux/config.h /usr/include/linux/autoconf.h
|
||||
i810_dmamine.o: /usr/include/linux/posix_types.h /usr/include/linux/stddef.h
|
||||
i810_dmamine.o: /usr/include/asm/posix_types.h /usr/include/asm/types.h
|
||||
i810_drv.o: drmP.h i810_drv.h i810_drm_public.h i810_dma.h
|
||||
i810_drv.o: i810_drm_public.h
|
||||
init.o: drmP.h
|
||||
ioctl.o: drmP.h
|
||||
lists.o: drmP.h
|
||||
lock.o: drmP.h
|
||||
memory.o: drmP.h
|
||||
mga_bufs.o: drmP.h mga_drv.h mga_drm_public.h mga_dma.h
|
||||
mga_bufs.o: /usr/include/linux/un.h
|
||||
mga_clear.o: drmP.h mga_drv.h mga_drm_public.h mgareg_flags.h mga_dma.h
|
||||
mga_clear.o: mga_state.h
|
||||
mga_context.o: /usr/include/linux/sched.h /usr/include/asm/param.h
|
||||
mga_context.o: /usr/include/linux/binfmts.h /usr/include/linux/ptrace.h
|
||||
mga_context.o: /usr/include/asm/ptrace.h /usr/include/linux/capability.h
|
||||
mga_context.o: /usr/include/linux/types.h /usr/include/linux/config.h
|
||||
mga_context.o: /usr/include/linux/autoconf.h /usr/include/linux/posix_types.h
|
||||
mga_context.o: /usr/include/linux/stddef.h /usr/include/asm/posix_types.h
|
||||
mga_context.o: /usr/include/asm/types.h /usr/include/linux/fs.h
|
||||
mga_context.o: /usr/include/linux/linkage.h /usr/include/linux/limits.h
|
||||
mga_context.o: /usr/include/linux/wait.h /usr/include/linux/vfs.h
|
||||
mga_context.o: /usr/include/asm/statfs.h /usr/include/linux/net.h
|
||||
mga_context.o: /usr/include/linux/socket.h /usr/include/asm/socket.h
|
||||
mga_context.o: /usr/include/asm/sockios.h /usr/include/linux/sockios.h
|
||||
mga_context.o: /usr/include/linux/uio.h /usr/include/linux/kdev_t.h
|
||||
mga_context.o: /usr/include/linux/ioctl.h /usr/include/asm/ioctl.h
|
||||
mga_context.o: /usr/include/linux/list.h /usr/include/linux/dcache.h
|
||||
mga_context.o: /usr/include/linux/stat.h /usr/include/linux/cache.h
|
||||
mga_context.o: /usr/include/asm/cache.h /usr/include/asm/atomic.h
|
||||
mga_context.o: /usr/include/asm/bitops.h /usr/include/linux/personality.h
|
||||
mga_context.o: /usr/include/linux/threads.h /usr/include/linux/kernel.h
|
||||
mga_context.o: /usr/include/linux/times.h /usr/include/linux/timex.h
|
||||
mga_context.o: /usr/include/asm/timex.h /usr/include/asm/msr.h
|
||||
mga_context.o: /usr/include/asm/system.h /usr/include/asm/segment.h
|
||||
mga_context.o: /usr/include/linux/bitops.h /usr/include/asm/semaphore.h
|
||||
mga_context.o: /usr/include/asm/rwlock.h /usr/include/asm/page.h
|
||||
mga_context.o: /usr/include/linux/smp.h /usr/include/linux/tty.h
|
||||
mga_context.o: /usr/include/linux/sem.h /usr/include/linux/ipc.h
|
||||
mga_context.o: /usr/include/asm/ipcbuf.h /usr/include/asm/sembuf.h
|
||||
mga_context.o: /usr/include/linux/signal.h /usr/include/asm/signal.h
|
||||
mga_context.o: /usr/include/asm/siginfo.h /usr/include/linux/securebits.h
|
||||
mga_context.o: /usr/include/linux/time.h /usr/include/linux/param.h
|
||||
mga_context.o: /usr/include/linux/resource.h /usr/include/asm/resource.h
|
||||
mga_context.o: /usr/include/linux/timer.h /usr/include/asm/processor.h
|
||||
mga_context.o: /usr/include/asm/vm86.h /usr/include/asm/math_emu.h
|
||||
mga_context.o: /usr/include/asm/sigcontext.h drmP.h mga_drv.h
|
||||
mga_context.o: mga_drm_public.h
|
||||
mga_dma.o: drmP.h mga_drv.h mga_drm_public.h mgareg_flags.h mga_dma.h
|
||||
mga_dma.o: mga_state.h /usr/include/linux/interrupt.h
|
||||
mga_dma.o: /usr/include/linux/kernel.h /usr/include/asm/bitops.h
|
||||
mga_dma.o: /usr/include/asm/atomic.h /usr/include/asm/hardirq.h
|
||||
mga_dma.o: /usr/include/linux/threads.h /usr/include/asm/softirq.h
|
||||
mga_dma.o: mga_drm_public.h
|
||||
mga_dma_mine.o: drmP.h mga_drv.h mga_drm_public.h mgareg_flags.h mga_dma.h
|
||||
mga_dma_mine.o: mga_state.h /usr/include/linux/interrupt.h
|
||||
mga_dma_mine.o: /usr/include/linux/kernel.h /usr/include/asm/bitops.h
|
||||
mga_dma_mine.o: /usr/include/asm/atomic.h /usr/include/asm/hardirq.h
|
||||
mga_dma_mine.o: /usr/include/linux/threads.h /usr/include/asm/softirq.h
|
||||
mga_dmapoll.o: drmP.h mga_drv.h mga_drm_public.h mgareg_flags.h mga_dma.h
|
||||
mga_dmapoll.o: mga_state.h /usr/include/linux/interrupt.h
|
||||
mga_dmapoll.o: /usr/include/linux/kernel.h /usr/include/asm/bitops.h
|
||||
mga_dmapoll.o: /usr/include/asm/atomic.h /usr/include/asm/hardirq.h
|
||||
mga_dmapoll.o: /usr/include/linux/threads.h /usr/include/asm/softirq.h
|
||||
mga_drv.o: drmP.h mga_drv.h mga_drm_public.h
|
||||
mga_drv.o: mga_drm_public.h
|
||||
mga_state.o: drmP.h mga_drv.h mga_drm_public.h mgareg_flags.h mga_dma.h
|
||||
mga_state.o: mga_state.h drm.h /usr/include/asm/ioctl.h
|
||||
mga_state.o: mga_drv.h mga_drm_public.h
|
||||
proc.o: drmP.h
|
||||
r128_context.o: /usr/include/linux/sched.h /usr/include/asm/param.h
|
||||
r128_context.o: /usr/include/linux/binfmts.h /usr/include/linux/ptrace.h
|
||||
r128_context.o: /usr/include/asm/ptrace.h /usr/include/linux/capability.h
|
||||
r128_context.o: /usr/include/linux/types.h /usr/include/linux/config.h
|
||||
r128_context.o: /usr/include/linux/autoconf.h
|
||||
r128_context.o: /usr/include/linux/posix_types.h /usr/include/linux/stddef.h
|
||||
r128_context.o: /usr/include/asm/posix_types.h /usr/include/asm/types.h
|
||||
r128_context.o: /usr/include/linux/fs.h /usr/include/linux/linkage.h
|
||||
r128_context.o: /usr/include/linux/limits.h /usr/include/linux/wait.h
|
||||
r128_context.o: /usr/include/linux/vfs.h /usr/include/asm/statfs.h
|
||||
r128_context.o: /usr/include/linux/net.h /usr/include/linux/socket.h
|
||||
r128_context.o: /usr/include/asm/socket.h /usr/include/asm/sockios.h
|
||||
r128_context.o: /usr/include/linux/sockios.h /usr/include/linux/uio.h
|
||||
r128_context.o: /usr/include/linux/kdev_t.h /usr/include/linux/ioctl.h
|
||||
r128_context.o: /usr/include/asm/ioctl.h /usr/include/linux/list.h
|
||||
r128_context.o: /usr/include/linux/dcache.h /usr/include/linux/stat.h
|
||||
r128_context.o: /usr/include/linux/cache.h /usr/include/asm/cache.h
|
||||
r128_context.o: /usr/include/asm/atomic.h /usr/include/asm/bitops.h
|
||||
r128_context.o: /usr/include/linux/personality.h /usr/include/linux/threads.h
|
||||
r128_context.o: /usr/include/linux/kernel.h /usr/include/linux/times.h
|
||||
r128_context.o: /usr/include/linux/timex.h /usr/include/asm/timex.h
|
||||
r128_context.o: /usr/include/asm/msr.h /usr/include/asm/system.h
|
||||
r128_context.o: /usr/include/asm/segment.h /usr/include/linux/bitops.h
|
||||
r128_context.o: /usr/include/asm/semaphore.h /usr/include/asm/rwlock.h
|
||||
r128_context.o: /usr/include/asm/page.h /usr/include/linux/smp.h
|
||||
r128_context.o: /usr/include/linux/tty.h /usr/include/linux/sem.h
|
||||
r128_context.o: /usr/include/linux/ipc.h /usr/include/asm/ipcbuf.h
|
||||
r128_context.o: /usr/include/asm/sembuf.h /usr/include/linux/signal.h
|
||||
r128_context.o: /usr/include/asm/signal.h /usr/include/asm/siginfo.h
|
||||
r128_context.o: /usr/include/linux/securebits.h /usr/include/linux/time.h
|
||||
r128_context.o: /usr/include/linux/param.h /usr/include/linux/resource.h
|
||||
r128_context.o: /usr/include/asm/resource.h /usr/include/linux/timer.h
|
||||
r128_context.o: /usr/include/asm/processor.h /usr/include/asm/vm86.h
|
||||
r128_context.o: /usr/include/asm/math_emu.h /usr/include/asm/sigcontext.h
|
||||
r128_context.o: drmP.h r128_drv.h
|
||||
r128_drv.o: drmP.h r128_drv.h
|
||||
sigio.o: /usr/include/unistd.h /usr/include/features.h
|
||||
sigio.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
|
||||
sigio.o: /usr/include/bits/posix_opt.h /usr/include/bits/types.h
|
||||
sigio.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stddef.h
|
||||
sigio.o: /usr/include/bits/confname.h /usr/include/getopt.h
|
||||
sigio.o: /usr/include/signal.h /usr/include/bits/sigset.h
|
||||
sigio.o: /usr/include/bits/signum.h /usr/include/time.h
|
||||
sigio.o: /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h
|
||||
sigio.o: /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h
|
||||
sigio.o: /usr/include/bits/sigstack.h /usr/include/fcntl.h
|
||||
sigio.o: /usr/include/bits/fcntl.h /usr/include/sys/types.h
|
||||
sigio.o: /usr/include/endian.h /usr/include/bits/endian.h
|
||||
sigio.o: /usr/include/sys/select.h /usr/include/bits/select.h
|
||||
sigio.o: /usr/include/sys/sysmacros.h /usr/include/sys/time.h
|
||||
sigio.o: /usr/include/bits/time.h /usr/include/errno.h
|
||||
sigio.o: /usr/include/bits/errno.h /usr/include/linux/errno.h
|
||||
sigio.o: /usr/include/asm/errno.h /usr/include/stdio.h
|
||||
sigio.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stdarg.h
|
||||
sigio.o: /usr/include/libio.h /usr/include/_G_config.h
|
||||
sigio.o: /usr/include/bits/stdio_lim.h /usr/include/string.h
|
||||
tdfx_context.o: /usr/include/linux/sched.h /usr/include/asm/param.h
|
||||
tdfx_context.o: /usr/include/linux/binfmts.h /usr/include/linux/ptrace.h
|
||||
tdfx_context.o: /usr/include/asm/ptrace.h /usr/include/linux/capability.h
|
||||
tdfx_context.o: /usr/include/linux/types.h /usr/include/linux/config.h
|
||||
tdfx_context.o: /usr/include/linux/autoconf.h
|
||||
tdfx_context.o: /usr/include/linux/posix_types.h /usr/include/linux/stddef.h
|
||||
tdfx_context.o: /usr/include/asm/posix_types.h /usr/include/asm/types.h
|
||||
tdfx_context.o: /usr/include/linux/fs.h /usr/include/linux/linkage.h
|
||||
tdfx_context.o: /usr/include/linux/limits.h /usr/include/linux/wait.h
|
||||
tdfx_context.o: /usr/include/linux/vfs.h /usr/include/asm/statfs.h
|
||||
tdfx_context.o: /usr/include/linux/net.h /usr/include/linux/socket.h
|
||||
tdfx_context.o: /usr/include/asm/socket.h /usr/include/asm/sockios.h
|
||||
tdfx_context.o: /usr/include/linux/sockios.h /usr/include/linux/uio.h
|
||||
tdfx_context.o: /usr/include/linux/kdev_t.h /usr/include/linux/ioctl.h
|
||||
tdfx_context.o: /usr/include/asm/ioctl.h /usr/include/linux/list.h
|
||||
tdfx_context.o: /usr/include/linux/dcache.h /usr/include/linux/stat.h
|
||||
tdfx_context.o: /usr/include/linux/cache.h /usr/include/asm/cache.h
|
||||
tdfx_context.o: /usr/include/asm/atomic.h /usr/include/asm/bitops.h
|
||||
tdfx_context.o: /usr/include/linux/personality.h /usr/include/linux/threads.h
|
||||
tdfx_context.o: /usr/include/linux/kernel.h /usr/include/linux/times.h
|
||||
tdfx_context.o: /usr/include/linux/timex.h /usr/include/asm/timex.h
|
||||
tdfx_context.o: /usr/include/asm/msr.h /usr/include/asm/system.h
|
||||
tdfx_context.o: /usr/include/asm/segment.h /usr/include/linux/bitops.h
|
||||
tdfx_context.o: /usr/include/asm/semaphore.h /usr/include/asm/rwlock.h
|
||||
tdfx_context.o: /usr/include/asm/page.h /usr/include/linux/smp.h
|
||||
tdfx_context.o: /usr/include/linux/tty.h /usr/include/linux/sem.h
|
||||
tdfx_context.o: /usr/include/linux/ipc.h /usr/include/asm/ipcbuf.h
|
||||
tdfx_context.o: /usr/include/asm/sembuf.h /usr/include/linux/signal.h
|
||||
tdfx_context.o: /usr/include/asm/signal.h /usr/include/asm/siginfo.h
|
||||
tdfx_context.o: /usr/include/linux/securebits.h /usr/include/linux/time.h
|
||||
tdfx_context.o: /usr/include/linux/param.h /usr/include/linux/resource.h
|
||||
tdfx_context.o: /usr/include/asm/resource.h /usr/include/linux/timer.h
|
||||
tdfx_context.o: /usr/include/asm/processor.h /usr/include/asm/vm86.h
|
||||
tdfx_context.o: /usr/include/asm/math_emu.h /usr/include/asm/sigcontext.h
|
||||
tdfx_context.o: drmP.h tdfx_drv.h
|
||||
tdfx_drv.o: drmP.h tdfx_drv.h
|
||||
vm.o: drmP.h
|
||||
xf86_OSproc.o: /usr/include/X11/Xfuncproto.h
|
||||
xf86drm.o: /usr/include/stdio.h /usr/include/features.h
|
||||
xf86drm.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
|
||||
xf86drm.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stddef.h
|
||||
xf86drm.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stdarg.h
|
||||
xf86drm.o: /usr/include/bits/types.h /usr/include/libio.h
|
||||
xf86drm.o: /usr/include/_G_config.h /usr/include/bits/stdio_lim.h
|
||||
xf86drm.o: /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h
|
||||
xf86drm.o: /usr/include/endian.h /usr/include/bits/endian.h
|
||||
xf86drm.o: /usr/include/sys/select.h /usr/include/bits/select.h
|
||||
xf86drm.o: /usr/include/bits/sigset.h /usr/include/sys/sysmacros.h
|
||||
xf86drm.o: /usr/include/alloca.h /usr/include/unistd.h
|
||||
xf86drm.o: /usr/include/bits/posix_opt.h /usr/include/bits/confname.h
|
||||
xf86drm.o: /usr/include/getopt.h /usr/include/string.h /usr/include/ctype.h
|
||||
xf86drm.o: /usr/include/fcntl.h /usr/include/bits/fcntl.h
|
||||
xf86drm.o: /usr/include/errno.h /usr/include/bits/errno.h
|
||||
xf86drm.o: /usr/include/linux/errno.h /usr/include/asm/errno.h
|
||||
xf86drm.o: /usr/include/signal.h /usr/include/bits/signum.h
|
||||
xf86drm.o: /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h
|
||||
xf86drm.o: /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h
|
||||
xf86drm.o: /usr/include/bits/sigstack.h /usr/include/sys/stat.h
|
||||
xf86drm.o: /usr/include/bits/stat.h /usr/include/sys/ioctl.h
|
||||
xf86drm.o: /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h
|
||||
xf86drm.o: /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h
|
||||
xf86drm.o: /usr/include/sys/ttydefaults.h /usr/include/sys/mman.h
|
||||
xf86drm.o: /usr/include/bits/mman.h /usr/include/sys/time.h
|
||||
xf86drm.o: /usr/include/bits/time.h xf86drm.h drm.h
|
||||
xf86drmHash.o: xf86drm.h /usr/include/stdio.h /usr/include/features.h
|
||||
xf86drmHash.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
|
||||
xf86drmHash.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stddef.h
|
||||
xf86drmHash.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stdarg.h
|
||||
xf86drmHash.o: /usr/include/bits/types.h /usr/include/libio.h
|
||||
xf86drmHash.o: /usr/include/_G_config.h /usr/include/bits/stdio_lim.h
|
||||
xf86drmHash.o: /usr/include/stdlib.h /usr/include/sys/types.h
|
||||
xf86drmHash.o: /usr/include/time.h /usr/include/endian.h
|
||||
xf86drmHash.o: /usr/include/bits/endian.h /usr/include/sys/select.h
|
||||
xf86drmHash.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
|
||||
xf86drmHash.o: /usr/include/sys/sysmacros.h /usr/include/alloca.h
|
||||
xf86drmRandom.o: xf86drm.h /usr/include/stdio.h /usr/include/features.h
|
||||
xf86drmRandom.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
|
||||
xf86drmRandom.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stddef.h
|
||||
xf86drmRandom.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stdarg.h
|
||||
xf86drmRandom.o: /usr/include/bits/types.h /usr/include/libio.h
|
||||
xf86drmRandom.o: /usr/include/_G_config.h /usr/include/bits/stdio_lim.h
|
||||
xf86drmRandom.o: /usr/include/stdlib.h /usr/include/sys/types.h
|
||||
xf86drmRandom.o: /usr/include/time.h /usr/include/endian.h
|
||||
xf86drmRandom.o: /usr/include/bits/endian.h /usr/include/sys/select.h
|
||||
xf86drmRandom.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
|
||||
xf86drmRandom.o: /usr/include/sys/sysmacros.h /usr/include/alloca.h
|
||||
xf86drmSL.o: xf86drm.h /usr/include/stdio.h /usr/include/features.h
|
||||
xf86drmSL.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
|
||||
xf86drmSL.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stddef.h
|
||||
xf86drmSL.o: /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include/stdarg.h
|
||||
xf86drmSL.o: /usr/include/bits/types.h /usr/include/libio.h
|
||||
xf86drmSL.o: /usr/include/_G_config.h /usr/include/bits/stdio_lim.h
|
||||
xf86drmSL.o: /usr/include/stdlib.h /usr/include/sys/types.h
|
||||
xf86drmSL.o: /usr/include/time.h /usr/include/endian.h
|
||||
xf86drmSL.o: /usr/include/bits/endian.h /usr/include/sys/select.h
|
||||
xf86drmSL.o: /usr/include/bits/select.h /usr/include/bits/sigset.h
|
||||
xf86drmSL.o: /usr/include/sys/sysmacros.h /usr/include/alloca.h
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ static int i810DmaGeneral(drm_device_t *dev, drm_i810_general_t *args)
|
|||
drm_dma_t d;
|
||||
|
||||
buf_priv->dma_type = I810_DMA_GENERAL;
|
||||
buf_priv->age = args->age;
|
||||
buf->used = args->used;
|
||||
|
||||
if (I810_VERBOSE)
|
||||
|
|
@ -92,6 +93,7 @@ static int i810DmaVertex(drm_device_t *dev, drm_i810_vertex_t *args)
|
|||
buf_priv->vertex_real_idx = args->real_idx;
|
||||
buf_priv->vertex_discard = args->discard;
|
||||
buf_priv->nbox = sarea_priv->nbox;
|
||||
buf_priv->age = args->age;
|
||||
|
||||
if (buf_priv->nbox >= I810_NR_SAREA_CLIPRECTS)
|
||||
buf_priv->nbox = I810_NR_SAREA_CLIPRECTS;
|
||||
|
|
@ -133,8 +135,9 @@ int i810_dma_general(struct inode *inode, struct file *filp,
|
|||
copy_from_user_ret(&general, (drm_i810_general_t *)arg, sizeof(general),
|
||||
-EFAULT);
|
||||
|
||||
printk("i810 dma general idx %d used %d\n",
|
||||
general.idx, general.used);
|
||||
if (I810_VERBOSE)
|
||||
printk("i810 dma general idx %d used %d\n",
|
||||
general.idx, general.used);
|
||||
|
||||
retcode = i810DmaGeneral(dev, &general);
|
||||
|
||||
|
|
@ -152,9 +155,11 @@ int i810_dma_vertex(struct inode *inode, struct file *filp,
|
|||
copy_from_user_ret(&vertex, (drm_i810_vertex_t *)arg, sizeof(vertex),
|
||||
-EFAULT);
|
||||
|
||||
printk("i810 dma vertex, idx %d used %d real_idx %d discard %d\n",
|
||||
vertex.idx, vertex.real_used, vertex.real_idx,
|
||||
vertex.discard);
|
||||
if (I810_VERBOSE)
|
||||
printk("i810 dma vertex, idx %d used %d"
|
||||
" real_idx %d discard %d\n",
|
||||
vertex.idx, vertex.real_used, vertex.real_idx,
|
||||
vertex.discard);
|
||||
|
||||
retcode = i810DmaVertex(dev, &vertex);
|
||||
|
||||
|
|
@ -204,76 +209,9 @@ int i810_dma(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
retcode = drm_dma_get_buffers(dev, &d);
|
||||
}
|
||||
|
||||
printk("i810_dma: %d returning, granted = %d\n",
|
||||
current->pid, d.granted_count);
|
||||
|
||||
copy_to_user_ret((drm_dma_t *)arg, &d, sizeof(d), -EFAULT);
|
||||
|
||||
return retcode;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
static int i810_dma_send_buffers(drm_device_t *dev, drm_dma_t *d)
|
||||
{
|
||||
DECLARE_WAITQUEUE(entry, current);
|
||||
drm_buf_t *last_buf = NULL;
|
||||
int retcode = 0;
|
||||
drm_device_dma_t *dma = dev->dma;
|
||||
drm_i810_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
d->context = DRM_KERNEL_CONTEXT;
|
||||
|
||||
if ((retcode = drm_dma_enqueue(dev, d))) {
|
||||
return retcode;
|
||||
}
|
||||
|
||||
atomic_inc(&dev_priv->pending_bufs);
|
||||
i810_dma_schedule(dev, 1);
|
||||
return retcode;
|
||||
}
|
||||
|
||||
int i810_dma(struct inode *inode, struct file *filp, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
drm_file_t *priv = filp->private_data;
|
||||
drm_device_t *dev = priv->dev;
|
||||
drm_device_dma_t *dma = dev->dma;
|
||||
int retcode = 0;
|
||||
drm_dma_t d;
|
||||
|
||||
DRM_DEBUG("i810_dma start\n");
|
||||
copy_from_user_ret(&d, (drm_dma_t *)arg, sizeof(d), -EFAULT);
|
||||
DRM_DEBUG("%d %d: %d send, %d req\n",
|
||||
current->pid, d.context, d.send_count, d.request_count);
|
||||
|
||||
if (d.send_count < 0 || d.send_count > dma->buf_count) {
|
||||
DRM_ERROR("Process %d trying to send %d buffers (of %d max)\n",
|
||||
current->pid, d.send_count, dma->buf_count);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (d.request_count < 0 || d.request_count > dma->buf_count) {
|
||||
DRM_ERROR("Process %d trying to get %d buffers (of %d max)\n",
|
||||
current->pid, d.request_count, dma->buf_count);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (d.send_count) {
|
||||
retcode = i810_dma_send_buffers(dev, &d);
|
||||
}
|
||||
|
||||
d.granted_count = 0;
|
||||
|
||||
if (!retcode && d.request_count) {
|
||||
retcode = drm_dma_get_buffers(dev, &d);
|
||||
}
|
||||
|
||||
DRM_DEBUG("%d returning, granted = %d\n",
|
||||
current->pid, d.granted_count);
|
||||
copy_to_user_ret((drm_dma_t *)arg, &d, sizeof(d), -EFAULT);
|
||||
|
||||
DRM_DEBUG("i810_dma end (granted)\n");
|
||||
return retcode;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
176
linux/i810_dma.c
176
linux/i810_dma.c
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
#define BEGIN_LP_RING(n) do { \
|
||||
if (I810_VERBOSE) \
|
||||
printk("BEGIN_LP_RING(%d) in %s\n", n, __FUNCTION__); \
|
||||
DRM_DEBUG("BEGIN_LP_RING(%d) in %s\n", n, __FUNCTION__); \
|
||||
if (dev_priv->ring.space < n*4) i810_wait_ring(dev, n*4, 0); \
|
||||
dev_priv->ring.space -= n*4; \
|
||||
outring = dev_priv->ring.tail; \
|
||||
|
|
@ -65,13 +65,13 @@
|
|||
} while (0)
|
||||
|
||||
#define ADVANCE_LP_RING() do { \
|
||||
if (I810_VERBOSE) printk("ADVANCE_LP_RING\n"); \
|
||||
if (I810_VERBOSE) DRM_DEBUG("ADVANCE_LP_RING\n"); \
|
||||
dev_priv->ring.tail = outring; \
|
||||
I810_WRITE(LP_RING + RING_TAIL, outring); \
|
||||
} while(0)
|
||||
|
||||
#define OUT_RING(n) do { \
|
||||
if (I810_VERBOSE) printk(" OUT_RING %x\n", (int)(n)); \
|
||||
if (I810_VERBOSE) DRM_DEBUG(" OUT_RING %x\n", (int)(n)); \
|
||||
*(volatile unsigned int *)(virt + outring) = n; \
|
||||
outring += 4; \
|
||||
outring &= ringmask; \
|
||||
|
|
@ -115,12 +115,12 @@ static int i810_alloc_kernel_queue(drm_device_t *dev)
|
|||
* queue is empty.
|
||||
*/
|
||||
queue = dev->queuelist[DRM_KERNEL_CONTEXT];
|
||||
printk("Kernel queue already allocated\n");
|
||||
DRM_DEBUG("Kernel queue already allocated\n");
|
||||
} else {
|
||||
queue = drm_alloc(sizeof(*queue), DRM_MEM_QUEUES);
|
||||
if(!queue) {
|
||||
up(&dev->struct_sem);
|
||||
printk("out of memory\n");
|
||||
DRM_DEBUG("out of memory\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
++dev->queue_count;
|
||||
|
|
@ -129,7 +129,7 @@ static int i810_alloc_kernel_queue(drm_device_t *dev)
|
|||
if(!dev->queuelist) {
|
||||
up(&dev->struct_sem);
|
||||
drm_free(queue, sizeof(*queue), DRM_MEM_QUEUES);
|
||||
printk("out of memory\n");
|
||||
DRM_DEBUG("out of memory\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
|
@ -157,13 +157,13 @@ static int i810_alloc_kernel_queue(drm_device_t *dev)
|
|||
dev->queue_count--;
|
||||
|
||||
up(&dev->struct_sem);
|
||||
printk("%d (new)\n", dev->queue_count - 1);
|
||||
if (I810_VERBOSE) DRM_DEBUG("%d (new)\n", dev->queue_count - 1);
|
||||
return DRM_KERNEL_CONTEXT;
|
||||
}
|
||||
|
||||
static int i810_dma_cleanup(drm_device_t *dev)
|
||||
{
|
||||
printk("i810_dma_cleanup\n");
|
||||
if (I810_VERBOSE) DRM_DEBUG("i810_dma_cleanup\n");
|
||||
|
||||
if(dev->dev_private) {
|
||||
drm_i810_private_t *dev_priv =
|
||||
|
|
@ -202,7 +202,7 @@ static int i810_wait_ring(drm_device_t *dev, int n, int timeout_millis)
|
|||
|
||||
if (timeout_millis == 0) timeout_millis = 3000;
|
||||
|
||||
printk( "i810_wait_ring %d\n", n);
|
||||
if (I810_VERBOSE) DRM_DEBUG( "i810_wait_ring %d\n", n);
|
||||
|
||||
while (ring->space < n) {
|
||||
int i;
|
||||
|
|
@ -234,15 +234,15 @@ static void i810_kernel_lost_context(drm_device_t *dev)
|
|||
drm_i810_private_t *dev_priv = dev->dev_private;
|
||||
drm_i810_ring_buffer_t *ring = &(dev_priv->ring);
|
||||
|
||||
printk("i810_kernel_lost_context, old ring (%x,%x)\n",
|
||||
ring->head, ring->tail);
|
||||
if (0) DRM_DEBUG("i810_kernel_lost_context, old ring (%x,%x)\n",
|
||||
ring->head, ring->tail);
|
||||
|
||||
ring->head = I810_READ(LP_RING + RING_HEAD) & HEAD_ADDR;
|
||||
ring->tail = I810_READ(LP_RING + RING_TAIL);
|
||||
ring->space = ring->head - (ring->tail+8);
|
||||
if (ring->space < 0) ring->space += ring->Size;
|
||||
|
||||
printk("new ring (%x,%x)\n", ring->head, ring->tail);
|
||||
if (0) DRM_DEBUG("new ring (%x,%x)\n", ring->head, ring->tail);
|
||||
}
|
||||
|
||||
static inline void i810_ring_write_status(drm_device_t *dev)
|
||||
|
|
@ -271,11 +271,11 @@ static inline void i810_print_status_page(drm_device_t *dev)
|
|||
drm_i810_private_t *dev_priv = dev->dev_private;
|
||||
u32 *temp = (u32 *)dev_priv->hw_status_page;
|
||||
|
||||
printk( "hw_status: Interrupt Status : %x\n", temp[0]);
|
||||
printk( "hw_status: LpRing Head ptr : %x\n", temp[1]);
|
||||
printk( "hw_status: IRing Head ptr : %x\n", temp[2]);
|
||||
printk( "hw_status: Reserved : %x\n", temp[3]);
|
||||
printk( "hw_status: Driver Counter : %d\n", temp[5]);
|
||||
DRM_DEBUG( "hw_status: Interrupt Status : %x\n", temp[0]);
|
||||
DRM_DEBUG( "hw_status: LpRing Head ptr : %x\n", temp[1]);
|
||||
DRM_DEBUG( "hw_status: IRing Head ptr : %x\n", temp[2]);
|
||||
DRM_DEBUG( "hw_status: Reserved : %x\n", temp[3]);
|
||||
DRM_DEBUG( "hw_status: Driver Counter : %d\n", temp[5]);
|
||||
}
|
||||
|
||||
static int i810_dma_initialize(drm_device_t *dev,
|
||||
|
|
@ -284,7 +284,7 @@ static int i810_dma_initialize(drm_device_t *dev,
|
|||
{
|
||||
drm_map_t *sarea_map;
|
||||
|
||||
printk( "i810_dma_init\n");
|
||||
DRM_DEBUG( "i810_dma_init\n");
|
||||
dev->dev_private = (void *) dev_priv;
|
||||
memset(dev_priv, 0, sizeof(drm_i810_private_t));
|
||||
|
||||
|
|
@ -335,16 +335,16 @@ static int i810_dma_initialize(drm_device_t *dev,
|
|||
DRM_ERROR("Can not allocate hardware status page\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
printk("hw status page @ %lx\n", dev_priv->hw_status_page);
|
||||
DRM_DEBUG("hw status page @ %lx\n", dev_priv->hw_status_page);
|
||||
|
||||
I810_WRITE(0x02080, virt_to_bus((void *)dev_priv->hw_status_page));
|
||||
printk("Enabled hardware status page\n");
|
||||
DRM_DEBUG("Enabled hardware status page\n");
|
||||
#if 0
|
||||
printk("Doing first ring buffer write\n");
|
||||
DRM_DEBUG("Doing first ring buffer write\n");
|
||||
i810_ring_write_status(dev);
|
||||
printk("First ring write succeeded\n");
|
||||
DRM_DEBUG("First ring write succeeded\n");
|
||||
i810_print_status_page(dev);
|
||||
printk("Status page dump succeeded\n");
|
||||
DRM_DEBUG("Status page dump succeeded\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -381,18 +381,21 @@ int i810_dma_init(struct inode *inode, struct file *filp,
|
|||
|
||||
static void i810_dma_dispatch_general(drm_device_t *dev, drm_buf_t *buf)
|
||||
{
|
||||
drm_i810_buf_priv_t *buf_priv = buf->dev_private;
|
||||
drm_i810_private_t *dev_priv = dev->dev_private;
|
||||
drm_i810_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
||||
unsigned long address = (unsigned long)buf->bus_address;
|
||||
unsigned long start = address - dev->agp->base;
|
||||
int length = buf->used;
|
||||
RING_LOCALS;
|
||||
|
||||
dev_priv->counter++;
|
||||
printk( "dispatch counter : %ld\n", dev_priv->counter);
|
||||
printk( "i810_dma_dispatch\n");
|
||||
printk( "start : 0x%lx\n", start);
|
||||
printk( "length : 0x%x\n", length);
|
||||
printk( "start + length - 4 : 0x%lx\n", start + length - 4);
|
||||
sarea_priv->last_dispatch = buf_priv->age;
|
||||
dev_priv->counter++;
|
||||
DRM_DEBUG( "dispatch counter : %ld\n", dev_priv->counter);
|
||||
DRM_DEBUG( "i810_dma_dispatch\n");
|
||||
DRM_DEBUG( "start : 0x%lx\n", start);
|
||||
DRM_DEBUG( "length : 0x%x\n", length);
|
||||
DRM_DEBUG( "start + length - 4 : 0x%lx\n", start + length - 4);
|
||||
i810_kernel_lost_context(dev);
|
||||
|
||||
|
||||
|
|
@ -407,7 +410,7 @@ static void i810_dma_dispatch_general(drm_device_t *dev, drm_buf_t *buf)
|
|||
OUT_RING( GFX_OP_BREAKPOINT_INTERRUPT );
|
||||
ADVANCE_LP_RING();
|
||||
|
||||
i810_print_status_page(dev);
|
||||
/* i810_print_status_page(dev); */
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -418,6 +421,7 @@ static void i810_dma_dispatch_vertex(drm_device_t *dev, drm_buf_t *buf)
|
|||
{
|
||||
drm_i810_private_t *dev_priv = dev->dev_private;
|
||||
drm_i810_buf_priv_t *buf_priv = buf->dev_private;
|
||||
drm_i810_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
||||
drm_buf_t *real_buf = dev->dma->buflist[ buf_priv->vertex_real_idx ];
|
||||
unsigned long address = (unsigned long)real_buf->bus_address;
|
||||
unsigned long start = address - dev->agp->base;
|
||||
|
|
@ -427,15 +431,16 @@ static void i810_dma_dispatch_vertex(drm_device_t *dev, drm_buf_t *buf)
|
|||
RING_LOCALS;
|
||||
|
||||
if (I810_VERBOSE)
|
||||
printk("dispatch vertex addr 0x%lx, length 0x%x nbox %d\n",
|
||||
DRM_DEBUG("dispatch vertex addr 0x%lx, length 0x%x nbox %d\n",
|
||||
address, length, buf_priv->nbox);
|
||||
|
||||
dev_priv->counter++;
|
||||
printk( "dispatch counter : %ld\n", dev_priv->counter);
|
||||
printk( "i810_dma_dispatch\n");
|
||||
printk( "start : %lx\n", start);
|
||||
printk( "length : %d\n", length);
|
||||
printk( "start + length - 4 : %ld\n", start + length - 4);
|
||||
sarea_priv->last_dispatch = buf_priv->age;
|
||||
dev_priv->counter++;
|
||||
DRM_DEBUG( "dispatch counter : %ld\n", dev_priv->counter);
|
||||
DRM_DEBUG( "i810_dma_dispatch\n");
|
||||
DRM_DEBUG( "start : %lx\n", start);
|
||||
DRM_DEBUG( "length : %d\n", length);
|
||||
DRM_DEBUG( "start + length - 4 : %ld\n", start + length - 4);
|
||||
i810_kernel_lost_context(dev);
|
||||
|
||||
if (!buf_priv->vertex_discard) {
|
||||
|
|
@ -478,7 +483,8 @@ static inline void i810_dma_quiescent(drm_device_t *dev)
|
|||
{
|
||||
drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
|
||||
|
||||
printk( "i810_dma_quiescent\n");
|
||||
|
||||
/* DRM_DEBUG( "i810_dma_quiescent\n"); */
|
||||
while(1) {
|
||||
atomic_inc(&dev_priv->dispatch_lock);
|
||||
if(atomic_read(&dev_priv->dispatch_lock) == 1) {
|
||||
|
|
@ -493,13 +499,13 @@ static inline void i810_dma_quiescent(drm_device_t *dev)
|
|||
static inline void i810_dma_ready(drm_device_t *dev)
|
||||
{
|
||||
i810_dma_quiescent(dev);
|
||||
printk( "i810_dma_ready\n");
|
||||
/* DRM_DEBUG( "i810_dma_ready\n"); */
|
||||
}
|
||||
|
||||
static inline int i810_dma_is_ready(drm_device_t *dev)
|
||||
{
|
||||
drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
|
||||
printk( "i810_dma_is_ready\n");
|
||||
/* DRM_DEBUG( "i810_dma_is_ready\n"); */
|
||||
atomic_inc(&dev_priv->dispatch_lock);
|
||||
if(atomic_read(&dev_priv->dispatch_lock) == 1) {
|
||||
/* We got the lock */
|
||||
|
|
@ -532,8 +538,8 @@ static void i810_dma_service(int irq, void *device, struct pt_regs *regs)
|
|||
u16 temp;
|
||||
|
||||
atomic_inc(&dev->total_irq);
|
||||
printk("Interrupt Handler\n");
|
||||
i810_print_status_page(dev);
|
||||
/* DRM_DEBUG("Interrupt Handler\n"); */
|
||||
/* i810_print_status_page(dev); */
|
||||
temp = I810_READ16(I810REG_INT_IDENTITY_R);
|
||||
temp = temp & ~(0x6000);
|
||||
if(temp != 0) I810_WRITE16(I810REG_INT_IDENTITY_R,
|
||||
|
|
@ -566,7 +572,7 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
drm_i810_buf_priv_t *buf_priv;
|
||||
|
||||
|
||||
printk("i810_do_dma\n");
|
||||
DRM_DEBUG("i810_do_dma\n");
|
||||
if (test_and_set_bit(0, &dev->dma_flag)) {
|
||||
atomic_inc(&dma->total_missed_dma);
|
||||
return -EBUSY;
|
||||
|
|
@ -580,16 +586,19 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
|
||||
buf = dma->next_buffer;
|
||||
|
||||
printk("context %d, buffer %d\n", buf->context, buf->idx);
|
||||
DRM_DEBUG("context %d, buffer %d\n", buf->context, buf->idx);
|
||||
|
||||
if (buf->list == DRM_LIST_RECLAIM) {
|
||||
drm_clear_next_buffer(dev);
|
||||
drm_free_buffer(dev, buf);
|
||||
atomic_dec(&dev_priv->pending_bufs);
|
||||
if(!(atomic_read(&dev_priv->pending_bufs))) {
|
||||
DRM_DEBUG("i810_do_dma: pending %d\n",atomic_read( &dev_priv->pending_bufs ));
|
||||
if(!(atomic_read(&dev_priv->pending_bufs))) {
|
||||
wake_up_interruptible(&dev->queuelist[DRM_KERNEL_CONTEXT]->flush_queue);
|
||||
}
|
||||
clear_bit(0, &dev->dma_flag);
|
||||
DRM_DEBUG("RECLIAM\n");
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -598,27 +607,31 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
drm_clear_next_buffer(dev);
|
||||
drm_free_buffer(dev, buf);
|
||||
clear_bit(0, &dev->dma_flag);
|
||||
DRM_DEBUG("NOT USED\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (i810_dma_is_ready(dev) == 0) {
|
||||
clear_bit(0, &dev->dma_flag);
|
||||
DRM_DEBUG("NOT READY\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
/* Always hold the hardware lock while dispatching.
|
||||
*/
|
||||
|
||||
if ( ((!locked) ||
|
||||
(atomic_read(&dev_priv->in_flush) != 1))
|
||||
&& !drm_lock_take(&dev->lock.hw_lock->lock,
|
||||
DRM_KERNEL_CONTEXT)) {
|
||||
DRM_DEBUG("--inflush: %d\n", atomic_read(&dev_priv->in_flush));
|
||||
|
||||
if ( !locked &&
|
||||
!atomic_read(&dev_priv->in_flush) &&
|
||||
!drm_lock_take(&dev->lock.hw_lock->lock, DRM_KERNEL_CONTEXT))
|
||||
{
|
||||
atomic_inc(&dma->total_missed_lock);
|
||||
clear_bit(0, &dev->dma_flag);
|
||||
atomic_dec(&dev_priv->dispatch_lock);
|
||||
DRM_DEBUG("NOT LOCKED\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
|
||||
dma->next_queue = dev->queuelist[DRM_KERNEL_CONTEXT];
|
||||
drm_clear_next_buffer(dev);
|
||||
buf->pending = 1;
|
||||
|
|
@ -626,7 +639,12 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
buf->list = DRM_LIST_PEND;
|
||||
|
||||
buf_priv = buf->dev_private;
|
||||
if (I810_VERBOSE) printk("i810_do_dma - type %d\n", buf_priv->dma_type);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DRM_DEBUG("i810_do_dma - type %d\n", buf_priv->dma_type);
|
||||
|
||||
switch (buf_priv->dma_type) {
|
||||
case I810_DMA_GENERAL:
|
||||
|
|
@ -636,10 +654,11 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
i810_dma_dispatch_vertex( dev, buf );
|
||||
break;
|
||||
default:
|
||||
printk("bad buffer type %x in dispatch\n", buf_priv->dma_type);
|
||||
DRM_DEBUG("bad buffer type %x in dispatch\n", buf_priv->dma_type);
|
||||
break;
|
||||
}
|
||||
|
||||
DRM_DEBUG("DONE\n");
|
||||
|
||||
atomic_dec(&dev_priv->pending_bufs);
|
||||
|
||||
|
|
@ -652,8 +671,9 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
atomic_add(buf->used, &dma->total_bytes);
|
||||
atomic_inc(&dma->total_dmas);
|
||||
|
||||
if ((!locked)
|
||||
|| (atomic_read(&dev_priv->in_flush) != 1)) {
|
||||
DRM_DEBUG("inflush: %d\n", atomic_read(&dev_priv->in_flush));
|
||||
if (!locked &&
|
||||
!atomic_read(&dev_priv->in_flush)) {
|
||||
if (drm_lock_free(dev, &dev->lock.hw_lock->lock,
|
||||
DRM_KERNEL_CONTEXT)) {
|
||||
DRM_ERROR("\n");
|
||||
|
|
@ -662,6 +682,7 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
|
||||
clear_bit(0, &dev->dma_flag);
|
||||
|
||||
DRM_DEBUG("i810_do_dma2: pending %d\n",atomic_read( &dev_priv->pending_bufs ));
|
||||
if(!(atomic_read(&dev_priv->pending_bufs))) {
|
||||
wake_up_interruptible(&dev->queuelist[DRM_KERNEL_CONTEXT]->flush_queue);
|
||||
}
|
||||
|
|
@ -674,7 +695,8 @@ static int i810_do_dma(drm_device_t *dev, int locked)
|
|||
|
||||
static void i810_dma_schedule_tq_wrapper(void *dev)
|
||||
{
|
||||
i810_dma_schedule(dev, 0);
|
||||
drm_i810_private_t *dev_priv = ((drm_device_t *)dev)->dev_private;
|
||||
i810_dma_schedule(dev, atomic_read(&dev_priv->in_flush));
|
||||
}
|
||||
|
||||
int i810_dma_schedule(drm_device_t *dev, int locked)
|
||||
|
|
@ -689,7 +711,7 @@ int i810_dma_schedule(drm_device_t *dev, int locked)
|
|||
drm_i810_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
|
||||
printk("i810_dma_schedule\n");
|
||||
DRM_DEBUG("i810_dma_schedule\n");
|
||||
|
||||
if (test_and_set_bit(0, &dev->interrupt_flag)) {
|
||||
/* Not reentrant */
|
||||
|
|
@ -707,11 +729,12 @@ again:
|
|||
dma->next_buffer = buf;
|
||||
dma->next_queue = q;
|
||||
if (buf && buf->list == DRM_LIST_RECLAIM) {
|
||||
printk("reclaiming in i810_dma_schedule\n");
|
||||
DRM_DEBUG("reclaiming in i810_dma_schedule\n");
|
||||
drm_clear_next_buffer(dev);
|
||||
drm_free_buffer(dev, buf);
|
||||
atomic_dec(&dev_priv->pending_bufs);
|
||||
printk("pending bufs : %d\n", atomic_read(&dev_priv->pending_bufs));
|
||||
DRM_DEBUG("fred pending bufs : %d\n",
|
||||
atomic_read(&dev_priv->pending_bufs));
|
||||
if(!(atomic_read(&dev_priv->pending_bufs))) {
|
||||
wake_up_interruptible(&dev->queuelist[DRM_KERNEL_CONTEXT]->flush_queue);
|
||||
}
|
||||
|
|
@ -724,6 +747,8 @@ again:
|
|||
if (!(retcode = i810_do_dma(dev, locked)))
|
||||
++processed;
|
||||
}
|
||||
DRM_DEBUG("ixxx810_do_dma: pending %d\n",atomic_read( &dev_priv->pending_bufs ));
|
||||
|
||||
if(!(atomic_read(&dev_priv->pending_bufs))) {
|
||||
wake_up_interruptible(&dev->queuelist[DRM_KERNEL_CONTEXT]->flush_queue);
|
||||
}
|
||||
|
|
@ -767,8 +792,7 @@ int i810_irq_install(drm_device_t *dev, int irq)
|
|||
dev->irq = irq;
|
||||
up(&dev->struct_sem);
|
||||
|
||||
printk( "Interrupt Install : %d\n", irq);
|
||||
printk("%d\n", irq);
|
||||
DRM_DEBUG( "Interrupt Install : %d\n", irq);
|
||||
|
||||
dev->context_flag = 0;
|
||||
dev->interrupt_flag = 0;
|
||||
|
|
@ -826,10 +850,7 @@ int i810_irq_uninstall(drm_device_t *dev)
|
|||
|
||||
if (!irq) return -EINVAL;
|
||||
|
||||
printk( "Interrupt UnInstall: %d\n", irq);
|
||||
|
||||
|
||||
printk("%d\n", irq);
|
||||
DRM_DEBUG( "Interrupt UnInstall: %d\n", irq);
|
||||
|
||||
temp = I810_READ16(I810REG_INT_IDENTITY_R);
|
||||
temp = temp & ~(0x6000);
|
||||
|
|
@ -854,7 +875,7 @@ int i810_control(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
drm_control_t ctl;
|
||||
int retcode;
|
||||
|
||||
printk( "i810_control\n");
|
||||
/* DRM_DEBUG( "i810_control\n"); */
|
||||
|
||||
copy_from_user_ret(&ctl, (drm_control_t *)arg, sizeof(ctl), -EFAULT);
|
||||
|
||||
|
|
@ -880,24 +901,24 @@ int i810_flush_queue(drm_device_t *dev)
|
|||
drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
|
||||
int ret = 0;
|
||||
|
||||
printk("i810_flush_queue\n");
|
||||
printk("pending_bufs : %d\n", atomic_read(&dev_priv->pending_bufs));
|
||||
DRM_DEBUG("i810_flush_queue\n");
|
||||
DRM_DEBUG("pending_bufs : %d\n", atomic_read(&dev_priv->pending_bufs));
|
||||
if(atomic_read(&dev_priv->pending_bufs) != 0) {
|
||||
printk("got to flush\n");
|
||||
DRM_DEBUG("got to flush\n");
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
add_wait_queue(&q->flush_queue, &entry);
|
||||
for (;;) {
|
||||
if (!atomic_read(&dev_priv->pending_bufs)) break;
|
||||
printk("Calling schedule from flush_queue : %d\n",
|
||||
DRM_DEBUG("Calling schedule from flush_queue : %d\n",
|
||||
atomic_read(&dev_priv->pending_bufs));
|
||||
i810_dma_schedule(dev, 0);
|
||||
schedule();
|
||||
schedule_timeout(DRM_LOCK_SLICE);
|
||||
if (signal_pending(current)) {
|
||||
ret = -EINTR; /* Can't restart */
|
||||
break;
|
||||
}
|
||||
}
|
||||
printk("Exited out of schedule from flush_queue\n");
|
||||
DRM_DEBUG("Exited out of schedule from flush_queue\n");
|
||||
current->state = TASK_RUNNING;
|
||||
remove_wait_queue(&q->flush_queue, &entry);
|
||||
}
|
||||
|
|
@ -924,13 +945,14 @@ int i810_lock(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
printk("%d (pid %d) requests lock (0x%08x), flags = 0x%08x\n",
|
||||
DRM_DEBUG("%d (pid %d) requests lock (0x%08x), flags = 0x%08x\n",
|
||||
lock.context, current->pid, dev->lock.hw_lock->lock,
|
||||
lock.flags);
|
||||
|
||||
if (lock.context < 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Only one queue:
|
||||
*/
|
||||
|
||||
|
|
@ -954,7 +976,7 @@ int i810_lock(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
atomic_inc(&dev->total_sleeps);
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
current->policy |= SCHED_YIELD;
|
||||
printk("Calling lock schedule\n");
|
||||
DRM_DEBUG("Calling lock schedule\n");
|
||||
schedule();
|
||||
if (signal_pending(current)) {
|
||||
ret = -ERESTARTSYS;
|
||||
|
|
@ -967,14 +989,14 @@ int i810_lock(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
|
||||
if (!ret) {
|
||||
if (lock.flags & _DRM_LOCK_QUIESCENT) {
|
||||
printk("_DRM_LOCK_QUIESCENT\n");
|
||||
DRM_DEBUG("_DRM_LOCK_QUIESCENT\n");
|
||||
atomic_set(&dev_priv->in_flush, 1);
|
||||
i810_flush_queue(dev);
|
||||
i810_dma_quiescent(dev);
|
||||
atomic_set(&dev_priv->in_flush, 0);
|
||||
}
|
||||
}
|
||||
printk("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
|
||||
DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -985,7 +1007,7 @@ int i810_flush_ioctl(struct inode *inode, struct file *filp,
|
|||
drm_device_t *dev = priv->dev;
|
||||
drm_i810_private_t *dev_priv = (drm_i810_private_t *) dev->dev_private;
|
||||
|
||||
printk("i810_flush_ioctl\n");
|
||||
DRM_DEBUG("i810_flush_ioctl\n");
|
||||
atomic_set(&dev_priv->in_flush, 1);
|
||||
i810_flush_queue(dev);
|
||||
i810_dma_quiescent(dev);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
*/
|
||||
typedef struct {
|
||||
int dma_type;
|
||||
int age;
|
||||
int vertex_real_idx;
|
||||
int vertex_discard;
|
||||
unsigned int nbox;
|
||||
|
|
@ -52,7 +53,9 @@ typedef struct {
|
|||
#define I810_DMA_VERTEX 1
|
||||
#define I810_DMA_DISCARD 2 /* not used */
|
||||
|
||||
#define I810_VERBOSE 1
|
||||
|
||||
|
||||
#define I810_VERBOSE 0
|
||||
|
||||
|
||||
int i810_dma_vertex(struct inode *inode, struct file *filp,
|
||||
|
|
|
|||
|
|
@ -54,17 +54,23 @@ typedef struct _xf86drmClipRectRec {
|
|||
} xf86drmClipRectRec;
|
||||
|
||||
|
||||
#define I810_DMA_BUF_ORDER 16
|
||||
/* Might one day want to support the client-side ringbuffer code again.
|
||||
*/
|
||||
#define I810_USE_BATCH 1
|
||||
|
||||
/* 32 16k dma buffers -- 512k
|
||||
*/
|
||||
#define I810_DMA_BUF_ORDER 14
|
||||
#define I810_DMA_BUF_SZ (1<<I810_DMA_BUF_ORDER)
|
||||
#define I810_DMA_BUF_NR 63
|
||||
#define I810_DMA_BUF_NR 32
|
||||
|
||||
#define I810_NR_SAREA_CLIPRECTS 2
|
||||
|
||||
|
||||
/* Each region is a minimum of 32k, and there are at most 128 of them.
|
||||
/* Each region is a minimum of 64k, and there are at most 128 of them.
|
||||
*/
|
||||
#define I810_NR_TEX_REGIONS 128
|
||||
#define I810_LOG_MIN_TEX_REGION_SIZE 18
|
||||
#define I810_LOG_MIN_TEX_REGION_SIZE 16
|
||||
|
||||
|
||||
|
||||
|
|
@ -93,12 +99,14 @@ typedef struct {
|
|||
* else's - simply eject them all in LRU order.
|
||||
*/
|
||||
i810TexRegion texList[I810_NR_TEX_REGIONS+1]; /* Last elt is sentinal */
|
||||
int texAge; /* Current age counter */
|
||||
int texAge; /* last time texture was uploaded */
|
||||
|
||||
int last_enqueue; /* last time a buffer was enqueued */
|
||||
int last_dispatch; /* age of the most recently dispatched buffer */
|
||||
int last_quiescent; /* */
|
||||
|
||||
int ctxOwner; /* last 3d context to hold lock */
|
||||
|
||||
int lastDispatch;
|
||||
int lastGetBuffer; /* dodgy - not needed if dma uploads used */
|
||||
int ctxOwner; /* last context to upload state */
|
||||
|
||||
} drm_i810_sarea_t;
|
||||
|
||||
|
|
@ -106,6 +114,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
int idx;
|
||||
int used;
|
||||
int age;
|
||||
} drm_i810_general_t;
|
||||
|
||||
|
||||
|
|
@ -122,6 +131,7 @@ typedef struct {
|
|||
int real_idx; /* buffer to execute */
|
||||
int real_used; /* buf->used in for real buffer */
|
||||
int discard; /* don't execute the commands */
|
||||
int age;
|
||||
} drm_i810_vertex_t;
|
||||
|
||||
|
||||
|
|
@ -129,5 +139,5 @@ typedef struct {
|
|||
#define DRM_IOCTL_I810_INIT DRM_IOW( 0x40, drm_i810_init_t)
|
||||
#define DRM_IOCTL_I810_VERTEX DRM_IOW( 0x41, drm_i810_vertex_t)
|
||||
#define DRM_IOCTL_I810_DMA DRM_IOW( 0x42, drm_i810_general_t)
|
||||
#define DRM_IOCTL_I810_FLUSH DRM_IO ( 0x43)
|
||||
#define DRM_IOCTL_I810_FLUSH DRM_IO ( 0x43 )
|
||||
#endif /* _I810_DRM_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue