Commit Graph

3470 Commits

Author SHA1 Message Date
Chris Wilson 3145530fee Ensure that the partial batch is flushed upon the blockhandler
Currently, we require that a batch containing a dirty bo be submitted
before we mark the device as requiring a flush. So if we never submit a
batch between block handlers, we can end up sleeping without ever
flushing either the partial batch or the rendering to the scanout.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36776
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-05-07 20:04:18 +01:00
Paul Menzel 67e5a74e99 NEWS: fix typo (s/2.14/2.15/) to match corresponding release
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-22 14:18:17 +01:00
Jesse Barnes 0944e2d574 Add basic 30 bit depth support
Still need to handle video and gamma correction, but this gets the
display up and running at 30 bit depth if the kernel and display support
it.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-04-20 11:39:55 -07:00
Chris Wilson 1d102cc6ed Use SwapbuffersWait config option to control waiting on fullscreen swaps
As fullscreen swaps were going via a different path to the swapping of
ordinary windows, we were no longer honouring the xorg.conf option to
disable swapbuffer waiting.

This changes the code to only use pageflipping if the Option
"SwapbuffersWait" is set to "TRUE" (default).

Jesse's comment was that this should be superseded by actually
supporting asynchronous page flips. As we are missing kernel and dix level
support for that, in the meantime honour the config option.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Kristian Høgsberg <krh@bitplanet.net>
2011-04-20 08:51:50 +01:00
Chris Wilson c9fb69cb25 i965/video: We need 150 dwords of space for video state emission
(Actually around 131, with additional 10% just for safety.)

Reported-by: Modestas Vainius <geromanas@mailas.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36319
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-17 10:43:42 +01:00
Chris Wilson a51cd83d25 intel: Beware the unsigned promotion when checking for batch overflows
Reported-by: Modestas Vainius <geromanas@mailas.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=36319
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-17 10:43:35 +01:00
Chris Wilson 030aa3d136 NEWS: typo.
Spotted too late...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-14 10:25:21 +01:00
Chris Wilson 0e425b30e1 configure,NEWS: 2.15.0 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-14 10:16:40 +01:00
Chris Wilson 686018f283 Turn relaxed-fencing off by default for older (pre-G33) chipsets
There are still too many unresolved bugs, typically GPU hangs, that are
related to using relaxed fencing (i.e. only allocating the minimal
amount of memory required for a buffer) on older hardware, so turn off
the feature by default for the release.

Reported-and-tested-by: Knut Petersen <Knut_Petersen@t-online.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36147
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-04-12 09:03:01 +01:00
Chris Wilson 3d2b79098c dri: Rearrange code to compile against xorg-server-1.7
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-11 15:23:56 +01:00
Chris Wilson 4fa35dd5e1 NEWS: version bump for 2.14.903 snapshot
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-11 10:44:55 +01:00
Chris Wilson 97e9557619 intel: Restore manual flush for old kernels
Daniel Vetter pointed out that the automagic flush by the kernel for the
busy-ioctl was only introduced upstream in 2.6.37. So we still need to
manually emit a flush on old kernels.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-08 13:38:48 +01:00
Daniel Vetter fb40bf2b33 Tell users to grab i915_error_state on gpu hangs
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-04-08 12:37:35 +02:00
Chris Wilson 59ed6b05db Revert "i965: Convert to relative relocations for state"
This reverts commit d2106384be.

Breaks compiz (but not mutter/gnome-shell) on gen6. Not sure if this is
not seem deep interaction issue with multiple clients sharing the GPU or
just with compiz, but for now we have to revert and suffer the inane
performance hit. It looks suspiciously like another deferred damage
issue...

