Commit Graph

124 Commits (d6098db1409e8ee45052920d3acdd3b6f2cb80aa)

Author SHA1 Message Date
Kristian Høgsberg b7086e6ae5 Fix one last occurance of struct _drm_i915_batchbuffer.
Thanks to Todd Merrill for pointing it out.
2008-02-22 11:22:52 -05:00
Kristian Høgsberg 373dbcf8b2 i915: Add a dri2 init path that gets the lock from the dri2 sarea. 2008-02-13 13:34:02 -05:00
Kristian Høgsberg db3f03ae35 i915: Only look up dev_priv->mmio_map if it's not already set up 2008-02-13 13:34:02 -05:00
Kristian Høgsberg ee15459483 i915: Add I915_PARAM_CHIPSET_ID param to get chipset ID. 2008-02-13 13:34:02 -05:00
Kristian Høgsberg 4feb0638f1 i915: Make sarea_priv setup optional. 2008-02-13 13:34:02 -05:00
Thomas Hellstrom 76748efae2 i915: Re-report breadcrumbs on poll to the fence manager,
since a breadcrumb may actually turn up before a corresponding fence object
has been placed on the fence ring.
2008-02-05 10:36:49 +01:00
Thomas Hellstrom 47ee6237fe i915: Avoid calling drm_fence_flush_old excessively. 2008-01-30 22:14:02 +01:00
Thomas Hellstrom f1edb7ad91 Simplify the fencing code and differentiate between flushes and
waiting types.
Add a "command_stream_barrier" method to the bo driver.
2008-01-30 22:06:02 +01:00
Dave Airlie 5b99306452 i915: fix missing header when copying data from userspace 2008-01-24 15:18:09 +10:00
Dave Airlie 34b71eb451 i915 make relocs use copy from user
Switch relocs to using copy from user and remove index and pass buffer
handles in instead.
2008-01-24 14:37:40 +10:00
Thomas Hellstrom 88c511e49d Properly propagate the user-space fence flags.
This avoids a sync flush when user-space has already programmed
and MI_FLUSH in the batchbuffer.
2008-01-15 10:03:41 +01:00
Márton Németh 9ab620d661 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
2008-01-03 16:56:04 +10:00
Keith Packard 5f23519b14 Document drm_bo_handle_validate. Match drm_bo_do_validate parameter order.
Document parameters and usage for drm_bo_handle_validate. Change parameter
order to match drm_bo_do_validate (fence_class has been moved to after
flags, hint and mask values). Existing users of this function have been
changed, but out-of-tree users must be modified separately.
2007-12-15 12:10:42 -08:00
Keith Packard 7dcaf0cdbb Make relocation validate client computed values when debugging 2007-12-11 20:23:00 -08:00
Keith Packard 4ec8f58d04 i915: wait for buffer idle before writing relocations
When writing a relocation entry, make sure the target buffer is idle,
otherwise the GPU may see inconsistent data.
2007-12-11 20:23:00 -08:00
Keith Packard 57b9a54eb6 Allow relocation to be skipped when buffers don't move.
One of the costs of superioctl has been the need to perform relocations
inside the kernel. The cost of mapping the buffers to the CPU and writing
data is fairly high, especially if those buffers have been mapped and read
by the GPU.

If we assume that buffers don't move around very often, we can have the
client compute the relocations itself using the previous GPU address. When
that object doesn't move, the kernel can skip computing and writing the
updated data.

Here's a patch which adds a new field to struct drm_bo_info_req called
'presumed_offset', and a new DRM_BO_HINT_PRESUMED_OFFSET that is set when
this field has been filled in by the client.

There are two separate optimizations performed when the presumed_offset is
correct:

 1. i915_exec_reloc checks to see if all previous buffer offsets were guessed
    correctly. If so, there's no need for it to look at *any* of the
    relocations for a buffer. When this happens, it skips the whole
    relocation process, simply returning success.

 2. i915_apply_reloc checks to see if the target buffer offset was guessed
    correctly. If so, it skips mapping the relocatee, computing the
    relocation and writing the value. If no relocations are needed, the
    relocatee should never be mapped to the CPU, and so the kernel shouldn't
    need to wait for any fences to pass.
