summaryrefslogtreecommitdiff
path: root/src/sna/kgem.c
AgeCommit message (Collapse)Author
2014-07-17sna: Add missing DBG parametersChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30sna: Tweak preference for small GPU boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29sna: Prefer linear if below tile_widthChris Wilson
Be stricter in order to allow greater use of CPU bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29sna: Tidy calling memcpy_from_tiledChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27sna: Only reuse pinned batches for 830/845Chris Wilson
Trying to fly too close to the sun. :( Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80558 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-27sna: Tidy selection of a near-miss active buffer.Chris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=80560 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-26sna: Fix userptr defines to match i915_drm.hChris Wilson
Now that we are starting to see userptr in the headers, we see that the definitions slightly changed. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25sna: Improve throttling during bo allocationChris Wilson
By controlling how long we may block during buffer allocation, we can relax the throttle elsewhere to prevent render lag buildup. References: https://bugs.freedesktop.org/show_bug.cgi?id=77436 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25sna: Only mark throttle as done after successChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=77436 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25sna: Track desired flushes better after starting a new batchChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25sna: Tweak scanout flushChris Wilson
We now distinguish gpu_dirty whilst the bo is not flushed within a batch and needs_flush for when it is dirty and still busy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25sna: And fix the typo...Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25sna: Disable userptr for bdwChris Wilson
Something fishy is afoot. But let's kill this particularly worrisome regression so that we can do a full round of testing. References: https://bugs.freedesktop.org/show_bug.cgi?id=79053 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23sna: Fix flushing empty batchesChris Wilson
A logic inversion in commit 1909910fdf89216d18703e50728f4604f75d5d66 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Jun 22 20:19:22 2014 +0100 sna: Inject a batch flush before adding a fresh bo also applied the injection to when the batch was empty. Reported-by: Jiri Slaby <jirislaby@gmail.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c48 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23sna: Do not set CAN_CREATE_GPU flag for untiled allocationsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23sna: Inject a batch flush before adding a fresh boChris Wilson
Fresh bo (those without a reservation already defined, ala presumed_offset) will cause the kernel to do a full relocation pass. So, if possible flush the already correct batch in the hope of trimming the amount of checking the kernel has to perform on this new batch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-20sna: Color patterns for BLT are required to be aligned to 256 byte boundariesChris Wilson
This so far appears to be the most restrictive alignment required, so simply increase the upload alignment to 256 bytes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80033 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-18sna: Assert that we do not try to mmap a proxyChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-18sna: Add DBG option to disable snoop bo cacheingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-16sna: Regularly check the cache level on boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-16sna: Promote better active buffer reuseChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-16sna: Fix some batch DBGChris Wilson
Helps to check for a successful read when we want to show the batch after execution. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-16sna: Add more DBG to track transitions between CRTC and its shadow or flip boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13sna: Track the pageflip bo's busynessChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11sna: Fix scanout creation routine for old kernels <= 3.11Chris Wilson
With an old kernel, we would fail to actually mark the display as part of the scanout domain, but proceed to assign it a fb id. This caused our asserts to report our bookkeeping error. Reported-by: Pavel Ondračka <pavel.ondracka@email.cz> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79909 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-10sna: Expand debugging to cover gen8 BLT variationsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-09sna/dri2: Allow TearFree flipping to individual CRTCChris Wilson
Baby step. We first take advantage of TearFree to allow us to redirect a single CRTC to the DRI2 frontbuffer and so allow a fullscreen game covering a single monitor to avoid expensive blits when running in a multi-monitor setup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-06sna: Fix no relaxed delta path for gen4+Chris Wilson
This is for debug purposes only. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-06sna: Auto-retire upload proxiesChris Wilson
This was disabled in commit 9f4f855ba37966fb91d31e9081d03cf72affb154 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon May 26 07:06:18 2014 +0100 sna: Implicit release of upload buffers considered bad as retiring the buffers during the command setup could free one of the earlier bo used in the command. But discarding the snooped bo could still be advantageous. So restore the automatic discard of upload proxies, but make sure we only do between operations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matti Hämäläinen <ccr@tnsp.org>
2014-06-05sna/dri2: Enable immediate buffer exchangesChris Wilson
The primary benefit of this is avoid the extra blit when using a compositor and instead propagate the compositor flip on the frontbuffer to the scanout, or equivalently allows a fullscreen game to flip onto the scanout without intervention by TearFree. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-03sna: Allow replacements to cancel operations between both bo under a PixmapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-02sna: Add support for DRI3Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-02sna: Relax tiling height restrictionsChris Wilson
Only force the even-tile-row alignment if we have an old GPU with an old kernel that doesn't perform conservative alignment for us (as required). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-02sna: Silence a DBG compiler warningChris Wilson
kgem.c: In function '_kgem_submit': kgem.c:3243:12: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result] write(fd, kgem->batch, batch_end*sizeof(uint32_t)); Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-30sna: Reuse the first scanout boChris Wilson
The path of last resort is meant to reuse the first scanout bo if they all busy (since it will be the oldest). It chased a dangling pointer instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-30sna: Do not allow imported buffers to be cachedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-30sna: Mark all caches for expirationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-30sna: Unexport kgem_get_unique_id()Chris Wilson
This should always be set during bo creation Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-28Silence CLang (almost)Chris Wilson
Fix up all the warnings about implicit enum conversions. The container_of() macro remains defunct. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-26sna: Implicit release of upload buffers considered badChris Wilson
Currently upload buffers are automatically decoupled when the buffer is retired. As retiring can happen during command setup after we have selected which bo to render with, this can free the bo we plan to use. Which is bad. Instead of making the release of upload buffers automatic, we manually check whether the buffer is idle before use as a source to consider scrapping it and replacing it with a real GPU bo. This is likely to keep upload buffers alive for longer (limiting reuse between Pixmaps but making reuse of the buffer within a Pixmap more likely) which is both good and bad. (Good - may improve the content cache, bad - may increase the amount of memory used by upload buffers for arbitrary long periods.) Reported-by: Matti Hämäläinen <ccr@tnsp.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79238 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-26sna: Assert that we do not replace active IO buffersChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=79238 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-20sna: Only mark the scanout as being busy for writes (not solitary reads)Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-16sna: Userptr lands upstream, enable.Chris Wilson
No longer an optional feature of an experimental kernel! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-16sna: Handle driver failures more gracefullyChris Wilson
Avoid busy-spinning waiting for the cache to expire after a failure. Try to free up any overdue expiration, then if we still fail, we free the entire cache. Currently, it would spin over the expiration until all items were overdue and then freed. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-14sna: Add some DBG to track rogue requestsChris Wilson
In particular allow the pointer cache to be disabled for valgrind. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-14sna: Avoid promoting SHM Pixmaps for DRIChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-13sna: Check for PRIME scanoutsChris Wilson
Query the cache level on imported dma-bufs to see if they need special handling. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-28sna: Rearrange final aperture checkChris Wilson
If we cross the high water mark, first flush the batch, then check the remaining pages to see if they fit into the aperture. Reported-by: Bruno Prémont Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-28sna: Refine fence packing estimatesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-24sna: Be more selective of reusing bo for inplace uploads on !LLCChris Wilson
On older architectures, we can only do the inplace upload into a GPU bo into a new unused bo (that is still in the GPU domain). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>