Commit Graph

7006 Commits

Author SHA1 Message Date
Chris Wilson 45d4e8dcf9 uxa: Clear up the common intel directory
Move all the UXA backend specifc files into their own subdirectory.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:07 +01:00
Chris Wilson ab28526ea4 intel: Only print the unique chipset names
When printing out the list of supported chipsets, remove the (many
times) repeated names as they are very confusing and obscure the product
name you may be searching for.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:06 +01:00
Chris Wilson 6fd37e644d intel: Replace the codename in the user facing string for unknown Haswell parts
For these parts we do not yet known the correct marketing name, so
replace our use of the codename with the generic term.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:06 +01:00
Chris Wilson 7567c99ee9 intel: Set the correct marketing names for Ironlake, Sandybridge and Ivybridge
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:06 +01:00
Chris Wilson 17873be335 intel: Remove the SDV from the list of identified chipsets
These devices are not for retail and so have no marketing names.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:06 +01:00
Chris Wilson 4c6871684b intel: Cross-check an unnamed chipset against the list of known PCI-IDs
If we recognise the PCI-ID but do not have a marketing name for it, it
means we are deliberating ignoring it - presumably because it is an
engineering sample. In this case, we do not want to print out a warning
into the logfile so replace the "Unknown chipset" with some info
about the future product.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:06 +01:00
Chris Wilson b6bcb7ae20 intel: Source our PCI IDs table from the copy in the kernel
Rather than duplicating the information we already use in the kernel, we
can reuse the pci-id tables so long as we apply a little fuzz.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:49:06 +01:00
Chris Wilson bb8484da48 2.21.13 release 2013-07-28 14:08:24 +01:00
Chris Wilson 95e172b365 sna/dri: correct DBG typo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-28 14:08:24 +01:00
Chris Wilson c51cb32b6e test/dri2: We do not require the GLX includes
Drop the GLX includes as they are not needed and obviously break if the
GLX are not present on the system (and we fail to check during
configure).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-27 16:29:35 +01:00
Chris Wilson b4dbdd28ae sna: Try the indirect upload if we elect to use a mmap and it fails
This allows us to avoid the occassional kernel bug if mmap() fails and
the upload is possible via our indirect upload paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-26 15:53:01 +01:00
Chris Wilson 6f5fd772c7 sna/dri: Discard the strict checking for stale bo before performing a blit
Instead of checking that the DRI2Buffers match up with the current
DRI2Drawable, clip the area that is being copied to the minimum extents
of the Drawable, source and destination buffers. This ensures that we
never read nor write beyond the extents of the allocated or visible
regions.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67210
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67305
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-25 20:10:10 +01:00
Chris Wilson ef2a45731e sna/dri: Restore the comparison of bottom-right extents to the pixmap origin
This reverts a portion of commit 6d80bd6a73 so that we do not compare an
offset redirected window against its outer frame (e.g. glxgears in a
300x300 under unity sits within a much larger ~330x330 frame).

References: https://bugs.freedesktop.org/show_bug.cgi?id=67210
Reported-by: Joseph Yasi <joe.yasi@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-24 19:44:15 +01:00
Chris Wilson 42862298bc sna: Remove bogus comment concerning sna_enter_vt
This bogus comment confused both Chris Halse Rogers and myself.

Suggested-by: Christopher James Halse Rogers <raof@ubuntu.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-24 10:15:09 +01:00
Chris Wilson 6d80bd6a73 sna/dri: Cleanup validation of blit extents
Prompted by a suggestion by Haihao, clarify the intent behind checking
the incoming maximum blit extents against the recorded sizes of the
attached bo. Due to the asynchronous nature of DRI2 invalidation, it is
possible for the DRI2 buffer to be stale and for its bo to be smaller
than required for the client's blit.