2007-12-11 20:23:00 -08:00
Kristian Høgsberg e38749ebe5 Remove references to the sarea_priv perf_boxes field.
This field isn't touched or read by any other code in the stack so it's
time to retire these last few references.
2007-12-05 14:43:22 -05:00
Robert Noland b2f8368b57 Clarify order of operations 2007-12-01 14:44:30 -05:00
Robert Noland 453a295c82 DRM_DEBUG already prints the function name. 2007-12-01 14:44:29 -05:00
Robert Noland d6295cc9ff drm: Add _DRM_DRIVER map flag.
This flag indicates that the driver is responsible for the map.
2007-12-01 02:40:13 -05:00
Jiri Slaby 309b2c4c05 Beside the emitted warning, the added cast (u64 -> unsigned) strips out
part of address on 64 bit. Cast to unsigned long instead.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2007-11-29 09:55:38 +10:00
Dave Airlie dc338921f9 drm: more cleanups 2007-11-29 09:38:21 +10:00
Dave Airlie e9fa8fe734 i965: oops force mi batchbuffer start 2007-11-28 22:46:06 +10:00
Dave Airlie 5dc5c36e62 drm: major whitespace/coding style realignment with kernel 2007-11-22 16:10:36 +10:00
Eric Anholt 3fc3fc082a Fix capitalization of __linux__ define. 2007-11-19 08:41:23 -08:00
Robert Noland a74181ddb2 Bug #13233: Fix build on FreeBSD. 2007-11-18 22:42:40 -08:00
Dave Airlie 2eee33ace5 intel: add flushing for i8xx chipsets.
Add a nut vs hammer style chipset flush for the i8xx chipsets - reenable TTM
code paths
2007-11-15 13:29:55 +11:00
Dave Airlie 47497abc1e i915: oops disable TTM is backwards 2007-11-07 23:10:24 +10:00
Dave Airlie 9280076b67 i915: disable TTM on 8xx chips for now until flushing is solved 2007-11-06 18:13:46 +11:00
Dave Airlie 7f6bf84c23 drm: remove lots of spurious whitespace.
Kernel "cleanfile" script run.
2007-11-05 12:42:22 +10:00
Dave Airlie 17f0882d50 drm: add chipset flushing via agp support 2007-10-31 11:33:34 +11:00
Dave Airlie 2489062a33 i915: add backwards compat chipset flushing code 2007-10-31 11:27:44 +11:00
Jesse Barnes 1e2a2babab i915: suspend/resume support
Add suspend/resume support to the i915 driver.  Moves some of the
initialization into the driver load routine, and fixes up places where we
assumed no dev_private existed in some of the cleanup paths.  This allows
us to suspend/resume properly even if X isn't running.
2007-10-26 16:10:02 -07:00
Thomas Hellstrom 07706c9b79 Merge branch 'master' into drm-ttm-finalize 2007-10-25 09:24:45 +02:00
Dave Airlie a70fe82baf i915: relocate buffers before validation add memory barrier between two 2007-10-25 16:53:18 +10:00
Dave Airlie c5f158abbe i915: remove relocatee kernel mapping sooner stops mutex taking during sleep 2007-10-25 16:52:33 +10:00
Eric Anholt 83199c257e Fix missing \n on some DRM_ERROR in i915_dma.c 2007-10-24 16:27:51 -07:00
Dave Airlie fd7c24753c i915: use a drm memory barrier define 2007-10-24 11:13:15 +11:00
Dave Airlie a294aa724a i915: require mfence before submitting batchbuffer 2007-10-23 17:54:07 +10:00
Thomas Hellstrom 919c886b2b A cmdbuf mutex to implement validate-submit-fence atomicity in the absence
of a hardware lock.
2007-10-22 18:59:37 +02:00
Dave Airlie 22883ff26b i915: split reloc execution into separate function 2007-10-22 11:54:41 +11:00
Thomas Hellstrom 9ddff6d15f Adapt i915 super-ioctl for lock-free operation. 2007-10-21 12:26:26 +02:00
Thomas Hellstrom 48b5eaf303 Simple replacement for hardware lock in some cases.
Fix i915 since last commit.
2007-10-20 16:49:43 +02:00
Dave Airlie ec1162b212 i915: lock struct mutex about buffer object lookups 2007-10-17 15:36:14 +10:00
Dave Airlie 74001c34e5 i915: add superioctl support to i915
This adds the initial i915 superioctl interface. The interface should be
sufficent even if the implementation may needs fixes/optimisations internally
in the drm wrt caching etc.
2007-10-12 10:54:38 +10:00
Jesse Barnes 0bb2395a8b Revert drm_i915_flip_t braindamage
I should not have renamed this field.
I should not have renamed this field.
I should not have renamed this field.

On the plus side, it was at least binary compatible.
2007-09-28 10:10:08 -07:00
Jesse Barnes 3cb8acd5ab Disambiguate planes & pipes for swap operations
This mod makes the SAREA track plane to pipe mappings and corrects the name of
the plane info variables (they were mislabeled as pipe info since until now all
code assumed a direct mapping between planes and pipes).

It also updates the flip ioctl argument to take a set of planes rather than
pipes, since planes are flipped while pipes generate vblank events.
2007-09-11 03:48:46 -07:00
Dave Airlie da27986870 i915: i965 non-secure batchbuffer bit has moved. 2007-08-11 08:57:53 +10:00
Eric Anholt 5b38e13416 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 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-20 18:16:42 -07:00
Eric Anholt c1119b1b09 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 everything
on Linux dereferenced filp to get file_priv anyway, while only the mmap ioctls
went the other direction.
2007-07-20 13:39:45 -07:00