summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_irq.c
AgeCommit message (Expand)Author
2007-11-05nouveau: Use a sw method instead of notify interrupt to signal fence completion.Ben Skeggs
2007-11-05nouveau: cleanupsBen Skeggs
2007-11-05nouveau: only pass annoying messages if irq isn't handled fully.Ben Skeggs
2007-11-05nouveau: hook up an inital fence irq handlerBen Skeggs
2007-10-16nouveau: Cleanup PGRAPH handler, attempt to survive PGRAPH exceptions.Ben Skeggs
2007-10-16nouveau: Survive PFIFO_CACHE_ERROR.Ben Skeggs
2007-10-16nouveau: Handle multiple PFIFO exceptions per irq, cleanup output.Ben Skeggs
2007-10-12nouveau: mandatory "oops I forgot half of the files" commitArthur Huillet
2007-10-10nouveau : nv10 and nv04 PGRAPH_NSTATUS are differentMatthieu Castet
2007-10-06nouveau : print correct value in nouveau_graph_dump_trap_info for nv04Matthieu Castet
2007-09-30nouveau: let nv20 hardware do ctx switching automatically.Pekka Paalanen
2007-09-30nouveau: NV30 should never call nouveau_nv20_context_switch().Pekka Paalanen
2007-08-26nouveau : add NV04_PGRAPH_TRAPPED_ADDR definitionMatthieu Castet
2007-08-09nouveau: silence irq handler a bitBen Skeggs
2007-08-08nouveau: return channel idBen Skeggs
2007-08-08nouveau: enable/disable engine-specific interrupts in _init()/_takedown()Ben Skeggs
2007-08-07nouveau : fix enable irq (in the previous code all irq were masked by engineMatthieu Castet
2007-08-06nouveau: Determine trapped channel id from active grctx on >=NV40Ben Skeggs
2007-07-18nouveau: Add bitfield names for NSOURCE and NSTATUS.Pekka Paalanen
2007-07-18nouveau: Replace 0x00400104 and 0x00400108 with names.Pekka Paalanen
2007-07-14nouveau: nv10 and nv11/15 are differentPatrice Mandin
2007-07-13nouveau: nuke internal typedefs, and drm_device_t use.Ben Skeggs
2007-07-09nouveau/nv50: Initial channel/object supportBen Skeggs
2007-07-09nouveau: enable reporting for all PFIFO/PGRAPH irqsBen Skeggs
2007-05-08nouveau : fix fifo context size for nv10Matthieu Castet
2007-03-26nouveau: move card initialisation into the drmBen Skeggs
2007-03-07nouveau: ack PFIFO interrupts at PFIFO, not PMC.Ben Skeggs
2007-02-28nouveau: intrusive drm interface changesBen Skeggs
2007-02-03nouveau: and of course, I was missing the last nv04 piece.Stephane Marchesin
2007-02-03nouveau: rename registers to their proper names.Stephane Marchesin
2007-01-25nouveau: always print nsource/nstatus regs on PGRAPH errorsBen Skeggs
2007-01-17nouveau: Try to get nv35 pgraph switching working. Doesn't quite yet.Jeremy Kolb
2007-01-13nouveau: nv20 graph ctx switch.Matthieu Castet
2007-01-13nouveau: first step to make graph ctx worksMatthieu Castet
2007-01-05Add basic pgraph context for nv10.Matthieu Castet
2006-11-21Don't spam dmesg if PMC_INTSTAT is 0Ben Skeggs
2006-11-17Dump some useful info when a PGRAPH error occurs.Ben Skeggs
2006-10-18Oops, we have more than 4 subchannels..Ben Skeggs
2006-10-17Useful output on a FIFO error interrupt.Ben Skeggs
2006-10-17typoBen Skeggs
2006-10-17NV40: FIFO context switching now WorksForMe(tm)Ben Skeggs
2006-10-14Again more work on context switches. They work, sometimes. And when they do t...Stephane Marchesin
2006-10-12Oops.Stephane Marchesin
2006-10-12Still more work on the context switching code.Stephane Marchesin
2006-10-12More work on the context switch code. Still doesn't work. I'm mostly convince...Stephane Marchesin
2006-10-11Context switching work.Stephane Marchesin
2006-09-09Add copyright notices while I still remember..Ben Skeggs
2006-08-27initial import of nouveau code from nouveau CVSDave Airlie
="hl opt">->struct_sem); if (!dev->file_last) { priv->next = NULL; priv->prev = NULL; dev->file_first = priv; dev->file_last = priv; } else { priv->next = NULL; priv->prev = dev->file_last; dev->file_last->next = priv; dev->file_last = priv; } up(&dev->struct_sem); return 0; } int DRM(flush)(struct file *filp) { drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->dev; DRM_DEBUG("pid = %d, device = 0x%x, open_count = %d\n", current->pid, dev->device, dev->open_count); return 0; } int DRM(fasync)(int fd, struct file *filp, int on) { drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->dev; int retcode; DRM_DEBUG("fd = %d, device = 0x%x\n", fd, dev->device); retcode = fasync_helper(fd, filp, on, &dev->buf_async); if (retcode < 0) return retcode; return 0; } /* The drm_read and drm_write_string code (especially that which manages the circular buffer), is based on Alessandro Rubini's LINUX DEVICE DRIVERS (Cambridge: O'Reilly, 1998), pages 111-113. */ ssize_t DRM(read)(struct file *filp, char *buf, size_t count, loff_t *off) { drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->dev; int left; int avail; int send; int cur; DRM_DEBUG("%p, %p\n", dev->buf_rp, dev->buf_wp); while (dev->buf_rp == dev->buf_wp) { DRM_DEBUG(" sleeping\n"); if (filp->f_flags & O_NONBLOCK) { return -EAGAIN; } interruptible_sleep_on(&dev->buf_readers); if (signal_pending(current)) { DRM_DEBUG(" interrupted\n"); return -ERESTARTSYS; } DRM_DEBUG(" awake\n"); } left = (dev->buf_rp + DRM_BSZ - dev->buf_wp) % DRM_BSZ; avail = DRM_BSZ - left; send = DRM_MIN(avail, count); while (send) { if (dev->buf_wp > dev->buf_rp) { cur = DRM_MIN(send, dev->buf_wp - dev->buf_rp); } else { cur = DRM_MIN(send, dev->buf_end - dev->buf_rp); } if (copy_to_user(buf, dev->buf_rp, cur)) return -EFAULT; dev->buf_rp += cur; if (dev->buf_rp == dev->buf_end) dev->buf_rp = dev->buf; send -= cur; } wake_up_interruptible(&dev->buf_writers); return DRM_MIN(avail, count);; } int DRM(write_string)(drm_device_t *dev, const char *s) { int left = (dev->buf_rp + DRM_BSZ - dev->buf_wp) % DRM_BSZ; int send = strlen(s); int count; DRM_DEBUG("%d left, %d to send (%p, %p)\n", left, send, dev->buf_rp, dev->buf_wp); if (left == 1 || dev->buf_wp != dev->buf_rp) { DRM_ERROR("Buffer not empty (%d left, wp = %p, rp = %p)\n", left, dev->buf_wp, dev->buf_rp); } while (send) { if (dev->buf_wp >= dev->buf_rp) { count = DRM_MIN(send, dev->buf_end - dev->buf_wp); if (count == left) --count; /* Leave a hole */ } else { count = DRM_MIN(send, dev->buf_rp - dev->buf_wp - 1); } strncpy(dev->buf_wp, s, count); dev->buf_wp += count; if (dev->buf_wp == dev->buf_end) dev->buf_wp = dev->buf; send -= count; } #if LINUX_VERSION_CODE < 0x020315 && !defined(KILLFASYNCHASTHREEPARAMETERS) /* The extra parameter to kill_fasync was added in 2.3.21, and is _not_ present in _stock_ 2.2.14 and 2.2.15. However, some distributions patch 2.2.x kernels to add this parameter. The Makefile.linux attempts to detect this addition and defines KILLFASYNCHASTHREEPARAMETERS if three parameters are found. */ if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO); #else /* Parameter added in 2.3.21. */ #if LINUX_VERSION_CODE < 0x020400 if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO, POLL_IN); #else /* Type of first parameter changed in Linux 2.4.0-test2... */ if (dev->buf_async) kill_fasync(&dev->buf_async, SIGIO, POLL_IN); #endif #endif DRM_DEBUG("waking\n"); wake_up_interruptible(&dev->buf_readers); return 0; } unsigned int DRM(poll)(struct file *filp, struct poll_table_struct *wait) { drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->dev; poll_wait(filp, &dev->buf_readers, wait); if (dev->buf_wp != dev->buf_rp) return POLLIN | POLLRDNORM; return 0; }