summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2013-11-08sna: Always schedule upload buffers for retirement after useChris Wilson
Even if they are multiply referenced due to cached references. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-07sna: Only assert that the bo is small enough to be mmappedChris Wilson
Not that is currently in a position to be mapped without eviction. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-07sna/gen7: Request secure batches for Haswell vsyncChris Wilson
Since commit 8ff8eb2b38dc705f5c86f524c1cd74a811a7b04c Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Sep 9 16:23:04 2013 +0100 sna/hsw: Scanline waits require both DERRMR and forcewake we have been emitting LRI to enable vsync on the render ring. This requires a privileged batch buffer, and whilst we were checking for kernel support, we forgot to actually tell the kernel to submit the batch with the right privileges. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71328 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Always copy from the tile sourceChris Wilson
The first step when tiling with an intermediatory is to copy from the source bo to the temporary. The alu should only be applied when copying from the temporary to the destination. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Remove erroneous assertion from sna_tiling_blt_compositeChris Wilson
We have to rely on the caller only calling us for a PictOpSrc equivalent operation as they don't all set op->op. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Add a DBG breadcrumb to kgem_bo_convert_to_gpu()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Use tiling BLT fallback for BLT composite operationsChris Wilson
This avoid a circuituous route through the render pathways and multiple levels of tiling fallbacks to accomplish the same copy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Trim create flags if tiled sizes are too largeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Fences are power-of-two sizesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Fixup unwind checks for future BLT commandsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Clear the execlist if we completely unwind a batch after using 8x8 tilingChris Wilson
Another location, but the right function this time! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Move initialisation of loop counter to common codeChris Wilson
It was only being defined in x86-64 and left unitialized for x86-32. Fixes regression from commit 587c4866652e40e1e228b333028114766a6d3b08 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Nov 4 15:10:40 2013 +0000 sna: Promote uint16_t to a full int to avoid overflow in computing w*h in memcpy_xor Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71286 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Clear the execlist if we completely unwind a batch after using 8x8 tilingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Be more pessimistic for tiling sizes on older genChris Wilson
On the older generation, we have severe alignment penalties for fenced regions which dramatically reduce the amount of space we can effectively use in a batch. To accommodate this, reduce the tiling step size. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Only operate inplace if no existing CPU damage for a readChris Wilson
With a large object, we try harder to operate inplace (to avoid creating a second large CPU bo). This introduced an issue where we tried to read from the GPU bo when there was already existing damage in the CPU - triggering an assertion. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Trim the overestimate of required aperture space for fence alignmentChris Wilson
We can optimistically only require that we waste the largest fence region in a batch, as all other fences will then be naturally aligned as well. So long as the kernel succeeds in defragmenting the aperture... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-06sna: Mark partial move_area_to_gpu with MOVE_READ on promotion to move_to_gpuChris Wilson
When promoting a partial move_area_to_gpu to a full move_to_gpu, we have to disable certain optimisations that we try to use if MOVE_READ==0. Reported-and-tested-by: Matti Hamalainen <ccr@tnsp.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71198 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-05sna: Submit execution on the bo before changing its caching statusChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-05sna: Clear snoop flag after converting from a CPU boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-05sna: Use an inplace exchange for large untiled BOChris Wilson
On older architectures, large BO have to be untiled and so we can reuse an existing CPU bo by adjusting its caching mode. References: https://bugs.freedesktop.org/show_bug.cgi?id=70924 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-05sna: Be move conservative with tiling sizes for older fenced genChris Wilson
The older generations have stricter requirements for alignment of fenced GPU surfaces, so accommodate this by reducing our estimate available space for the temporary tile. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-04testChris Wilson
2013-11-04sna: Check for loss of state after setting up a fill BLT opChris Wilson
If we install a BLT fill operation early in the drawing sequence (i.e. before calling a mi routine), we may lose our state to delayed initialisation of sources and so need to subsequently recheck. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-04sna: s/active/busy/ to silence compiler warningChris Wilson
kgem.c: In function 'kgem_check_bo': kgem.c:4768:7: warning: declaration of 'active' shadows a global declaration [-Wshadow] kgem.c:692:21: warning: shadowed declaration is here [-Wshadow] kgem.c: In function 'kgem_check_many_bo_fenced': kgem.c:4907:7: warning: declaration of 'active' shadows a global declaration [-Wshadow] kgem.c:692:21: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-04sna: Promote uint16_t to a full int to avoid overflow in computing w*h in ↵Chris Wilson
memcpy_xor Reported-by: Conley Moorhous <conleymoorhous@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70527 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-04sna: Apply the BLT source offset for individual copiesChris Wilson
Following a complex path through multiple layers of indirections and tiling fallbacks, resulted in hitting a path where the source offset was subsequently ignored. This leads to the operation reading from invalid memory (or hitting the assert warning about the same). References: https://bugs.freedesktop.org/show_bug.cgi?id=70924 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-04sna: Only use the simple stipple upload path if wholly containedChris Wilson
If the stipple box is outside of the stipple pixmap, we need to carefully upload the stipple using the modulus operation. Buzilla: https://bugs.launchpad.net/bugs/1247785 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-04sna: Update DBG formats for larger BO offset integersChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-04sna: Remove the replace indirection prior to performing write_boxesChris Wilson
As write_boxes itself decides whether or not to stage the upload into the destination bo, we can destroy the temporary allocation along the write_boxes fallback path (i.e. after failing to map the destination bo). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-04sna: Only destroy the old GPU after successfully replacing itChris Wilson
Along the sna_replace__xor path we destroyed the priv->gpu_bo twice upon successfully replacing it. References: https://bugs.freedesktop.org/show_bug.cgi?id=70527 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-04sna: Rename the two variants of pwrite so very relative dangers are obviousChris Wilson
Since we extend the write in the cache-aligned routine, it runs the risk of reading from beyond the end of the allocation. As such, callers should be carefully vetted to make sure that their allocations are already cache-aligned (typically page-aligned). To make it obvious that this complexity exists, rename the routine. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-04sna: Use the unoptimized pwrite for general buffersChris Wilson
When we call kgem_bo_write() we have less control over the allocation of the buffer, and do not ensure it meets the alignment criteria required for the cacheline optimisation. So use the simple pwrite routine to avoid reading beyond the end of the allocation. Reported-and-tested-by: Mark Kettenis <mark.kettenis@xs4all.nl> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-03sna: Use fast-path target placement if we are also IGNORE_CPUChris Wilson
If we are ignoring CPU damage, we also need only to check GPU damage when considering placement of the target bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-03sna: Wrap staging buffer access with sigtrap handlerChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-02sna: Discard bo->exec when unwinding a glyph no-opChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-02sna: Eliminate the redundancy between is_mappable/can_mapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-02sna: Jump to the right escape target when bypassing a self-copyChris Wilson
Another fix for commit e3f15cbf39696edae9f716bdcfbb7032ec7d7e3f [2.99.905] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Oct 22 15:19:15 2013 +0100 sna: Move gc back to GPU after failure to move it to CPU Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-02sna: Add some more asserts around inactive VMA listsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-02sna: Tweak estimate of maximum usable aperture for strict fencingChris Wilson
Old generations have very strict alignment requirements even for unfenced tiled accesses which restricts the amount of aperture space available for use, and in the process estimate for the effect of framebuffer fragmentation on the mappable aperture. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-02Prepare for changes in the BLT unit on future generationsChris Wilson
Adapt the legacy BLT commands in preparation for future changes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-02sna: Fallback when wedged and trying to use the BLT copy routinesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-01sna: Guard the replace-with-xor fallback pathChris Wilson
Before attempting to map the destination for uploading into after a failure to use the BLT, we need to recheck that it is indeed mappable. References: https://bugs.freedesktop.org/show_bug.cgi?id=70924 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-01sna: Process all clip boxes when rastering segmentsChris Wilson
The macro still had buried returns which were no longer valid after the translation to handle clipping. They needed to be breaks from the inner most loops to the outer clip box instead. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70802 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-01sna/gen7: Undo overzealous flushingChris Wilson
commit d580a30aaf97687f9669ea72fbc3310c2fea26f1 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Oct 31 15:58:47 2013 +0000 sna/gen7: Flush render cache when changing CC state ultimately doesn't prevent the issue and in the process adversely affects perforamnce. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-01sna: Scale uses of aperture_mappable by PAGE_SIZEChris Wilson
After converting aperture_mappable to count in pages, there were a few residual users expecting a byte count. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71117 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-31sna/gen7: Flush render cache when changing CC stateChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=68410 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-31sna/gen6: Tweak flush around CC state changesChris Wilson
In order to fix some font corruption, it appears that we need an extra flush in the Sandybridge pipeline when we change the CC stage and the render cache is dirty. We previously triggered a full pipeline stall for this case. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-31sna: Tweak deletion of used buffersChris Wilson
Make sure we never unwind a used buffer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-30sna: Allow limited recursion within sigtrapped routinesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-30Revert "sna: Detect and handle mi recursion"Chris Wilson
This reverts commit c6b0e3fe0c299488932ba0392847f1faf298d079.