Commit Graph

25 Commits

Author SHA1 Message Date
Chris Wilson 4902f546be i965: Ensure that URB_FENCE is aligned to 64-bytes
The PRM (Vol 1, p32) specifies that the URB_FENCE command must not cross
a cache-line boundary (64-bytes) in order to workaround a silicon issue.
Ensure that it does not by inserting an alignment point before the atomic
section.

This is a slightly too large hammer, but the easiest method to work with
the current BEGIN_BATCH/ADVANCE_BATCH protections.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-01-08 19:21:31 +00:00
Chris Wilson 417ad2712e Assert that we only call OUT_BATCH() inside a BATCH
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-08 23:43:57 +00:00
Chris Wilson cd475bad23 batch: Ensure we send a MI_FLUSH in the block handler for TFP
This should restore the previous level of synchronisation between
textures and pixmaps, but *does not* guarantee that a texture will be
flushed before use. tfp should be fixed so that the ddx can submit the
batch if required to flush the pixmap.

A side-effect of this patch is to rename intel_batch_flush() to
intel_batch_submit() to reduce the confusion of executing a batch buffer
with that of emitting a MI_FLUSH.

Should fix the remaining rendering corruption involving tfp [inc compiz]:

  Bug 25431 [i915 bisected] piglit/texturing_tfp regressed
  http://bugs.freedesktop.org/show_bug.cgi?id=25431

  Bug 25481 Wrong cursor format and cursor blink rate with compiz enabled
  http://bugs.freedesktop.org/show_bug.cgi?id=25481

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-07 11:15:42 +00:00
Chris Wilson 98e1121036 Remove flush parameter from intel_batch_flush()
There is only a single caller that wishes to forcibly append a flush
into the batch: intel_sync(). So move the logic there.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-02 20:49:54 +00:00
Chris Wilson 285f286597 batch: Track pixmap domains.
In order to detect when we require cache flushes we need to track which
domains the pixmap currently belongs to. So to do so we create a device
private structure to hold the extra information and hook it up.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-29 22:42:03 +00:00
Chris Wilson 67af5a9925 Check that batch buffers are atomic.
Since batch buffers are rarely emitted by themselves but as part of a
sequence of state and vertices, the whole sequence is emitted atomically.

Here we just enforce that batches are marked as being part of an atomic
sequence as appropriate.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-10 15:19:08 +00:00
Eric Anholt f309d47524 Call pPixmaps plain old pixmaps. 2009-10-08 15:34:09 -07:00
Eric Anholt af27a3a0a5 Rename the xf86 screen private from pScrn to scrn. 2009-10-08 15:34:09 -07:00
Eric Anholt cc5d3ba3c3 Rename the screen private from I830Ptr pI830 to intel_screen_private *intel.
This is the beginning of the campaign to remove some of the absurd use of
Hungarian in the driver.  Not that I don't like Hungarian, but I don't need
to know that pI830 is a pPointer.
2009-10-08 15:34:09 -07:00
Eric Anholt 8ae0e44e42 Move to kernel coding style.
We've talked about doing this since the start of the project, putting it off
until "some convenient time".  Just after removing a third of the driver seems
like a convenient time, when backporting's probably not happening much anyway.
2009-10-06 17:10:31 -07:00
Eric Anholt b9b159c498 Remove UMS support.
At this point, the only remaining feature regressions should be the lack of
overlay support (about to land), and the need to update the XVMC code to work
in the presence of KMS.

Acked-by: Keith Packard <keithp@keithp.com> (in principle)
Acked-by: Carl Worth <cworth@cworth.org> (in principle)
2009-10-06 16:22:31 -07:00
Carl Worth 8e942b70cb Revert "Rely on BO pixmaps being present in acceleration paths."
This reverts commit 4653a7db62.

Eric was getting a little too ambitious about our brave, new world.
We do still want the driver to work with old, non-GEM kernels
after all.
2009-05-26 16:12:17 -07:00
Keith Packard 1142353b48 intel_batch_start_atomic: fix size passed to intel_batch_require_space (*4)
intel_batch_start_atomic takes an argument in 32-bit units, and so it must
multiply that by 4 before passing it to intel_batch_require_space, which
takes an argument in bytes.

We should figure out what units we want to use and use the same everywhere...

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-01 11:54:26 -07:00
Eric Anholt 4653a7db62 Rely on BO pixmaps being present in acceleration paths. 2009-04-27 17:05:59 -07:00
Eric Anholt d82ea4372f Replace I830Sync's irq emit/wait code with bufmgr use.
This pre-GEM code was all sorts of broken -- see intel_bufmgr_fake.c for
the hoops that must be jumped to use that kernel interface successfully.
Yet we continued to use it even with KMS/DRI2/UXA, which may account for
some hangs.
2009-04-27 17:05:59 -07:00
Eric Anholt 96df22740b unifdef I830_USE_UXA.
We only have on acceleration architecture now, and you can always build it
if you're building the driver.
2009-04-27 17:05:59 -07:00
Eric Anholt fa81ae1637 Remove EXA support.
UXA has completely replaced EXA at this point.  UXA is the same rendering
core as EXA, but relying on kernel memory management or a fake bufmgr instead
of trying to manage memory in the X Server.
2009-04-27 17:05:59 -07:00
Eric Anholt db43b7870a Re-emit i915 composite setup when the batchbuffer wraps.
This also introduces tests to make sure that we asked for enough reserved space
and that we don't allow wrapping at the wrong time.

This fixes a hang during text rendering with DRI2 and a GL client running,
but could potentially affect text rendering with GEM in general with an
exceptional batchbuffer setup.
2009-01-16 17:56:03 -08:00
Keith Packard 546e2aca5b Reduce incidence of MI_FLUSH usage.
This tracks whether the last command in each batch is an MI_FLUSH command
and avoids appending another MI_FLUSH in the non-GEM cases.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-19 14:46:12 -07:00
Eric Anholt 0b4f7b6303 Track move of bufmgr functions to libdrm_intel. 2008-09-09 19:18:10 -07:00
Jesse Barnes cb217d4bfd Make EXA & UXA share bo getting function
Needed for proper acceleration & batch buffer handling.
2008-08-13 16:55:39 -07:00
Keith Packard 12df8f40d2 Use dri_bo for all object allocations, including pixmaps under uxa 2008-08-05 15:40:14 -07:00
Carl Worth e5fab0b768 Add OUT_RELOC macro and backing intel_batch_emit_reloc function 2008-07-31 11:14:25 -07:00
Eric Anholt ecf19e1cda Change most usage of pixmap offsets to using a reloc macro.
This is based on airlied's RING->BATCH commit.  The 965 code still needs to
be fixed up for relocations.
2008-06-10 11:37:03 -07:00
Eric Anholt b2216e7bc2 Use batchbuffers instead of ring emits for general commands.
The batchbuffers are managed using libdrm and bufmgr_fake, and dispatched from
the ring from userland.
2008-06-10 11:37:03 -07:00