Bugzilla: 51a27e88b073cff229fff4362cb6ac22835c4044
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-07 16:16:58 +01:00
Chris Wilson 25521900df gen6: Invalidate texture cache
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-07 15:09:30 +01:00
Chris Wilson ad22003033 i965: Avoid transform overheads for vertex emit where possible
Minor improvement as the bottlenecks lie elsewhere. But it was annoying me.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-07 15:09:21 +01:00
Chris Wilson 007c2f86cb i965: Refactor to use constant sampler_state offsets
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-07 10:53:14 +01:00
Chris Wilson 8dc99b305a i965: Reset vertex_id after every batch
So that we always remember to re-emit the initial vertex elements state.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-04 22:30:29 +01:00
Chris Wilson 5982ed4da1 i965: Always update last_floats_per_vertex
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-04 19:32:43 +01:00
Chris Wilson 6f104189bb Take advantage of the kernel flush for dirty bo in the busy ioctl
Rather than just creating and submitting a batch that simply contains a
flush in order to periodically ensure that rendering reaches the
scanout, we can simply ask the kernel whether the scanout is busy. The
kernel will then submit a flush on our behalf if it is dirty, which
takes advantage of the kernel's dirty state tracking.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-04 19:24:30 +01:00
Chris Wilson 314439860e Remove unused function 'intel_bo_alloc_for_data'
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-04 17:20:04 +01:00
Chris Wilson ced747cefb Remove the unnecessary MI_FLUSH from the flush handler
The kernel will emit any required flushes between the dri client and the
ddx, and we do not rely on the MI_FLUSH here for scanout.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-04 17:14:38 +01:00
Chris Wilson 79444291a3 i965: segregate each vertex element into its own buffer
Reduce the number of relocations emitted by only emitting one relocation
per vertex element per vertex buffer.

References: https://bugs.freedesktop.org/show_bug.cgi?id=35733
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-04 16:42:57 +01:00
Chris Wilson d2106384be i965: Convert to relative relocations for state
References: https://bugs.freedesktop.org/show_bug.cgi?id=35733
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-04 15:57:28 +01:00
Chris Wilson 972569f6fd MI_LOAD_SCAN_LINES_INCL are inclusive and range [0, display height-1]
We have seen GPU hangs with:

batchbuffer at 0x0f9b4000:
0x0f9b4000:      0x09000000: MI_LOAD_SCAN_LINES_INCL
0x0f9b4004:      0x00000300:    dword 1
0x0f9b4008:      0x09000000: MI_LOAD_SCAN_LINES_INCL
0x0f9b400c:      0x00000300:    dword 1
0x0f9b4010:      0x01820000: MI_WAIT_FOR_EVENT
0x0f9b4014: HEAD 0x02000006: MI_FLUSH

on a 1366x768 display. That according to the specs an invalid command
for the pipe.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35576
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-04 13:58:48 +01:00
Chris Wilson 537a836dd6 946GZ is a 965G!
Sales & Marketing score another victory in confusing me.

Bugzila: https://bugs.freedesktop.org/show_bug.cgi?id=35854
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-01 07:10:25 +01:00
Chris Wilson 630d77bf10 Add a DRI2SwapEventPtr typedef for retro xservers
Because people are still trying to build upon our solid historical
foundations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-30 07:25:57 +01:00
Daniel Vetter f660df2cb4 Cleanup gen2 tiling confusion
A tile on gen2 has a size of 2kb, stride of 128 bytes and 16 rows.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-29 18:02:50 +02:00
Chris Wilson a2c8442fcb configure: version bump for 2.14.902 snapshot
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-29 11:38:59 +01:00
Chris Wilson 2f26807939 NEWS: Entry for 2.14.902 snapshot
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-29 11:38:18 +01:00
Keith Packard 7ccbec801e Recover from i830_dri2_add_frame_event out-of-memory condition
If adding either the frame or client resources fails, we need to clean
up afterwards properly.

First, add_frame_event needs to internally clean up after itself by
undoing any partial execution. Second, the callers need to look at the
return value and free the swap/flip info structure when necessary.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-03-24 17:12:00 -07:00
Chris Wilson ec133abc4b Use the per-generation batch context switch for atomic sequences
A modest boost to throughput and reduction in CPU overhead from
not flushing the batch on every transition from BLT to RENDER.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-24 15:28:21 +00:00
Keith Packard 86f23f21ab Skip client and drawable resource delete calls when deleting frame event
As the frame_event is about to be freed, there's no point in cleaning
up references to the drawable and client.

Signed-off-by: Keith Packard <keithp@keithp.com>
2011-03-23 17:14:12 -07:00
Keith Packard e1ff518230 Handle drawable/client destruction in pending swaps/flips
A pending swap or flip holds references to drawables and clients which
become invalid when destroyed. Add suitable resources to the database
to track those lifetimes and clean up the pending data structure then.

Later, when the pending swap or flip occurs, handle a missing drawable
by just discarding the flip or swap. Handle a missing client by not
sending an event or reply.

Signed-off-by: Keith Packard <keithp@keithp.com>
2011-03-23 17:14:12 -07:00
Keith Packard aa0328f342 dri2: Make DRI2FrameEvent public and use instead of void *
Instead of using void * for all of the flip_info and swap_info
pointers, just make the underlying structure a public data type and
use that.

