summaryrefslogtreecommitdiff
path: root/src/sna
AgeCommit message (Collapse)Author
2011-07-26sna: Revert enabling scan-line wait on SNBChris Wilson
Hanging the machine does indeed prevent video tearing. Just not quite what the user expected... Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39497 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-20sna: Enable gen6 scan-line waitingChris Wilson
The code was ready and waiting, just forgot to turn it on. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-13sna: Fast-path single span boxesChris Wilson
These are very common when compositing unclipped trapezoids, and the majority of the overhead is in handling the arbitrary number of boxes and misses out on the constant folding the compiler can do if it is known we have just one box. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-13sna/damage: Avoid testing against a completey damaged regionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-13sna/gen3: Tune emit_spans_primitive_constantChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-13sna/glyphs: Discard GLYPH_PICTURE hint if the glyph doesn't fit into the cacheChris Wilson
If the glyph is too big to fit into the cache, than ideally we do want to keep an associated GPU bo around for future use. As it is too large to fit into the cache, it of reasonable size and there is little wastage in allocating indiviual GPU bo for each oversized glyph. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-13sna: Add some extra debugging to the texture upload fallback pathsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-13sna/dri: Fix a couple of typosChris Wilson
Somehow these were lost in the rebasing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-13sna/dri: Remove the unused id/type members for Resource trackingChris Wilson
...and reduce it to a simple list. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-12dri: Always initialise resource members of DRI2FrameEventChris Wilson
As we now attempt to always decouple the lists upon freeing the frame event, we need to initialise them along all code paths. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-11sna/dri: Add some simple debuggingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-11sna/dri: Refactor common code for assigning a pixmap to the DRI2 bufferChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-11dri: Prevent abuse of the Resource databaseChris Wilson
The Resource database is only designed to store a single value for a particular type associated with an XID. Due to the asynchronous nature of the vblank/flip requests, we would often associate multiple frame events with a particular drawable/client. Upon freeing the resource, we would not necessarily decouple the right value, leaving a stale pointer behind. Later when the client disappeared, we would write through that stale pointer upsetting valgrind and causing memory corruption. MDK. Instead, we need to implement an extra layer for tracking multiple frames within a single Resource. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37700 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-09sna: Clamp results for computing BoxRec coords from xRectangleChris Wilson
As the width/height in the rectangle is specified as uint16_t, the result may be larger than is storagable in the int16_t of the box. Of course it would take a really inane client to do attempt to draw something much larger than the largest possible surface... Is it strange that first example I've found to do so is a Java application? Reported-by: Nicolas Kalkhof <nkalkhof@web.de> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-09sna/accel: Fix fallback for depth=1 copyChris Wilson
A little carelessness with passing down the offsets caused us to incorrectly copy depth=1 bitmaps, as exemplified by gkrellm. Reported-by: Nicolas Kalkhof <nkalkhof@web.de> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-08sna: A buffer only needs a flush if it remains dirty at the end of the batchChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-08sna/gen3: So we also need to ensure stippling is cleared...Chris Wilson
My theory that we used nothing that invoked polygon stippling proved baseless. Fixes regression from 3b5971bd2359383cb8326702d80e03bc15d34c69 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-08sna/gen3: Restore disabling the use of stencil/fog in the invariantChris Wilson
One cleanup too far causing spurious results after rebooting. We also need to ensure that the writemask is fully enabled (ie not disabled) as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-08sna/dri: Enable chaining of page-flipsChris Wilson
Trade off extra frames of latency for extra frames of anti-jitter buffering and loss of completion information; compiz users rejoice. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-07sna/dri: Remove redundant NULL check in referenceChris Wilson
The buffer has already been dereferenced by this point... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-07sna: Take advantage of the needs_flush tracking on the front bufferChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-06sna: Check against an execbuffer reference before discarding partialsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-06sna: Compute aligned tiled heights for gen2 correctlyChris Wilson
We were underestimating the height of X-tiled surfaces (and less harmfully overestimating the height of Y-tiled surfaces.) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-05sna: Reset unused partial buffersChris Wilson
Whilst searching for available space on the active partial buffer list, if we discover an unreferenced one, reset its used counter to zero. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-05sna: Discard unused partial buffersChris Wilson
If we allocate a partial buffer and then fallback for the operation, the buffer would remain on the partial list waiting for another user. Discard any unused partials at the next batch submission or expiration point. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-05sna/gen2: Restore invariant ENABLESChris Wilson
One deletion too many, unnoticed until the next reboot. Besides the failure to disable logic op and enable colour buffer blending which causes a hang if you subsequently try to enable both, you also need to request texture caching... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-05sna/gen[23]: Do as the comments suggest and prefer the BLTChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-05sna: Reduce tiling if pitch is less than a tile_width/height only on pre-G33Chris Wilson
(Note this only applies to 2D pixmaps.) The rationale, borne out by experimentation with cairo-perf-trace, is that on the pre-G33 devices we always need a fence region region for tiled surfaces, i.e. at least .5/1MiB in size, and that combined with the smaller GTT on those devices, we loose the benefit of tiling to the excessive GTT thrashing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-05sna: Remove unused aperture_size memberChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-04sna: Clamp object size to the min of 1/4 of the whole GTT or 1/2 the mappableChris Wilson
... for those pesky early devices whose GTT was no larger than the AGP aperture. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-04sna: Update flush/retirement lists after a implicit flush for mmapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-04sna: Enable relaxed-fencing for gen2 devicesChris Wilson
(Just as dependent upon non-buggy kernels as gen3...) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-04sna: Fix gen2 tiled surface sizesChris Wilson
Actually use the gen2 path for gen2 devices! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-04sna/gen2: fix batch buffer acountingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-04sna: Manually set to the GTT domain for mmapChris Wilson
...since the kernel no longer does strict coherency. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-04sna: Trim number of downsample passesChris Wilson
If we can fit the entire width or the entire height into the pipeline when downsampling, do so. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-04sna: Don't change tiling modes on replaceChris Wilson
This was trying to workaround a kernel bug, and instead causes a performance cliff for textures that *need* to be tiled. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-04sna: Force tiled modes for large pitchesChris Wilson
If the surface is so big that the 2x2 texel sampling will cause a TLB miss everytime, i.e. the row pitch exceeeds 4096, then we need to encourage tiling to prevent attrocious performance. For example, try downscaling a 2560x1600 background image on a gen3 device using I915_TILING_NONE... Using slideshow-demo /usr/share/backgrounds/cosmos/whirlpool.jpg, on a PineView netbook, fps goes from under 4 to over 40. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-04sna: Finer-grained debugging for trapezoidsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-02sna/video: Downgrade severity of "overlay not found" messageChris Wilson
We don't need to warn the user that their hardware does not support the video overlay plane (but Jesse is working on it!), but merely inform them that its presence is lacking. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-02sna/gen2: Add missing stub debug filesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-01sna/gen2: Recompute blend pipeline for component-alpha passChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-01sna/gen2: Pack solid sources into the default diffuse componentChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-01sna/gen2: Remove unused state from invariant setupChris Wilson
... and also some state that gets clobbered when we install the composite pipelines. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-01sna: Downsample sources 2x too large to fit in the 3D pipelineChris Wilson
This is quite trivial to hit given the 2k limits on gen2/gen3. We compromise on image quality by pre-downscaling the source by a fixed factor to make it fit into the pipeline in preference to performing the entire operation on the CPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-01sna/gen2: Use specular component for solid spansChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-01sna/gen2: Add missing render fallbacks for blt opsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-01sna/gen2: Implement composite-spansChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-06-30sna: Mappable aperture is region 0 on gen2Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-06-30sna: Distinguish 830/845 vs 855/865 using the generation idChris Wilson
Remove the PCI ID device checks by using the simpler check on the generation id for errata pertaining to 830/845. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>