References: https://bugs.freedesktop.org/show_bug.cgi?id=67210
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: haihao <haihao.xiang@intel.com>
2013-07-24 09:35:13 +01:00
Chris Wilson 74dd10d252 sna/gen5: The cached value of the pipelined pointers key requires 32-bits
Storing only the low 16-bits of the key for the pipelined state meant
that we forced an update with every new drawing op - with the side
effect of flushing the render cache.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67157
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-23 09:37:15 +01:00
Chris Wilson a8c7834e1d configure: Supply a default value for dridriverdir
Rather than fail to load DRI2 if not found.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-22 22:03:17 +01:00
Chris Wilson 8d94f030c6 configure: Fix enabling of DRI2
After setting it to false, we then need to set DRI2 to true after we
detect the headers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-22 22:01:22 +01:00
Chris Wilson 0498e0c38d sna: Fix DBG compilation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-22 19:42:56 +01:00
Chris Wilson e8cd5b5ff6 configure: Use --enable-dri to control both DRI/DRI2 enabling
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-22 19:42:56 +01:00
Chris Wilson 3e2a1be139 sna: Bail if we fail to find the attached CRTC during probing
In a Zaphod configuration, the set of CRTCs available for an output is
limited, and if that set does not match with the already established
linkage, our quick probe function will select no mode. However, since
the output is already on, the user definitely would like to continue
using it, so fallback to InitialConfiguratio to select an appropriate
mode.

Reported-by: Nick Bowler <nbowler@draconx.ca>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67176
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-22 19:37:41 +01:00
Chris Wilson 7b1a5024df sna/gen5: Rework the flush after blend state changes
QA complained that the full flush to memory was too much of a
performance hit, so let's try a lighter weight non-stalling pipe flush
without.

References: https://bugs.freedesktop.org/show_bug.cgi?id=67157
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-22 11:09:41 +01:00
Chris Wilson 2737aaab77 sna: Missing git add to fix typo in assert() from last commit
I915_TILING != I915_TILING_Y

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-21 20:42:59 +01:00
Chris Wilson fa961ec99a sna: Allow linear inplace uploads along the tiled X PutImage blt paths
Mostly for symmetry with GetImage, this in theory just bypasses a lot of
intermedate state checking.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-21 18:04:37 +01:00
Chris Wilson ff705331da sna: Unwind BLT setup if we don't emit any ops
Often we may find that the BLT operations we wish to do after a
XY_BLT_SETUP are either completely clipped out or transparent and so do
not generate any subsequent commands. This leaves us with many unused
XY_SETUP_BLT.

References: https://bugs.freedesktop.org/show_bug.cgi?id=61477
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-21 09:59:07 +01:00
Chris Wilson 2c78403cb5 sna: Remember to apply drawable offsets for composite memcpy
Yet another missing chunk from
commit 6921abd810
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jul 18 16:21:27 2013 +0100

    sna: Add a fast path for the most common fallback for CPU-CPU blits

I had the composite offsets, but not the normal window offsets!

Reported-by: F.Brown <francisbrwn9@gmail.com>
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67124
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67064
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-20 22:00:12 +01:00
Chris Wilson e9823ec2a9 sna: Release cloned pixmap when updating tearfree scanout
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-20 20:54:58 +01:00
Chris Wilson b27b165414 sna: Relax assertion that CPU syncs are performed on reffed objects
Along some paths, we use a CPU mapping on a temporary object that never
gets a user ref - so the assertion is bogus. A lesson I keep forgetting.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-20 20:04:59 +01:00
Chris Wilson f39d9ed092 sna: Correct typo in checking src extents before performing memcpy
A regression in
commit 6921abd810
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jul 18 16:21:27 2013 +0100

    sna: Add a fast path for the most common fallback for CPU-CPU blits

