summaryrefslogtreecommitdiff
path: root/shared-core/i915_irq.c
AgeCommit message (Collapse)Author
2007-07-20Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.Eric Anholt
The data is now in kernel space, copied in/out as appropriate according to the This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal with those failures. This also means that XFree86 4.2.0 support for i810 DRM is lost.
2007-07-20Replace filp in ioctl arguments with drm_file *file_priv.Eric Anholt
As a fallout, replace filp storage with file_priv storage for "unique identifier of a client" all over the DRM. There is a 1:1 mapping, so this should be a noop. This could be a minor performance improvement, as everything on Linux dereferenced filp to get file_priv anyway, while only the mmap ioctls went the other direction.
2007-07-20Remove DRM_ERR OS macro.Eric Anholt
This was used to make all ioctl handlers return -errno on linux and errno on *BSD. Instead, just return -errno in shared code, and flip sign on return from shared code to *BSD code.
2007-07-19Merge branch 'origin'Eric Anholt
2007-07-18Add dry-coded DRM drawable private information storage for FreeBSD.Eric Anholt
With this, all modules build again.
2007-07-16drm: remove drmP.h internal typedefsDave Airlie
2007-07-16drm: detypedef drm.h and fixup all problemsDave Airlie
2007-07-03One more spinlock initializer cleanup.Michel Dänzer
2007-06-03Revert "move i915 to new drm_wait_on function"root
This reverts commit feb68037784ac09e333a321d294fdb2d8c57a4c8. This was a bad idea, the macro is actually a bit harder to convert to a static for the other use cases
2007-05-26drm: spinlock initializer cleanupThomas Gleixner
2007-05-10Allow vblank interrupts to remain disabled across VT switch.Keith Packard
i915_driver_irq_postinstall was forcing vblank interrupts to pipe A when called with vblank interrupts disabled. This caused vblank interrupts to be accidentally re-enabled when VT switching the X server. Instead, start the driver with vblank interrupts enabled on pipe A to support older X servers, but then leave control over the state to the X server if it is able to do so.
2007-04-28move i915 to new drm_wait_on functionDave Airlie
2007-04-03Make sure we ack irqs before we read a breadcrumb so thatThomas Hellstrom
breadcrumb updates that occur _AFTER_ we've read the breadcrumb really generates a new IRQ.
2007-02-28i915: Eliminate dev_priv->current_page.Michel Dänzer
Always use dev_priv->sarea_priv->pf_current_page directly. This allows clients to modify it as well while they hold the HW lock, e.g. in order to sync pages between pipes.
2007-02-28i915: Fix test for synchronous flip affecting both pipes.Michel Dänzer
2007-02-22i915: Add support for scheduled buffer swaps to be done as flips.Michel Dänzer
Unfortunately, emitting asynchronous flips during vertical blank results in tearing. So we have to wait for the previous vertical blank and emit a synchronous flip.
2007-02-19i915: Improved page flipping support, including triple buffering.Michel Dänzer
Pages are tracked independently on each pipe. Bump the minor version for 3D clients to know page flipping is usable, and bump driver date.
2007-02-19i915: Unify breadcrumb emission.Michel Dänzer
2007-01-24vblank interrupt fixZou Nan hai
2007-01-02i915: Fix a DRM_ERROR that should be DRM_DEBUG.Michel Dänzer
It would clutter up the kernel output in a situation which is legitimate before X.org 7.2 and handled correctly by the 3D driver.
2006-11-27i915_vblank_tasklet: Try harder to avoid tearing.Michel Dänzer
Previously, if there were several buffer swaps scheduled for the same vertical blank, all but the first blit emitted stood a chance of exhibiting tearing. In order to avoid this, split the blits along slices of each output top to bottom.
2006-10-18Merging drm-ttm-0-2-branchThomas Hellstrom
Conflicts: linux-core/drmP.h linux-core/drm_drv.c linux-core/drm_irq.c linux-core/drm_stub.c shared-core/drm.h shared-core/i915_drv.h shared-core/i915_irq.c
2006-10-02Fix type of second argument to spin_lock_irqsave().Michel Dänzer
(cherry picked from f6238cf6244b32bd84e3d2819963d7f5473867c8 commit)
2006-10-02Fix type of second argument to spin_lock_irqsave().Michel Dänzer
2006-09-29i915: Only schedule vblank tasklet if there are scheduled swaps pending.Michel Dänzer
This fixes issues on X server startup with versions of xf86-video-intel that enable the IRQ before they have a context ID. (cherry picked from 7af93dd9849442270ec89cb4bbeef5bfd4f9e424 commit)
2006-09-29i915: Only initialize IRQ fields in postinstall, not the PIPE_SET ioctl.Michel Dänzer
Some other minor changes in preparation for actually disabling user interrupts.
2006-09-29i915: Avoid mis-counting vblank interrupts when they're only enabled for pipe A.Michel Dänzer
It looks like 'after a while', I915REG_INT_IDENTITY_R for some reason always has VSYNC_PIPEB_FLAG set in the interrupt handler, even though pipe B is disabled. So we only increase dev->vbl_received if the corresponding bit is also set in dev->vblank_pipe. (cherry picked from 881ba569929ceafd42e3c86228b0172099083d1d commit)
2006-09-29i915_vblank_swap: Add support for DRM_VBLANK_NEXTONMISS.Michel Dänzer
(cherry picked from 0356fe260dcf80f6d2d20e3384f2a1f4ee7f5b30 commit)
2006-09-29Only return EBUSY after we've established we need to schedule a new swap.Michel Dänzer
(cherry picked from 50a0284a61d4415c0ebdb02decee76ef3115007a commit)
2006-09-29Fix 'sequence has passed' condition in i915_vblank_swap().Michel Dänzer
(cherry picked from 7f09f957d9a61ac107f8fd29128d7899a3e8a228 commit)
2006-09-29Make handling of dev_priv->vblank_pipe more robust.Michel Dänzer
Initialize it to default value if it hasn't been set by the X server yet. In i915_vblank_pipe_set(), only update dev_priv->vblank_pipe and call i915_enable_interrupt() if the argument passed from userspace is valid to avoid corrupting dev_priv->vblank_pipe on invalid arguments. (cherry picked from 87c57cba1a70221fc570b253bf3b24682ef6b894 commit)
2006-09-29DRM_I915_VBLANK_SWAP ioctl: Take drm_vblank_seq_type_t instead of pipe number.Michel Dänzer
Handle relative as well as absolute target sequence numbers. Return error if target sequence has already passed, so userspace can deal with this situation as it sees fit. On success, return the sequence number of the vertical blank when the buffer swap is expected to take place. Also add DRM_IOCTL_I915_VBLANK_SWAP definition for userspace code that may want to use ioctl() instead of drmCommandWriteRead(). (cherry picked from d5a0f107511e128658e2d5e15bd7e6215c507f29 commit)
2006-09-29i915: Add ioctl for scheduling buffer swaps at vertical blanks.Michel Dänzer
This uses the core facility to schedule a driver callback that will be called ASAP after the given vertical blank interrupt with the HW lock held. (cherry picked from 257771fa290b62d4d2ad896843cf3a207978d0bb commit)
2006-09-29Add support for secondary vertical blank interrupt to i915 driver.Michel Dänzer
When the vertical blank interrupt is enabled for both pipes, pipe A is considered primary and pipe B secondary. When it's only enabled for one pipe, it's always considered primary for backwards compatibility. (cherry picked from 0c7d7f43610f705e8536a949cf2407efaa5ec217 commit)
2006-09-29i915: Only schedule vblank tasklet if there are scheduled swaps pending.Michel Dänzer
This fixes issues on X server startup with versions of xf86-video-intel that enable the IRQ before they have a context ID.
2006-09-28i915: Avoid mis-counting vblank interrupts when they're only enabled for pipe A.Michel Dänzer
It looks like 'after a while', I915REG_INT_IDENTITY_R for some reason always has VSYNC_PIPEB_FLAG set in the interrupt handler, even though pipe B is disabled. So we only increase dev->vbl_received if the corresponding bit is also set in dev->vblank_pipe.
2006-09-28i915_vblank_swap: Add support for DRM_VBLANK_NEXTONMISS.Michel Dänzer
2006-09-28Only return EBUSY after we've established we need to schedule a new swap.Michel Dänzer
2006-09-28Fix 'sequence has passed' condition in i915_vblank_swap().Michel Dänzer
2006-09-28Make handling of dev_priv->vblank_pipe more robust.Michel Dänzer
Initialize it to default value if it hasn't been set by the X server yet. In i915_vblank_pipe_set(), only update dev_priv->vblank_pipe and call i915_enable_interrupt() if the argument passed from userspace is valid to avoid corrupting dev_priv->vblank_pipe on invalid arguments.
2006-09-28DRM_I915_VBLANK_SWAP ioctl: Take drm_vblank_seq_type_t instead of pipe number.Michel Dänzer
Handle relative as well as absolute target sequence numbers. Return error if target sequence has already passed, so userspace can deal with this situation as it sees fit. On success, return the sequence number of the vertical blank when the buffer swap is expected to take place. Also add DRM_IOCTL_I915_VBLANK_SWAP definition for userspace code that may want to use ioctl() instead of drmCommandWriteRead().
2006-09-28i915: Add ioctl for scheduling buffer swaps at vertical blanks.Michel Dänzer
This uses the core facility to schedule a driver callback that will be called ASAP after the given vertical blank interrupt with the HW lock held.
2006-09-28Add support for secondary vertical blank interrupt to i915 driver.Michel Dänzer
When the vertical blank interrupt is enabled for both pipes, pipe A is considered primary and pipe B secondary. When it's only enabled for one pipe, it's always considered primary for backwards compatibility.
2006-09-15Some bugfixes.Thomas Hellstrom
Change the fence object interface somewhat to allow some more flexibility. Make list IOCTLS really restartable. Try to avoid busy-waits in the kernel using immediate return to user-space with an -EAGAIN.
2006-09-12More bugfixes.Thomas Hellstrom
Disable the i915 IRQ turnoff for now since it seems to be causing problems.
2006-09-08Various bugfixes.Thomas Hellstrom
2006-09-05i915: Only turn on user IRQs when they are needed.Thomas Hellstrom
2006-08-29Checkpoint commit. Buffer object flags and IOCTL argument list.Thomas Hellstrom
2006-08-21i915 fence object driver implementing 2 fence object types:Thomas Hellstrom
0x00 EXE fence. Signals when command stream interpreter has reached the point where the fence was emitted. 0x01 FLUSH fence. Signals when command stream interpreter has reached the point where the fence was emitted, and all previous drawing operations have been completed and flushed. Implements busy wait (for fastest response time / high CPU) and lazy wait (User interrupt or timer driven).
2006-08-10i965 code and Linux coding style < 0Dave Airlie
smack my whitespace up.