Signed-off-by: Keith Packard <keithp@keithp.com>
2011-03-23 17:14:12 -07:00
Chris Wilson ee740778f5 i915/video: Clip indirect Xv output
In the case of a singular clip box and rendering onto the front buffer
larger than 2048, the clip extents were being ignored.  Here we can
simply reduce the size of the indirect pixmap to the clip extents.

Reported-by: Michael Chang <mchang@novell.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35346
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-16 08:40:08 +00:00
Chris Wilson 014fc7abb7 dri: Disable page-flip between a tiled buffer and a linear scanout
Keith Packard pointed out a loophole that could cause the DDX to end up
with a tiled scanout even if the user required a linear framebuffer;
that is by using page-flipping we could replace the scanout pixmap with
another of our choosing, and not necessarily tiled.

Close that loophole by only allowing an exchange of buffers between
identical tiling modes. For the common case, this is fine since they
will indeed be allocated with the same tiling. For the linear
framebuffer case with mesa using a tiled pixmap, we force it to blit
onto the scanout instead.

Reported-by: Keith Packard <keith.packard@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-09 17:10:50 +00:00
Chris Wilson 049ce4397d Give each user of tiling separate xorg.conf options
So that you can indeed allocate a linear framebuffer if you so desire
without breaking mesa.

Adds:

Section "Driver"
  Option "LinearFramebuffer" "False|True" # default false
EndSection

to xorg.conf

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-09 08:37:02 +00:00
Chris Wilson 0bb1a5f19e Update priv->stride after bo reallocation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-09 08:26:44 +00:00
Chris Wilson 34f9a3335f configure: Bump for 2.14.901 snapshot
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-02 17:46:19 +00:00
Chris Wilson 057783937d NEWS: Add entry for 2.14.901 snapshot
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-02 17:46:00 +00:00
Chris Wilson e889d3a709 dri: Protect against destroying a foreign DRI drawable
I have no clue as to how such an alien drawable reached us, but we have
the evidence of a segfault to say it can happen.

Reported-by: Bernie Innocenti <bernie@codewiz.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34787
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-27 10:51:50 +00:00
Daniel Vetter d21d781466 Fix relaxed tiling on gen2
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-02-22 18:33:04 +01:00
Bryce Harrington 9599fde65a Quell excessively verbose vblank counter failed error messages
Certain error situations can result in the following printed to
Xorg.0.log at a high enough rate to make log file size a problem.

(WW) intel(0): I830DRI2GetMSC:1062 get vblank counter failed: Invalid argument
(WW) intel(0): I830DRI2ScheduleWaitMSC:1118 get vblank counter failed: Invalid argument

Following in the tradition of commit 0ad6d6e1, limit the warnings to be
output 5 times, then quell the remainder.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34322
Ref.: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/710594

Signed-off-by: Bryce Harrington <bryce@canonical.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-19 19:06:03 +00:00
Adam Jackson 0ca595e9d5 Fix IGD and IGDNG constants to be comprehensible
Since, with GPU-on-package, it's hard to talk about a model number for
a specific chipset like 855GM, just use the platform names.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-17 20:36:45 +00:00
Chris Wilson 4c66b28870 uxa: Fallback if the temporary is too large
If the render operation requires a temporary source Picture and the
operation is large, larger than the maximum permitted bo, then we will
fail to allocate the bo. In this case, we need to fallback and perform
the operation on the CPU rather than dereference a NULL bo.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34399
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-17 16:52:58 +00:00
Chris Wilson 23f9b14df7 i965: Remove broken maximum base addresses from video
WRONG.

The hardware was never limited to 0x1000000 and the kernel can quite
rightly place objects above that limit. Specifying such had no relation
to reality, so why did we do it? TWICE!

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34017
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-12 10:42:34 +00:00
Javier Jardón 9184af921b Update autotools configuration
Use new libtool syntax and silent-rules to silent
the build output a bit (linux-like)
2011-02-09 11:46:19 +00:00
Bryce Harrington 6e721e098b Check return value of uxa_acquire_solid() since it can return NULL
uxa_acquire_solid returns NULL under OOM.  Thus the value of solid
must be checked before dereferencing it in the uxa_get_offscreen()
call.

Signed-off-by: Bryce Harrington <bryce@canonical.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-04 08:57:11 +00:00
Chris Wilson da990536ec uxa: Undo damage translation before appending
The region is used to paint onto the backing pixmap (and thus
translated) prior to being passed to the damage layer (wrt to the
drawable). So the local translation needs to be undone first.

Identified by Christopher James Halse Rogers.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33650
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-03 09:41:48 +00:00