Commit Graph

5614 Commits

Author SHA1 Message Date
Chris Wilson c262d02fb5 Limit PCI matching to VGA devices
Fixes X -configure

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 01:13:29 +01:00
Chris Wilson ad6355311b sna: Compile against xorg-1.10
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 01:02:53 +01:00
Chris Wilson b6c7c490d7 sna: Check for a NULL scanout after DPMS off with shadow enabled
We may mark the scanout as detached when all outputs are turned off (for
example during rotation) and so in the subsequent block handler we need
to be careful in case we are handling a detached shadow.

Reported-by: chr.ohm@gmx.net
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52514
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 00:48:59 +01:00
Chris Wilson f4acc01bb0 sna: Restore inplace upload for DRI compositors
With a DRI compositor we have to flush the output after every request,
which leads to major inefficiencies. This can be mitigated slightly if
we know we will have to upload shortly, which we track using the pixmap
flush flag.

In particular PutImage is meant to upload inplace to an active DRI
buffer, however this was accidentally dropped in

commit a253c95ec6
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Jul 15 13:32:35 2012 +0100

    sna: Prefer uploads to be staged in snoopable bo

Performace of putimage500 on ivb i7-3720qm:
  bare:        4610
  gnome-shell: 3000
  patched:     3390

Reported-by: Michael Larabel <Michael@phoronix.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-25 22:43:32 +01:00
Chris Wilson 5c969a05ef sna/gen7: Move the PS thread count definition into the constant struct
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-25 21:18:03 +01:00
Chris Wilson 901bb61821 sna/gen7: Remove duplicated constants
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-25 21:16:57 +01:00
Chris Wilson 8c5077e4ed Assume all unknown chipsets are future gen
I think the likelihood of a new product being launched based on a 8xx
design is remote enough not to worry about.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-25 17:20:21 +01:00
Chris Wilson 954d9c6aca sna: Initialise single-shot tile offsets before use
As noted by the compiler amidst all the noise.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-25 15:41:29 +01:00
Chris Wilson 484b072072 sna: Add 'gmux_backlight' to list of known devices for backwards compatability
Reported-by: Austin Lund <austin.lund@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=52423
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-25 12:23:09 +01:00
Chris Wilson 0ab6d7a50d sna: Prefer platform backlight devices over firmware
This is in contrast to libbacklight but closer to our original code as
we prefer a known custom backlight controller over the ACPI interfaces.
As only the ACPI interfaces are marked as firmware, and the custom
backlight controllers as platform, we therefore need to prefer platform
backlight devices.

