Commit Graph

22 Commits

Author SHA1 Message Date
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 73b7190421 intel: Nuke shared-entity support (zaphod mode).
It's been broken for years now, and KMS offers a much better chance of getting
this working sensibly without making a mess of the 2D driver.
2009-03-06 13:26:10 -08:00
Lukáš Hejtmánek 1cc9b1423c Fix another VT switch leak
The batch_bo buffer object is reallocated on enter VT, so we need to
unref it on leave vt.

Signed-off-by: Lukas Hejtmanek <xhejtman@ics.muni.cz>
2009-03-06 14:44:03 -05:00
Dave Airlie 1459f794e2 intel: fix DRI2 should be DRI_DRI2 2009-01-17 22:14:26 +10:00
Eric Anholt cab5b7a7b0 Fix invarient state emits for DRI2 (do it per batch, since there's no lock). 2009-01-15 09:31:55 -08:00
Keith Packard 7736b65be4 FatalError on batchbuffer map failure
Yes, it would be nice to do something other than crash here.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-06 09:31:39 -08:00
Carl Worth e8b95efbf5 i965: Add batch_flush_notify hook to create new vertex-buffer bo
This avoids mapping a buffer object which is being referenced
by a batch that has already been flushed, (which is a terribly
expensive operation).

On my machine this brings the performance of x11perf -aa10text
from 85k back to 150k, (where it was before a recent kernel
upgrade). Also, before this patch, when I used my X server
actively performance would drop as low as 15k---hopefully that
bug is gone with this change.
2008-12-08 12:50:39 -08:00
Kristian Høgsberg ee87f7becc Merge commit 'origin/master' into dri2
Conflicts:
	src/i830_dri.c
	src/i830_driver.c
	src/i830_memory.c
2008-11-17 12:26:38 -05: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
Kristian Høgsberg 282f51c3f0 Merge commit 'origin/master' into HEAD 2008-10-14 23:13:40 -04:00
Keith Packard 140451abb4 For non-DRM, add NOOPs after BATCH_BUFFER_START to verify completion
In non-DRM mode, the driver waits for the hardware by checking the ring
pointers; when the ring is empty, it assumes the hardware is idle. However,
the hardware updates the ring pointers before executing a command, so if the
MI_BATCH_BUFFER_START is the last command in the ring, the driver will think
the hardware is idle while it may still be processing the contents of the
batch buffer. Placing NOOPs after the BATCH_BUFFER_START allows the driver
to know that the hardware has completed the batch buffer.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-09 18:23:26 -07:00
Keith Packard d09d938bf2 i830 nondrm batch buffer insertion was missing ADVANCE_LP_RING() call
The ring commands to insert a batch buffer to the ring in i830 form were not
terminated by a call to ADVANCE_LP_RING(). This surely would have caused
chaos.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-09 18:23:26 -07:00
Keith Packard 8a54e3be5c Fix mis-merge of DRI2 changes related to pI830->directRenderingType
The old code had a directRendering boolean, the new one has an enum. A bunch
of the merges failed to remove the '!' in front of the old name, breaking a
bunch of 'we don't have DRI' tests.
2008-09-12 12:47:13 -07:00
Eric Anholt d8d95d8c71 Fix build failures that should have been in the previous merge commit. 2008-09-11 16:11:46 -07:00
Eric Anholt 58a3817305 Track move of exec to bufmgr, and restoration of emit/wait funcs for non-drm. 2008-09-09 19:18:10 -07:00
Jesse Barnes 3733a1b54c Fix build when using kernel DRM headers
Unfortunate mismatch between kernel and DRM master headers.
Kernel:
typedef struct _drm_i915_batchbuffer { ... } drm_i915_batchbuffer_t;
DRM master:
typedef struct drm_i915_batchbuffer { ... } drm_i915_batchbuffer_t;

so use the typedef rather than the morphing structure name.
2008-08-29 09:12:05 -07:00
Eric Anholt d775ddc64d [gem] Catch -EINTR from blocking GEM ioctl and restart. 2008-06-13 10:13:35 -07:00
Eric Anholt 339f00e340 [gem] Don't set up the ring in GEM mode, as that'll be handled by the kernel. 2008-06-10 22:50:01 -07:00
Eric Anholt e930c0dc5b Use bufmgr_gem when available instead of the fake bufmgr.
This is a bit unstable still sometimes.
2008-06-10 11:37:04 -07:00
Eric Anholt bade7d7d25 Use the DRM for submitting batchbuffers when available.
There are some concerns with this, as the DRM will be setting the nonsecure
flag on the batchbuffer, and the server may be submitting some secure-only
commands.  It appears to work on the 915GM test system currently.
2008-06-10 11:37:03 -07:00
Eric Anholt 6e94affcc2 Avoid needless flush emits in the blockhandler.
The EmitFlush in i830_dri.c was added as a pageflipping workaround, and was
noted to not even be sufficient then.  There's no reason for it to be there,
so it's removed.  After that, we just have to not emit an MI_FLUSH if we
already had, and cursor movement no longer bashes memory manager.
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