aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/i915_irq.c
Commit message (Collapse)AuthorAge
* drm: reorganise drm tree to be more future proof.Dave Airlie2008-07-13
| | | | | | | | | | | | | | With the coming of kernel based modesetting and the memory manager stuff, the everything in one directory approach was getting very ugly and starting to be unmanageable. This restructures the drm along the lines of other kernel components. It creates a drivers/gpu/drm directory and moves the hw drivers into subdirectores. It moves the includes into an include/drm, and sets up the unifdef for the userspace headers we should be exporting. Signed-off-by: Dave Airlie <airlied@redhat.com>
* DRM/i915: only use tiled blits on 965+Jesse Barnes2008-07-02
| | | | | | | | | | | | | When scheduled swaps occur, we need to blit between front & back buffers. If the buffers are tiled, we need to set the appropriate XY_SRC_COPY tile bit, but only on 965 chips, since it will cause corruption on pre-965 (e.g. 945). Bug reported by and fix tested by Tomas Janousek <tomi@nomi.cz>. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Acked-by: Dave Airlie <airlied@linux.ie> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Revert "drm/vbl rework: rework how the drm deals with vblank."Dave Airlie2008-05-06
| | | | | | | | | | This reverts commit ac741ab71bb39e6977694ac0cc26678d8673cda4. Okay this looks like wasn't as fully baked as I'd led myself to believe. Revert for now for further baking. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vbl rework: rework how the drm deals with vblank.Jesse Barnes2008-04-26
| | | | | | | | | | | | | Other Authors: Michel Dänzer <michel@tungstengraphics.com> mga: Ian Romanick <idr@us.ibm.com> via: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> This re-works the DRM internals to provide a better interface for drivers to expose vblank on multiple crtcs. It also includes work done by Michel on making i915 triple buffering and pageflipping work properly. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/i915: Handle tiled buffers in vblank taskletKeith Packard2008-04-26
| | | | | | | The vblank tasklet update code must build 2D blt commands with the appropriate tiled flags Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/i965: On I965, use correct 3DSTATE_DRAWING_RECTANGLE command in vblankKeith Packard2008-04-26
| | | | | | | | The batchbuffer submission paths were fixed to use the 965-specific command, but the vblank tasklet was not. When the older version is sent, the 965 will lock up. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: cleanup DRM_DEBUG() parametersMárton Németh2008-02-07
| | | | | | | | | | As DRM_DEBUG macro already prints out the __FUNCTION__ string (see drivers/char/drm/drmP.h), it is not worth doing this again. At some other places the ending "\n" was added. airlied:- I cleaned up a few that this patch missed also Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: don't cast a pointer to pointer of list_headLi Zefan2008-02-07
| | | | | | | | | The casting is safe only when the list_head member is the first member of the structure. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: run cleanfile across drm treeDave Airlie2008-02-07
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* i915: fix vbl swap allocation size.Dave Airlie2007-10-14
| | | | | | Oops... Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.Eric Anholt2007-10-14
| | | | | | | | | The data is now in kernel space, copied in/out as appropriate according to t 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 DR is lost. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: Replace filp in ioctl arguments with drm_file *file_priv.Eric Anholt2007-10-14
| | | | | | | | | | 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 everyth on Linux dereferenced filp to get file_priv anyway, while only the mmap ioct went the other direction. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: Remove DRM_ERR OS macro.Eric Anholt2007-10-14
| | | | | | | | 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 f shared code to *BSD code. Signed-off-by: Dave Airlie <airlied@linux.ie>
* i915: make vbl interrupts work properly on i965g/gm hw.Dave Airlie2007-09-27
| | | | | | | | | | | | This code is ported from the DRM git tree and allows the vblank interrupts to function on the i965 hw. It also requires a change in Mesa's 965 driver to actually use them. [ Without this patch, my 965GM drops vblank interrupts - Jesse ] Signed-off-by: Dave Airlie <airlied@linux.ie> Acked-by: Jesse Barnes <jesse.barnes@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drm: remove drm_file_t, drm_device_t and drm_head_t typedefsDave Airlie2007-07-11
| | | | | | some drivers still todo. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: remove a bunch of typedefs on the userspace interfaceDave Airlie2007-07-11
| | | | | | | This moves a bunch of typedefs into a !defined __KERNEL__ to keep userspace API compatiblity, it changes all internal usages to structs/enum/unions. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: Spinlock initializer cleanupThomas Gleixner2007-05-25
| | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
* i915: Fix a DRM_ERROR that should be DRM_DEBUG.=?utf-8?q?Michel_D=C3=A4nzer?=2007-01-08
| | | | | | | 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. Signed-off-by: Dave Airlie <airlied@linux.ie>
* i915_vblank_tasklet: Try harder to avoid tearing.=?utf-8?q?Michel_D=C3=A4nzer?=2006-12-11
| | | | | | | | 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. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: i915 updates=?utf-8?q?Michel_D=C3=A4nzer?=2006-12-06
| | | | | | | | | Add support for DRM_VBLANK_NEXTONMISS. Bump minor for swap scheduling ioctl and secondary vblank support. Avoid mis-counting vblank interrupts when they're only enabled for pipe A. Only schedule vblank tasklet if there are scheduled swaps pending. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: i915: fix up irqflags arg=?utf-8?q?Michel_D=C3=A4nzer?=2006-12-06
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: i915: Only return EBUSY after we've established we need to schedule a ↵=?utf-8?q?Michel_D=C3=A4nzer?=2006-12-06
| | | | | | new swap. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: i915: Fix 'sequence has passed' condition in i915_vblank_swap().=?utf-8?q?Michel_D=C3=A4nzer?=2006-12-06
| | | | Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: Make handling of dev_priv->vblank_pipe more robust.=?utf-8?q?Michel_D=C3=A4nzer?=2006-12-06
| | | | | | | | | | 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. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: DRM_I915_VBLANK_SWAP ioctl: Take drm_vblank_seq_type_t instead=?utf-8?q?Michel_D=C3=A4nzer?=2006-12-06
| | | | | | | | | | | | | | | | | of pipe number. 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(). Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: i915: Add ioctl for scheduling buffer swaps at vertical blanks.=?utf-8?q?Michel_D=C3=A4nzer?=2006-12-06
| | | | | | | 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. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: add support for secondary vertical blank interrupt to i915=?utf-8?q?Michel_D=C3=A4nzer?=2006-12-06
| | | | | | | | 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. Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: Add support for Intel i965G chipsets.Alan Hourihane2006-09-21
| | | | | | | | This is a patch prepared by Guangdeng Liao based off of Tungsten Graphics's final code drop. From: Alan Hourihane <alanh@tungstengraphics.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* Add i915 ioctls to configure pipes for vblank interrupt.Dave Airlie2006-06-24
| | | | | | | | | i915 vblanks can be generated from either pipe a or b, however a disabled pipe generates no interrupts. This change allows the X server to select which pipe generates vblank interrupts. From: Keith Packard <keith.packard@intel.com> via DRM CVS Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: read breadcrumb in IRQ handlerDave Airlie2006-03-20
| | | | | From: Keith Whitwell <keithw@tungstengraphics.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: fixup i915 interrupt on X server exitDave Airlie2006-02-17
| | | | | | Fixes: IRQ disabled (i915?) when switchig between gnome themes (gnome-theme-manager) Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: update to i915 1.3.0Dave Airlie2006-01-02
| | | | | | | Add support for vblank ioctls to i915 driver From: Dave Airlie <airlied@linux.ie> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: misc cleanupDave Airlie2005-07-07
| | | | | | | | | | | This patch contains the following cleanups: - make needlessly global functions static - remove the following unused global functions: - drm_fops.c: drm_read - i915_dma.c: i915_do_cleanup_pageflip Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dave Airlie <airlied@linux.ie>
* Add missing license texts from Tungsten Graphics.Dave Airlie2005-06-23
| | | | | From: Alan Hourihane Signed-off-by: David Airlie <airlied@linux.ie>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-16
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!