Commit Graph

25 Commits

Author SHA1 Message Date
Chris Wilson 1ac2e04023 Undo: Disable BLT for i830 and 845G
Reported-by: György Balló  <ballogy@freestart.hu>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32482
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-20 10:59:28 +00:00
Matthias Hopf c2fac6ca10 Don't use hardware acceleration on Sandybridge rev 07 hardware or earlier.
This is known to lock up the GPU even with the workaround in place.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31773
Signed-off-by: Matthias Hopf <mhopf@suse.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 11:42:33 +00:00
Chris Wilson 0bb135c40e Disable BLT for i830 and 845G
This pair of chipsets seem broken beyond repair, specifically the
erratum that causes the wrong PTE entry to be invalidated, so disable
our incorrect attempts to use the BLT on those devices.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-23 22:29:52 +00:00
Chris Wilson 18839aaec5 Fallback to shadow for Sandybridge if we don't have access to the BLT
If we attempt to emit BLT batches without kernel support, we just end up
with EINVAL and no rendering. Prevent this, and avoid uncached
rendering, by restoring the shadow fallback paths if there is no BLT
support.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-03 18:17:17 +00:00
Eric Anholt 8ff37667bf Remove the intermittent GEM_THROTTLE call.
This is a holdover from early GEM work when we weren't syncing on the
DRI client side.  It would keep clients from getting too far ahead and
killing their interactivity, by bringing everyone to a halt when
anyone was too far ahead.

Now, GL clients throttle themselves to avoid the problem, and it turns
out that in the case that they don't (long rendering to buffers with
no swap), this actually reduces X Server interactivity: instead of
lagging of X rendering behind input, you get no response for seconds
at a time, then a burst of rendering, then nothing again.

Reported by ajax.  Tested with moving a window while running
cairo-perf-trace on the GL backend (improvement) and X backend (no
significant change in responsiveness).
2010-11-02 10:58:46 -07:00
Zou Nan hai 42363134bd Support BLT acceleration on gen6
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-01 10:38:37 +00:00
Adam Jackson b066ddda31 intel: Listen for hotplug uevents (V3)
This connects the kernel uevent indicating monitor hotplugging to the
RandR notification events so that X applications can be notified
automatically when monitors are connected or disconnected.

This also adds a configuration option to disable hotplug events.

V2: missed a #ifdef HAVE_UDEV around some udev-specific declarations

V3: document Hotplug option in man page

Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-22 08:35:29 -07:00
Chris Wilson 4083197a44 Include a chipset generation number to clarify device specific paths.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-10-07 13:26:07 +01:00
Chris Wilson b27a521214 shadow: Enable shadow by default on SandyBridge
SandyBridge 2D support is far from complete, so instead of
permanently falling back and always using uncached GTT mapping for
rendering, use the shadow buffer instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-10-04 20:36:12 +01:00
Chris Wilson 7c7294ec00 shadow+dri2: Allow dri2 to be independently enabled with shadow
To enable DRI we create GEM buffers for the client to render into with
hardware acceleration. In order to maintain coherency between any 2D
render operations with the independent 3D clients (this includes the
reading of 2D rasterisation by the direct rendering client, e.g.
compiz using texture_from_pixmap) we need to replace the shadow pixmap
with the GTT mapping. Therefore 2D rendering to a DRI buffer will be to
uncached memory and thus penalised -- but the direct rendering clients
will have full hardware acceleration.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-10-04 20:24:36 +01:00
Chris Wilson 455f2939a6 Do not claim the PCI device if !KMS
By returning FALSE whilst probing if we can't find a KMS driver, we
allow X to fallback to trying the VESA driver -- rather than failing.

The initial idea for this was by Julien Cristau.

Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-10-02 13:32:58 +01:00
Zhenyu Wang 345c963e44 Always use tiling on Sandybridge
Sandybridge requires kind of buffer must be tiling, like depth.
And we would or have all tiling cases handled fine. So not allow
user to turn off tiling on Sandybridge+ may be fine.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2010-09-30 11:02:22 +08:00
Chris Wilson 537e73f3f9 Disable dri2 after forcing fallbacks
If we force fallbacks, then we will only create pixmaps in system
memory, preventing DRI2 from passing valid bo names to the clients. In
this case, they will just fallback to swrast. If we disable DRI2 after
forcing fallbacks (e.g. regenerating after a GPU hang or explicitly
disabled with the shadow buffer) then it is simpler just to disable the
extension and allow mesa to use pure swrast.

Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-26 09:50:44 +01:00
Zhenyu Wang f63c7df686 Disable swap buffer wait on Sandybridge
MI_LOAD_SCAN_LINE_INCL command is not available on sandybridge.
I haven't got reply on any substitution for it, so turn it off for now.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2010-09-17 16:39:12 +08:00
Chris Wilson ae160d7fbf shadow: Simply modify the Screen pixmap header
This is a slightly less risky strategy than having to remember to update
all pointers to the old Screen pixmap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-10 13:19:12 +01:00
Chris Wilson 2b96c18165 Enable a shadow buffer and disable GPU acceleration.
An attempt to workaround the incoherency in gen2 chipsets, we avoid
using dynamic reallocation as much as possible.