Reported-by: Austin Lund <austin.lund@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=52423
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-25 12:20:36 +01:00
Chris Wilson b6d82ab076 sna: Reduce ping-pong for Composite with render disabled
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-25 10:42:26 +01:00
Chris Wilson de707b7dc8 uxa: Add Apple's gmux to the list of known preferred backlights
Reported-by: Austin Lund <austin.lund@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52423
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-25 09:07:06 +01:00
Chris Wilson 3d254e4010 sna: Use SETUP_BLT to reduce overheads for tiled BLT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-24 08:27:48 +01:00
Chris Wilson 2ed44149ea sna: Use SETUP_BLT to reduce overheads for stippled BLT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-24 08:27:44 +01:00
Chris Wilson c1785aaca2 sna: Remove a surplus function
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-23 23:00:25 +01:00
Chris Wilson 554fce8a65 uxa: Pass the correct parameters to intel_detect_chipset()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-23 22:59:16 +01:00
Chris Wilson 40d90dfd86 intel: Refactor the common chipset detection/override
Reduce the duplicate messages for which type of chip we by
amalgamating the common code.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-23 21:55:46 +01:00
Chris Wilson e3f6c48d18 sna: Refactor PutImage to avoid calling drawable_gc_flags() too early
drawable_gc_flags() asserts that the gc has been moved to the CPU prior
to its calls so that it can read the reduced raster operation.

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-23 15:16:47 +01:00
Chris Wilson 1af26ea422 sna: Flesh out tiled operations using the BLT
Before enabling the RENDER pipeline for this operation, let's just see
what is required to fully use the BLT pipeline as well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-23 15:16:47 +01:00
Chris Wilson ac182a0067 sna: Hold a reference to the full stipple pattern for repeated tiles
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-23 11:15:02 +01:00
Chris Wilson 83f683b470 2.20.1 release
A good brown paper bag bug release for SNA.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-22 23:20:23 +01:00
Chris Wilson 9402bdcc13 sna/glyphs: Also discard the glyph mask for bitmaps with an opaque source
Though I expect all such glyphs to be caught by the non-overlapping
checks...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-22 22:41:58 +01:00
Chris Wilson b315e0ebb7 sna: Tweak the fallback hints for XYPixmap PutImage
As the fallback uses a multiple-pass algorithm updating one plane at a
time, we wish to prepare the fallback surface for reads.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-22 22:41:49 +01:00
Chris Wilson 8acaf2693e sna: Promote tiled operations to the GPU if the tile is already on the GPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-22 16:28:07 +01:00
Chris Wilson 7d4a3e371b sna: Use an upload buffer for large stipples
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-22 16:28:07 +01:00
Chris Wilson 40e0cf32a2 sna/dri: We fail at predicting the flip frame
Simply report the values from the kernel, and transfer the blame...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 19:43:23 +01:00
Chris Wilson c6e316eeba sna: Adjust hints to prefer rendering convex polygon with the GPU
Keep the general polygons as only using the GPU if necessary, until the
cost of the routines is analysed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 18:18:32 +01:00
Chris Wilson f1e7248cb3 sna: Expand the heuristic for predicting when to use CPU bo for readback
For tiny transfers, the cost of setting up the GPU operation outweighs
the actual savings through increased throughput. So we try to guess when
it will be preferrable to simply read from the GPU bo directly.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 16:30:50 +01:00
Chris Wilson 06db69c2c7 sna: Update assertion for cached io buffers
As kgem_buffers may be reused and repurposed through the snoop cache it
is no longer true that only proxies will have the io flag set.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 15:30:27 +01:00
Chris Wilson d715e1e014 sna: Also discard the last-was-cpu flag when overwriting cpu damage
We interpret a FillRect that erradicates the existing damage as a
clear-event and an opportunity to see if it is worth migrating the
render commands to the GPU. This is undermined if we leave the
'prefer-cpu' flag intact.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 15:06:46 +01:00
Chris Wilson e95825d17c sna: Enable snooping on the reused linear buffer
This explains why suddenly I was seeing clflush again on a couple of
machines...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 14:48:19 +01:00
Chris Wilson c5e6b5874f sna: Fix the reversed not SHM assertion
Should be double checking that we are not about to free a CPU bo pinned
to a SHM pixmap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 14:28:47 +01:00
Chris Wilson f36b656ab2 sna: Avoid marking io/snoop buffers as unreusable unnecessarily
As they are kept in special caches, we can reserve the unreusable flags
for exceptional buffers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 13:33:03 +01:00
Chris Wilson 37dfdb0e9e sna: Correct assertion for __kgem_bo_size()
Only proxies are measured in bytes not pages.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 13:01:09 +01:00
Chris Wilson 83ad661bc7 sna: Change the vmap interface name to userptr
This is in common with the other drivers and avoids the conflict with
'vmalloc/vmap' used by the kernel for allocation of contiguous virtual
mappings.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 12:53:34 +01:00
Chris Wilson 8dcccd3082 sna: s/vmap/snoop/ since we use the flag more generically
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 12:51:37 +01:00
Chris Wilson 6acc9e6a6e sna: Fix role reversal of __kgem_bo_size() and kgem_bo_size()!
Reported-by: Jiri Slaby <jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 12:07:46 +01:00
Chris Wilson 286b0e1a48 sna: Refresh experimental userptr vmap support
Bring the code uptodate with both kernel interface changes and internal
adjustments following the creation of CPU buffers with set-cacheing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 11:45:37 +01:00
Chris Wilson 93c794eb3f sna: Micro-optimise copying boxes with the blitter
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 00:01:59 +01:00
Chris Wilson a0d95a9c2d sna: Only update a buffer when it becomes dirty
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-21 00:01:59 +01:00
Chris Wilson c52d265b83 sna: Tweak CPU bo promotion rules for CopyArea
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-20 22:00:54 +01:00
Chris Wilson f92a64dd91 sna: Only set the vmap flag after we make the bo snoopable
Otherwise if we fail then we incorrectly add the handle to the vmap
cache.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-20 15:54:35 +01:00
Chris Wilson 8b4cf24f14 sna: Also check whether the first upload box can use the BLT
No point checking boxes 1..n if box 0 is the troublemaker!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-20 14:46:32 +01:00
Chris Wilson df14b285be sna/gen6: Prefer the more flexible render ring for large surfaces
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-20 14:35:28 +01:00
Chris Wilson 578ff11c37 sna: Just use composite.box() when we only have one box
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-20 14:24:06 +01:00
Chris Wilson fb7987fc0b sna/dri: Cleanup ring selection for SNB+ CopyRegion
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-20 13:12:27 +01:00
Chris Wilson 3b56588fba sna: Update WIP userptr example usage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-20 10:19:25 +01:00
Chris Wilson 473a1dfb68 sna: Rename kgem_partial_bo to kgem_buffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-20 10:09:14 +01:00
Chris Wilson 8e6e8a2fa8 sna: Allow the snoopable upload buffer to take pages from the CPU vma cache
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-20 09:51:46 +01:00
Chris Wilson 979035bb9c sna: Remove topmost unused 'flush' attribute
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-20 07:28:54 +01:00