Commit graph

33 commits

Author SHA1 Message Date
Dave Airlie af6061af0d Revert "drm/vbl rework: rework how the drm deals with vblank."
This reverts commit ac741ab71b.

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>
2008-05-07 12:15:39 +10:00
Jesse Barnes ac741ab71b drm/vbl rework: rework how the drm deals with vblank.
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>
2008-04-26 18:01:07 +10:00
Keith Packard 7b832b56bd drm/i915: Handle tiled buffers in vblank tasklet
The vblank tasklet update code must build 2D blt commands with the appropriate
tiled flags

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-04-26 17:48:54 +10:00
Keith Packard a36b7dcc05 drm/i965: On I965, use correct 3DSTATE_DRAWING_RECTANGLE command in vblank
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>
2008-04-26 17:48:47 +10:00
Márton Németh 3e684eae58 drm: cleanup DRM_DEBUG() parameters
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>
2008-02-07 15:09:39 +10:00
Li Zefan d5b0d1b5bd drm: don't cast a pointer to pointer of list_head
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>
2008-02-07 15:09:39 +10:00
Dave Airlie bc5f4523f7 drm: run cleanfile across drm tree
Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-07 15:09:38 +10:00
Dave Airlie 54583bf4ef i915: fix vbl swap allocation size.
Oops...

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-10-15 10:42:27 +10:00
Eric Anholt c153f45f9b drm: Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.
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>
2007-10-15 10:38:20 +10:00
Eric Anholt 6c340eac02 drm: Replace filp in ioctl arguments with drm_file *file_priv.
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>
2007-10-15 10:38:20 +10:00
Eric Anholt 20caafa6ec drm: Remove DRM_ERR OS macro.
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>
2007-10-15 10:38:19 +10:00
Dave Airlie e4a7b1d1d9 i915: make vbl interrupts work properly on i965g/gm hw.
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>
2007-09-27 19:47:28 -07:00
Dave Airlie 84b1fd103d drm: remove drm_file_t, drm_device_t and drm_head_t typedefs
some drivers still todo.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-07-11 15:53:27 +10:00
Dave Airlie c60ce623bd drm: remove a bunch of typedefs on the userspace interface
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>
2007-07-11 15:27:12 +10:00
Thomas Gleixner a6399bdd49 drm: Spinlock initializer cleanup
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>
2007-05-26 03:52:45 +10:00
=?utf-8?q?Michel_D=C3=A4nzer?= eac681b3ae i915: Fix a DRM_ERROR that should be DRM_DEBUG.
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>
2007-01-08 20:38:34 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 3188a24c25 i915_vblank_tasklet: Try harder to avoid tearing.
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>
2006-12-11 18:32:27 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 2228ed6722 drm: i915 updates
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>
2006-12-07 15:53:31 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= a0b136bb69 drm: i915: fix up irqflags arg
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 21fa60ed4e drm: i915: Only return EBUSY after we've established we need to schedule a new swap.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 2dbb232c4d drm: i915: Fix 'sequence has passed' condition in i915_vblank_swap().
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 5b51694aff drm: Make handling of dev_priv->vblank_pipe more robust.
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>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 541f29aad7 drm: DRM_I915_VBLANK_SWAP ioctl: Take drm_vblank_seq_type_t instead
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>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= a6b54f3f50 drm: i915: Add ioctl for scheduling buffer swaps at vertical blanks.
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>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 68815bad72 drm: add support for secondary vertical blank interrupt to i915
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>
2006-12-07 15:53:28 +11:00
Alan Hourihane c29b669caa drm: Add support for Intel i965G chipsets.
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>
2006-09-22 05:32:32 +10:00
Dave Airlie 702880f243 Add i915 ioctls to configure pipes for vblank interrupt.
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>
2006-06-24 17:32:58 +10:00
Dave Airlie 6e5fca53c7 drm: read breadcrumb in IRQ handler
From: Keith Whitwell <keithw@tungstengraphics.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-03-20 18:34:29 +11:00
Dave Airlie 91e3738ebc drm: fixup i915 interrupt on X server exit
Fixes: IRQ disabled (i915?) when switchig between gnome themes (gnome-theme-manager)

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-02-18 15:17:04 +11:00
Dave Airlie 0d6aa60b4a drm: update to i915 1.3.0
Add support for vblank ioctls to i915 driver

From: Dave Airlie <airlied@linux.ie>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-01-02 20:14:23 +11:00
Dave Airlie c94f702985 drm: misc cleanup
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>
2005-07-07 21:03:38 +10:00
Dave Airlie bc54fd1ad3 Add missing license texts from Tungsten Graphics.
From: Alan Hourihane
Signed-off-by: David Airlie <airlied@linux.ie>
2005-06-23 22:46:46 +10:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
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!
2005-04-16 15:20:36 -07:00