The first step is to disable allocation of pixmaps using GEM and simply
create them in system memory without a backing buffer object. This
forces all rendering to use S/W fallbacks.

The second step is to allocate a shadow front buffer and assign that to
the Screen pixmap. This ensure that the front buffer remains in the GTT
and pinned for scanout. The shadow buffer will be rendered to in the
normal fashion via the Screen pixmap, and be marked dirty. In the block
handler, the dirty shadow buffer is then blitted (using the GPU) over
the front buffer. This should completely avoid having to move pages
around in the GTT and avoid incurring the wrath of those early chipsets.
Secondly, performance should be reasonable as we avoid the ping-pong
caused by the small aperture and weak GPU forcing software fallbacks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-08 13:33:37 +01:00
Chris Wilson 8b04b350a9 Open-code DRICreatePCIBusID()
During -configure we would attempt to query the availablility of KMS
before the DRI module was loaded, thus we were unable to create a valid
bus identifier and so the query failed and we disowned the device.

Fixes:

  Bug 29611 - Xorg -configure fails
  https://bugs.freedesktop.org/show_bug.cgi?id=29611

Reported-by: Sergey Samokhin <prikrutil@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-19 20:05:08 +01:00
Chris Wilson c882f6a22a Move registration of vsync fd from pre-init to screen-init
Marty Jack reported an issue he found where the page-flipping handler
was being lost on server reset. This results in the swap completion
notification being lost, with the sporadic hang of full screen
applications like Compiz, flash and even glxgears!

Fixes:

  Bug 29584 - Server in compute loop
  https://bugs.freedesktop.org/show_bug.cgi?id=29584

There are also several possibly related bugs with similar symptoms, i.e.
OpenGL applications hanging on missed swap notifications.

Reported-by: Marty Jack <martyj19@comcast.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Keith Packard <keithp@keithp.com>
2010-08-18 10:21:22 +01:00
Chris Wilson db7cd7b9f0 Rename drmmode_display to intel_display
And fixup all the drmmode_* functions to have an intel prefix and
categorise those into intel_mode, intel_crtc, intel_output and
intel_property so that the functions are a little more self-descriptive
and, more importantly, are consistent.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-08-01 11:27:29 +01:00
Kristian Høgsberg 69d65f9184 Submit batch buffers from flush callback chain
There are a few cases where the server will flush client output buffers
but our block handler only catches the most common (before going into select).
If the server flushes client buffers before we submit our batch buffer,
the client may receive a damage event for rendering that hasn't happened yet.

Instead, we can hook into the flush callback chain, which the server will
invoke just before flushing output.  This lets us submit batch buffers
before sending out events, preserving ordering.

Fixes 28438: [bisected] incorrect character in gnome-terminal under compiz
https://bugs.freedesktop.org/show_bug.cgi?id=28438

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-07-30 09:29:55 -04:00
Chris Wilson 798c3a5fc6 Teardown the bufmgr on shutdown as well.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-13 10:30:51 +01:00
Chris Wilson 5de1b74d64 modes: There may be more than one crtc and output... DESTROY THEM ALL!
In order to cleanup all CRTCs and outputs on shutdown, we need to keep a
list of the individual structures and iterate over that list on
shutdown.

Also, the output and crtcs are configured just once and not for each
screen generation so move the shutdown to the termination and not on
CloseScreen. Oops.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-13 10:09:38 +01:00
Chris Wilson 6ff369cd26 drmmode: Destroy Crtc on screen shutdown
Should fix:

  Bug 26946 - CRTC cursor BO leak in 2D
  https://bugs.freedesktop.org/show_bug.cgi?id=26946

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-09 14:12:25 +01:00
Chris Wilson 28c0ca676c Remove unused inclusion of <sys/mman.h>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-25 13:40:22 +01:00
Chris Wilson 5c663ce844 Rename common infrastructure to the intel namespace.
After splitting out the i810 driver into its own legacy directory, we
can identify the common routines not as i830 but as intel. This
clarifies the code which *is* i830 specific.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-25 13:18:01 +01:00