Commit Graph

5656 Commits

Author SHA1 Message Date
Chris Wilson 0a4bb8663b sna/gen4: Flush not required between fill vertices, only nomaskcomposite
A small breakthrough... Still need to flush the primitive between state
changes though.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-01 11:32:01 +01:00
Chris Wilson 33c028f8be sna/gen6+: Reduce floats-per-vertex for spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-01 11:01:38 +01:00
Chris Wilson 9b2873d3d9 sna/gen4+: Implement an opacity shader
Avoid the cumbersome lookup through the alpha gradient texture and
simply multiply the incoming opacity value. The next step will be to
reduce the number of floats required per vertex.

Now that we have removed the primary user of the alpha solid cache, it
may be time to retire that as well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-01 10:32:37 +01:00
Chris Wilson fd3a123605 sna/gen6: Enable 8 pixel dispatch
This gives a small performance increase when operating with rectangles,
which is reasonably frequent.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-31 19:11:54 +01:00
Chris Wilson 8922b804bc sna/gen7: Enable 8 pixel dispatch
This gives a small performance increase when operating with rectangles,
which is reasonably frequent.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-31 19:11:54 +01:00
Chris Wilson 492093d04b sna: Generate shaders for SNB+ 8-pixel dispatch
Not ideal yet, sampling an alpha-only surface using SIMD8 only seems to
ever return 0...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-31 19:11:08 +01:00
Chris Wilson 6a5ed88f9f sna/gen4: Tidy debugging code
Cluster the ifdefs together in the initialisation code.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-31 17:45:20 +01:00
Chris Wilson 46ec9b0ed5 sna: Update DPMS mode on CRTC after forcing the outputs on
If we forcibly update the outputs to be on, then the core will not issue
its on DPMS event and we miss out on updating the CRTC bookkeeping in
sna_crtc_dpms(). So we need to update the flag on the CRTC as we
manipulate the outputs during modesetting.

References: https://bugs.freedesktop.org/show_bug.cgi?id=52142
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-31 17:45:20 +01:00
Chris Wilson 8f166d26b8 sna: Be more careful with damage reduction during CompositeRectangles
We actually need to force DAMAGE_ALL in case we are promoting the GPU
pixmap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-31 13:11:46 +01:00
Chris Wilson e6cb5d93ea sna: Avoid overlapping gpu/cpu damage with IGNORE_CPU
We cannot simply ignore the presence of CPU damage with IGNORE_CPU but
must remember to discard it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-30 13:12:05 +01:00
Chris Wilson c9805ba987 sna: Export sna_drawable_use_bo() to select target for FillRectangles
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-30 13:12:05 +01:00
Chris Wilson 89e75dbcb6 sna/gen7: Prefer the BLT for self-copies
If we are copying to ourselves, we have to regularly flush the render
cache at which point the RENDER pipeline is slower than the BLT
pipeline.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-30 13:12:04 +01:00
Chris Wilson 33d6afda6c sna/gen7: Compile basic kernels at runtime 2012-07-30 13:12:04 +01:00
Chris Wilson eba8d3b3e1 sna/gen6: Compile basic kernels at runtime 2012-07-30 13:12:04 +01:00
Chris Wilson 8515ec9040 sna/gen5: Compile basic kernels at runtime 2012-07-30 13:12:04 +01:00
Chris Wilson 00c08b1842 sna/gen4: Compile basic kernels at runtime 2012-07-30 13:12:04 +01:00
Chris Wilson 7c9dbc980b sna: Assemble SF and WM kernels using brw
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-30 13:12:04 +01:00
Chris Wilson 8ebafa0493 sna: Add the brw assembler
In order to construct programs on the fly to cater for the combinatorial
number of possible shaders, we need an assembler, whilst also taking the
opportunity to remove some of the inefficiencies and mistakes from the
current shaders.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-30 12:57:13 +01:00
Chris Wilson ca9d9c02a2 sna: Prefer not to create a GPU bo without RENDER acceleration
Unless that bo happens to be used on a render chain to the scanout.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-30 11:02:36 +01:00
Chris Wilson eefbe5b603 sna: Debug option to test migration of inactive pixmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-30 10:56:29 +01:00
Chris Wilson d3499cacb5 sna: Assert that we never attempt to submit a batch whilst wedged
We should be asserting at the point that we insert the invalid operation
into the batch, but asserting upon submitting the batch is a useful
failsafe.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-29 23:00:15 +01:00
Chris Wilson cb4d789f98 sna: Disable the warning for a hung GPU is we manually set wedged
Only warn about a hung GPU if we encounter an EIO during operation, but
don't warn if we set wedged during initialisation based on unsupported
hw or user request.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-29 22:55:44 +01:00
Chris Wilson 0fd680ff52 Don't disable acceleration on 830/845g by default
Run the risk of a GPU hang (it shouldn't endanger the entire machine
normally) and let the user elect to disable it through

  Option "NoAccel" "true"

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-29 22:51:26 +01:00
Chris Wilson 3d45f0affe sna: Honour the Option "DRI"
References: https://bugs.freedesktop.org/show_bug.cgi?id=52624
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-28 18:21:08 +01:00
Chris Wilson fb385745a2 sna/gen4: Move the common vertex_offset==0 check into the flush()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-27 14:35:01 +01:00
Chris Wilson 73ddd8b0de sna/gen4: Further refinement to the GT allocation
Still hunting for why gen4 fails utterly.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-27 14:35:01 +01:00
Zhigang Gong 717823a9f7 uxa/dri (glamor): Use exchange buffer in glamor fixup.
The previous implementation is to create a new textured
pixmap based on the newly created pixmap's buffer object.

