When the client misses a swap, we consider it idle and unlikely to swap
again for a while. We try to take advantage of that and remove the old
back buffers. But it is likely to swap again and so having some of that
cache around would be advantageous.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Rather than just discarding the old buffer, we want to add it to the swap
cache and so hand it back to the client in the near future.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Based on further study of behaviour under a compositing manager, always
prefer to upload directly into the flushed bo, with a couple of
exceptions.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the batch is being frequently flushed due to Damage+Composite
tracking, we cannot amalgamate the small copies into the destination and
so end up sending thousands and thousands of tiny batches with tiny
render copies hogging the GPU.
References: https://bugs.freedesktop.org/show_bug.cgi?id=91577
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since the switch to preallocating the batch buffer, the request owns its
reference to the rq->bo. However, dropping that reference was missed
during the cleanup.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
An unwanted subtle change in preference from
commit 8c465d0fbf
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Aug 7 10:15:42 2015 +0100
sna: Fallback after a bo allocation failure for the batch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we fail to allocate the next bo to use for the next_request, we can
just fallback to the delayed allocation used by !llc.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91577
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Whilst we currently do not try and submit a failed batch buffer
allocation, we still treat it as a valid request. This explodes much
later when we inspect the NULL rq->bo.
References: https://bugs.freedesktop.org/show_bug.cgi?id=91577
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the pageflip following the CRTC fixup fails, we can be left with the
flip-to bo being left as the CRTC scanout. If that is so, reset the
desired mode (and original scanout bo).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Different OS name the i915 KMS module differently, so make it convenient
for us to be able to feed in the right name, or even just try them all
and pick the first one that exists!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Broadwell expanded all the relocations and we needed to adjust our
command construction to match. I missed offsetting the XY_SRC_COPY_IMM
used for XCopyPlane resulting in garbage for small copies on Broadwell.
Reported-by: Omar Sandoval
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91499
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Read all available HOTPLUG uevents and batch them into a single topology
probe. Like waiting for a bus, when one hotplug uevent arrives expect a
few more.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
check_pixmap() can be called very early in the Window setup proceeding,
before a pixmap is even assigned to a Window. There we expect the Window
to be NULL, so be more careful in our check_pixmap.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91467#c16
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When juggling Present and TearFree, we have to hide the extra flips from
Present as it cannot account for them. Preferrably we want to schedule
the Present flip following completion of the TearFree flip, but for the
moment simply block and wait until TearFree completes before starting
Present.
Reported-by: Andreas Reis <andreas.reis@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91467
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Still need to improve the handling of set_gpu_tiling() to mark up the
unfenceable buffers better, but we can't more the asserts here as we
don't have the kgem struct available.
Fixes 2f1623daed94b98d3bae3c9ee8346e8de9afc33d with asserts enabled
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since the kernel now differentiates whether the buffer is busy for
read/write, we can use that knowledge to better set our own
bo->needs_flush flag only when there are outstanding writes to the
buffer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We use the fence as a backchannel to commuicated the tiling mode to the
DRI2 client, so in such cases we cannot tolerate a failure to set the
tiling mode.
References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c114
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
I chopped off one too many characters when creating the path in the
presence of a colon-delimited list.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we are doing synchronous but immediate swaps, we may notice that we
have a vblank placeholder from the last swap. If so, we can replace it
with the swap we need to perform on the next vblank.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As a slightly more convenient approach than loading the EDID on the
kernel command line, allow the user to specify the EDID path in the
Device section of xorg.conf, e.g.
Section "Device"
Identifier "igfx"
Option "CustomEDID" "DP1:/path/to/dp1.edid,DP2:/path/to/dp2.edid"
EndSection
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89945