Commit Graph

6040 Commits

Author SHA1 Message Date
Chris Wilson ef431b2d35 uxa: Drain the DRM event queue before server regeneration
Adam Jackson notes that what appeared to be my paranoid ramblings in SNA
actually served a purpose - it prevents a server crash following
server regen if an indirect client happened to be running at the time
(e.g. LIBGL_INDIRECT_ALWAYS=1 glxgears).

Reported-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-25 10:15:39 +01:00
Chris Wilson efb8ff1649 sna: Add missing ValidatePicture() for flattening alphamaps
Reported-by: Armands Liepins <armandsl@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56367
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-24 22:56:20 +01:00
Chris Wilson 1a489142c8 sna: Disable RandR hotplug events if Xinerama is enabled
Since RandR itself is disabled if Xinerama is enabled, for example with
ZaphodHeads, calling RRGetInfo() upon a hotplug event generates an
assertion.

Reported-by: Stephen Liang <inteldriver@angrywalls.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55260
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-24 00:01:24 +01:00
Chris Wilson d87c2756db sna: Beware 16-bit overflow when computing sample areas
Reported-by: Ognian Tenchev <drJeckyll@Jeckyll.net>
References: https://bugs.freedesktop.org/show_bug.cgi?id=56324
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-23 15:52:48 +01:00
Chris Wilson c7f48684cd sna: Only disallow hw sprite scaling on Haswell
Earlier chips (Ironlake, Sandybridge and Ivybridge) have integrated
sprite scalers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-23 15:17:56 +01:00
Chris Wilson 5c3ea9cf69 sna: Update DRI buffer if attached to the framebuffer for TearFree flips
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-22 22:35:17 +01:00
Chris Wilson 4dfc83359d sna: Tidy udev install/remove and add a couple of lines of DBG
References: https://bugs.freedesktop.org/show_bug.cgi?id=55260
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-22 14:56:01 +01:00
Chris Wilson 4d9687d49c sna: Refactor the common code to enable a timer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-22 13:42:30 +01:00
Chris Wilson fb72978887 sna: Only query the system time if we are processing timers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-21 14:36:48 +01:00
Chris Wilson c0d6a75f02 sna: Use the FLUSH_TIMER as the only wakeup timer source
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-21 14:32:14 +01:00
Chris Wilson 7bc829c39a sna: Remove the unused inactive eviction
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-21 14:25:00 +01:00
Chris Wilson 9fa6e4aa2d intel: Sanity check that the platform probes points to a i915.ko GEM device
References: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1069031
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-21 12:48:06 +01:00
Chris Wilson f6eed98fcf sna: Mark the to-be-damaged region first, then Process afterwards
Damage is processed in two phases, with the actual Damage being appended
before the operation is performed so that a copy can be made before
modification (e.g. software cursors).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-21 10:46:14 +01:00
Chris Wilson 60e4e009f9 sna: Move the source region to the CPU for a self-copy fallback CopyArea
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-20 17:59:45 +01:00
Chris Wilson 7ff8b1ba54 2.20.12 release
How embarrassing! My fault for rushing :(

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-20 16:23:26 +01:00
Chris Wilson 695b2ce2d3 uxa: Fixup drm_intel_bo_disable_reuse() typo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-20 16:19:21 +01:00
Chris Wilson 2083e253b3 2.20.11 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-20 16:07:11 +01:00
Chris Wilson fc0ba65f5e uxa: Disable bo reuse after binding to a scanout
On gen6+, bo are expected to be LLC by default. However, as using the bo
for the scanout causes it to be moved into the uncached domain, this
assumption is then false and we should release the bo back to the system
rather than spread the uncached buffers around. The most common
allocator of scanouts is for pageflipping which are already non-reusable
due to the DRI2 export, so there should actually be little impact.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-20 15:37:19 +01:00
Chris Wilson f4c32af48b sna: Clear the damage along with the BO when forcing the stall for inplace BLT
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56180
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-19 16:29:19 +01:00
Chris Wilson 299232bdb6 sna: Reorder final checks for using the BO and setting the damage pointer
When we return NULL from sna_drawable_use_bo(), the expectation is that
the damage pointer is also NULL. However, one SHM path leaked.

References: https://bugs.freedesktop.org/show_bug.cgi?id=56180
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-19 15:02:00 +01:00
Chris Wilson 257abfdabe sna/gen4: Presume we need a flush upon state change similar to gen5+
References: https://bugs.freedesktop.org/show_bug.cgi?id=55627
References: https://bugs.freedesktop.org/show_bug.cgi?id=55500
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-18 12:44:04 +01:00
Chris Wilson 8238c67298 sna: secure batches accepted upstream, so simply use runtime detection
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-17 22:19:01 +01:00
Chris Wilson 540666a0a8 sna/overlay: Move bo out of GTT domain after binding to overlay plane
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-17 17:01:17 +01:00
Chris Wilson 891bae4aa9 sna: Use the secure batches to program scanline waits on gen6+
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-17 14:37:11 +01:00
Chris Wilson 41be80a8ca sna: Enable support for SECURE batch buffers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-17 14:02:15 +01:00
Chris Wilson ba6c82cd9d sna/dri: Defensively check for GTT mmap failure during fallback
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-17 14:00:39 +01:00
Chris Wilson 7927f9a351 sna/gen7: Filter BLEND flags for CA glyphs
Fixes regression from commit c51aaa731e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Oct 11 11:36:00 2012 +0100

    sna/gen7: Replace bogus state tracking assertion

The assumption being that we only used the encoded flags for determining
the composite state is false for the magic CA pass.

Reported-by: Oleksij Rempel <bug-track@fisher-privat.net>
Reported-by: Eyal Lotem <eyal.lotem@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56037
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-16 17:56:30 +01:00
Chris Wilson 2ad4aa1955 sna: Drop fake tiled CPU mapping
The only path where this is correct already handles it as the special
case that it is, everywhere else it just nonsense.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-16 11:59:28 +01:00
Chris Wilson b42d81b63f 2.20.10 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-14 16:34:09 +01:00
Chris Wilson 877e9c57c7 sna/overlay: Trim suggested BestSize to fit within the overlay constraints
As the maximum reported image sizes are for the source image, we should
be careful not to recommend the application use an output Window larger
than can be handled by the overlay hardware. So shrink it to fit, whilst
preserving the aspect ratio.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-12 17:57:28 +01:00
Paulo Zanoni 1ec41590c9 Fix possible_clones computation for shared encoders between outputs
Libdrm's possible_clones is a mask of encoders. Xorg's possible_clones
is a mask of outputs, so we just can't do the following:

  output->possible_clones = kencoder->possible_clones;

This is a problem on Haswell because, at least with the current
patches floating on the mailing list, there is more than one connector
per encoder.

This patch writes the code to properly translate libdrm's encoder mask
into Xorg's output mask.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-12 09:45:37 +01:00
Chris Wilson 0b92a5a306 sna: Correct a bogus assertion after inplace PutImage
If we are forced to use the GPU bo as the target because the CPU bo is
busy, the priv->cpu flag is likely to remain set, so we need to clear it
rather than fail the assertion that is false.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-11 12:16:03 +01:00
Chris Wilson c51aaa731e sna/gen7: Replace bogus state tracking assertion
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-11 11:53:44 +01:00
Chris Wilson a56fa2fb4a sna: Rearrange switch to suppress a compiler warning in sna_copy_plane_blt()
Hide the impossible default case so that static analyzers are not
confused.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-11 10:55:34 +01:00
Chris Wilson 94a98d1c47 sna: Limit available space for gen2
Since pre-g33 chipsets impose massive alignment restrictions on objects
within the aperture we need to further restrict the amount of available
space to be sure we have sufficient room to accommodate the alignment.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-11 09:24:56 +01:00
Chris Wilson d3ae85dd01 sna: Use high/low watermarks for fenced aperture counting
This helps with fitting larger operations into the small apertures of
gen2, which due to the lax accounting could trigger ENOSPC.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-11 09:24:56 +01:00
Dave Airlie dadffd0061 intel: fix fullscreen damage posting on pageflip
While playing with MPX and sw cursor I noticed page flips won't
end up misrendering some bits, so the sw cursor was replacing the
bits on the wrong pixmap.

Fix the damage handling to be correct and append damage before swapping
the pointers and process damage after.

This fixes misrendering with MPX cursors under a fullscreen compositor,
that pageflips.

Signed-off-by: Dave Airlie <airlied@redhat.com>
[ickle: The secret is that damage is sometimes reported before the
rendering in DamageRegionAppend, and sometimes afterwards in
DamageRegionProcessPending. For instance, the software cursor operates
prior to being rendered over.]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-11 09:24:12 +01:00
Chris Wilson a1ea19a3ed sna: Prevent sign-extension when manipulating strides
Reported-by: Prit Laes <plaes@plaes.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55823
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-10 23:20:13 +01:00
Chris Wilson d73f5b5bb1 sna/gen6+: Initialize the damage for fill-boxes
In case we need to redirect the rendering for a large render target, we
need to initialize the damage pointer.

Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: ttps://bugs.freedesktop.org/show_bug.cgi?id=55812
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-09 19:41:10 +01:00
Chris Wilson ae6ae91baa sna: Check the map exists before trying to release it
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: ttps://bugs.freedesktop.org/show_bug.cgi?id=55812
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-09 18:36:59 +01:00
Chris Wilson 8bbfa88a86 sna: Also check the bg rrop for reads when deciding upon fallback placement
Reported-and-tested-by: chr.ohm@gmx.net
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55810
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-09 17:26:39 +01:00
Chris Wilson f8a005d1f9 sna: Pass the region, not its pointer, when moving the GC to the CPU
Fortunately, the sgc->region was not used along that particular fallback
path.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-09 00:23:24 +01:00
Chris Wilson fb5205a86d sna/gen5: Flush pipelined ops when changing state
When is a pipelined operation, not pipelined? That is the mystery posed
by our hardware!

Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51422
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-08 09:12:33 +01:00
Chris Wilson bed64c998d sna: Fix check_reloc_and_exec typo
Garbage xorg includes hiding genuine compiler warnings ftl once again.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-08 00:13:03 +01:00
Chris Wilson 2ac3776be8 sna: Check that we have sufficient space for a copy when replacing a fill
Reported-by: Timo Kamph <timo@kamph.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55700
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07 22:43:45 +01:00
Chris Wilson 1a5d5b9ae5 sna: Check that for batch overflows after advancing a BLT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07 22:41:02 +01:00
Chris Wilson b41ecda69f sna: Only reduce the maximum batch size for old kernels
Be careful we not increase the batch size to span multiple pages on 865g!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07 22:39:36 +01:00
Chris Wilson 3ca7f8be5b sna/gen2: Count the number of dwords required for the invariant
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07 22:39:10 +01:00
Chris Wilson 4d2dba0ba7 Use path for intel-gen4asm derived from pkg-config
As we use pkg-config to determine whether to use intel-gen4asm, we
should also use it to locate the right version of intel-gen4asm to use.
This allows the user to install the assembler in a non-standard path for
cross-builds and similar.

Reported-by: Josh Tripplet <josh@freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55646
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07 10:49:07 +01:00
Chris Wilson 249051d90f sna/gen2: And the other compile failure
Typing on Sunday before coffee is a very bad idea.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07 09:33:06 +01:00