This is not efficient, as we already created it when we
call CreatePixmap. We can just exchange the underlying
texture/image buffers by calling intel_glamor_exchange_buffers().

And this commit seems also fix a weird rendering problem
when working with compiz/mutter.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-27 11:23:35 +01:00
Chris Wilson a8ee140624 2.20.2 release
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-27 09:07:16 +01:00
Chris Wilson bef73cd927 sna/dri: Select the engine before emitting the wait
So that if we have a flexible WAIT_FOR_EVENT that can go on either
pipeline, we can choose our preferred pipeline for DRI.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 21:56:31 +01:00
Chris Wilson 1ced4f1ddc Reduce maximum thread count for IVB GT1 to avoid spontaneous combustion
Somewhere along the way it seems that IVB GT1 was reduced to only allow
a maximum of 48 threads, as revealed in the lastest bspecs.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52473
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 17:42:47 +01:00
Chris Wilson 8f8f875911 sna/gen4: Tweak heuristics for render/blt usage
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 17:42:47 +01:00
Chris Wilson c9dd140161 sna/gen4: Bump thread counts
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 17:39:31 +01:00
Chris Wilson 7f3fdef98c sna/gen7: IVB requires a complete pipeline stall when changing blend modes
Similar to how SandyBridge behaves, I had hoped that with IvyBridge they
would have made the pipelined operation actually pipelined, but alas.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52473
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 15:43:15 +01:00
Chris Wilson 0938b3df8c sna/dri: Add an explanatory assertion
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 15:22:42 +01:00
Chris Wilson c621183466 sna/dri: Tidy fallback/normal CopyRegion
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 15:20:05 +01:00
Chris Wilson 52d2491a1b sna/video: Protect against attempting to use TexturedVideo whilst wedged
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 15:20:05 +01:00
Chris Wilson 8c0e3bbb0c sna: Force the damage on the DRI pixmap to be flushed to the GPU
Otherwise nothing will happen if we consider ourselves wedged.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 15:04:16 +01:00
Chris Wilson f50d7b03b5 sna: Only recommend not to create bo for a pixmap whilst wedged
This allows us to continue to map a GPU bo and operate inplace if we are
force to create a GPU bo for a compositor.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 15:04:16 +01:00
Chris Wilson 49403ddd1b sna/dri: Mark a flush required for any new DRI already on exec/dirty lists
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 15:04:16 +01:00
Chris Wilson efe3c8ff48 sna: Allow DRI to force allocation of a GPU bo and backing pixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 15:04:16 +01:00
Chris Wilson 2069384f9f sna/dri: Implement fallback handling for CopyRegion whilst wedged
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 15:04:16 +01:00
Paul Menzel b18143de47 NEWS: Correct release version: s/2.12.0/2.20.0/
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-07-26 12:15:59 +01:00
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