And add the full set of assertions to validate the memcpy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-20 18:14:55 +01:00
Chris Wilson f915d4a224 sna: Inform the upper layers that we turn the CRTC on after a modeset
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-20 15:26:47 +01:00
Chris Wilson 3f52a89046 sna: Fix application of composite offsets along PutImage fallback path
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-20 12:16:23 +01:00
Chris Wilson a998a8a349 sna: Tidy fast source clip processing for sna_do_copy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-20 12:05:16 +01:00
Chris Wilson 65a09436e6 sna/dri: Fix the strict blitting check not to assume the dst is the front buffer
In order to allow the case for copying onto a target other than the
front buffer, such as the fake front buffer for example.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-20 00:21:53 +01:00
Chris Wilson e386ba86ea sna: Perform an explicit check against the region extents
RegionNotEmpty() is only valid if we only use the Region API, and as we
mix direct operations on the region extents, we need to also do our own
final check.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 15:22:08 +01:00
Chris Wilson de472d95af sna: Check for bpp>=8 before attempting to use memcpy_blt fastpath
Fixes regression in
commit 6921abd810
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jul 18 16:21:27 2013 +0100

    sna: Add a fast path for the most common fallback for CPU-CPU blits

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 15:13:50 +01:00
Chris Wilson 4aa0288f16 sna: Return true from get_drawable_deltas() if the pixmap is offset
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 14:21:45 +01:00
Chris Wilson 6921abd810 sna: Add a fast path for the most common fallback for CPU-CPU blits
This path will mostly be upload for individual glyph uploads, for which
the malloc overhead is significant.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 14:04:48 +01:00
Chris Wilson 4da8308649 sna: Remove the duplicated pimxap migration for the composite fb path
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 14:04:38 +01:00
Chris Wilson 0d56f0eb84 sna: DBG controls to turn off unwinding partial bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 14:04:38 +01:00
Chris Wilson 494f4bdcb0 sna: Allow operation inplace when wedged
There are times, such as rendering into the scanout, where continuing to
use the GTT is preferrable even when wedged.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 14:04:38 +01:00
Chris Wilson fb058de4e6 sna: Treat a source with a CPU bo as being attached.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 14:04:38 +01:00
Chris Wilson 4723a730f4 sna: Discard overwritten operations before doing a BLT composite
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 14:04:38 +01:00
Chris Wilson b2f3237381 sna: Tidy a few DBG regarding cached uploads
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 14:04:37 +01:00
Chris Wilson 1b37a167d9 sna: Only IGNORE_CPU for blt composite operations if the size is known
Some operations we do not know the true extents and so check the whole
drawable when considering placement. In this case, the drawing may only
partially cover the drawable and so we can not simply ignore existing CPU
damage.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 14:04:37 +01:00
Chris Wilson 2d62f7c483 sna: Also do exposure checking after source clipping in sna_do_copy
Hopefully a final regression from:

commit 07926bfe50
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jul 11 15:28:55 2013 +0100

    sna: Remove the temporary region allocation from sna_do_copy

References: https://bugs.freedesktop.org/show_bug.cgi?id=67055
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 14:04:37 +01:00
Chris Wilson 2c8c462690 sna/dri: Return early is the DRI2CopyRegion is not attached to the GPU
This can happen if the DRI client passes in a stale DRI2Drawable - that
is the Drawable now references a new Pixmap which the client has not run
DRI2GetBuffers against.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 11:55:09 +01:00
Chris Wilson e5036fb159 sna/dri: Reject invalid DRI2Drawables if STRICT_BLIT is defined
Simply reject any attempts to copy using stale references (i.e. the
DRI2Drawable has changed structure but the client hasn't yet noticed).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 11:51:40 +01:00
Chris Wilson a45714c9a5 sna/dri: Rearrange some more DBG to come before its assertion
Again, useful to know what the assertion fails with.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 11:21:28 +01:00
Chris Wilson e9831b50b5 sna/dri: Expose the refcnts in DBG before we hit the assertions
Useful to try and explain some failures.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-19 11:04:46 +01:00
Chris Wilson 6c8b15d321 sna: Wrap cpuid.h
More our ifdef out of line from the main code into a header file, where
we can also apply a little bit of synatic sugar.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-07-17 21:02:02 +01:00