Commit Graph

3458 Commits

Author SHA1 Message Date
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
Chris Wilson ce1e096905 Rename 'intel' backlight to match upstream name in 2.6.38
(Just waiting for libbacklight to bring sanity...)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-31 20:27:26 +00:00
Cyril Brulebois 80f59c8a4f xvmc: Stop using uninitialized variable.
The actual code was removed in 5f64122551, where the get_surface_status
driver callback was dropped. Just return Success if there were no issues
with the parameter.

Get rid of the following with CFLAGS="-Wall -Werror":
|   CC     intel_xvmc.lo
| cc1: warnings being treated as errors
| intel_xvmc.c: In function ‘XvMCSyncSurface’:
| intel_xvmc.c:677: error: ‘ret’ may be used uninitialized in this function
| intel_xvmc.c:672: note: ‘ret’ was declared here

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-31 10:00:31 +00:00
Cyril Brulebois 86284abafb xvmc: Silence gcc, adding a cast to work around signedness issues.
Both exported XvMCPutSlice/XvMCPutSlice2 functions have a prototype with a
parameter whose signedness differs from the one in the put_slice/put_slice2
functions they call. Make it unsigned through a cast.

Get rid of this accordingly with CFLAGS="-Wall -Werror":
|   CC     intel_xvmc.lo
| cc1: warnings being treated as errors
| intel_xvmc.c: In function ‘XvMCSyncSurface’:
| intel_xvmc.c:677: error: ‘ret’ may be used uninitialized in this function
| intel_xvmc.c:672: note: ‘ret’ was declared here

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-31 10:00:16 +00:00
Cyril Brulebois fc2eb64d7a xvmc: Silence gcc, add parentheses around arithmetic.
Get rid of those accordingly with CFLAGS="-Wall -Werror":
|   CC     i915_xvmc.lo
| cc1: warnings being treated as errors
| i915_xvmc.c: In function ‘i915_mc_one_time_state_emit’:
| i915_xvmc.c:369: error: suggest parentheses around arithmetic in operand of ‘|’
| i915_xvmc.c:374: error: suggest parentheses around arithmetic in operand of ‘|’
| i915_xvmc.c:379: error: suggest parentheses around arithmetic in operand of ‘|’
| i915_xvmc.c: In function ‘i915_mc_load_indirect_render_emit’:
| i915_xvmc.c:708: error: suggest parentheses around arithmetic in operand of ‘|’
| i915_xvmc.c:713: error: suggest parentheses around arithmetic in operand of ‘|’

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-31 09:59:04 +00:00
Cyril Brulebois 1b9349bceb xvmc: Silence gcc, add parentheses around assignment.
Get rid of the following with CFLAGS="-Wall -Werror":
|   CC     intel_xvmc_dump.lo
| cc1: warnings being treated as errors
| intel_xvmc_dump.c: In function ‘intel_xvmc_dump_open’:
| intel_xvmc_dump.c:41: error: suggest parentheses around assignment used as truth value

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-31 09:58:33 +00:00
Cyril Brulebois ae8877e307 xvmc: Get rid of unused variables.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-31 09:58:11 +00:00
Chris Wilson 8bd6a7149f Enable conditional compilation of asserts
With '--disable-debug' we define NDEBUG and so disable the asserts, that
is we continue to default to compiling asserts into the code.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-29 12:06:59 +00:00
Chris Wilson a5a1ab7bbc i915: Remove unused 'w' and 'h'
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-28 17:20:06 +00:00
Chris Wilson 2c9b3225d8 i915: Remove unused 'num_floats' variable
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-28 17:19:39 +00:00
Chris Wilson c6dc27562a uxa: Only recreate the glyph cache on *generational* updates
The screen resources are recreated when the screen is rotated as well,
without being finalized. In this case, we do not need to reconstuct the
cache (or if we did, we would need to tear it down first).

Reported-by: Till Matthiesen <entropy@everymail.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33412
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-24 20:29:57 +00:00
Xiang, Haihao 5baa63c634 Fix an error in 4c4ad55556.
See the original patch at https://bugs.freedesktop.org/show_bug.cgi?id=24767

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2011-01-21 09:02:16 +08:00
Chris Wilson 3e28a0c0b4 Create the UXA generational resources during screen create
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-20 15:13:33 +00:00