Slightly more funky would be to poke around in the CRTC, but that should
require master. As it stands this should help verify that what X is
supplying to the driver matches user expectations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we limit the swaps, then doing xrandr --output -off causes unity to
misrender. Not quite sure why, but the revert is easy.
Fixes regression from
commit 88e84320a3
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Feb 24 12:44:19 2015 +0000
sna/dri2: Flush triple buffer swap on [un]redirection
but we still keep the async-swap fixes.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89371#c14
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
RRSetChanged() is much more recent than RROutputChanged(), and
RROutptChanged() allows for more finer grained updates. Switch to
RROutputChanged for compilation with xorg-server-1.14 and older.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When we enable buffer-age and Clients start taking advantage of that by
only submitting trimmed flips (SwapBuffersWithDamage) we don't want to
then lose that by randomly injecting new buffers into the mix (thereby
forcing the client to repaint the entire buffer and us to damage all
outputs). As new buffers are relatively rare, especially in a
steady-state game scenario, spend a few cycles to initialise the new
buffer with the current back buffer contents.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In the future, I anticipate moving the application of damage into the
core dri2 (so that clients can specify the damage region for flips).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Don't error out if the kernel no longer supports pinning (despite it's
usefulness it has been removed) and hope that the kernel just works now
on 830gm/845g.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If multiple Clients intermix DRI2GetBuffers and DRI2GetBuffersWithFormat
we can end up with format mismatches. Rectify this by checking the
bitsPerPixel of the buffer instead.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Unwind the trivial tail recursion from the clip box bisection and add a
couple of assertions on the inlined fast-paths.
References: https://bugs.freedesktop.org/show_bug.cgi?id=89295
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This benefits most when GT3 is coupled with eLLC and WT, but it is just
marginally a win over a BLT otherwise.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
No new ids, just fixed descriptions.
Sync upto
kernel commit 0dc6f20b9803f09726bbb682649d35cda8ef5b5d
Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
Date: Wed Jan 21 11:46:32 2015 -0800
drm/i915/bdw: PCI IDs ending in 0xb are ULT.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Once again we fall foul of a foreign bo that between consecutive calls
to the busy ioctl may be used by another client. Relax the assertion
that on the status of the bo being retired and double check afterwards.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c101
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/uxa/intel_driver.c: In function 'I830HandleUEvents':
src/uxa/intel_driver.c:738:14: error: storage size of 's' isn't known
src/uxa/intel_driver.c:746:2: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When fixing up the sample projection of the trapezoids, we lost the
safety check that the trapezoid was valid.
Fixes regression from
commit bca08dc415 [2.99.917]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon Sep 29 19:30:03 2014 +0100
sna/trapezoids: Fix loss of precision through projection onto sample grid
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c95
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Turns out to be a false alarm as the machine I was looking at only had
4GiB. I thought I was looking at another one and started panicking about
where had all the memory gone...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In order to keep our sanity checks and buffers in order, we need to
remember to mark the new frontbuffer as the active scanout after an
asynchronous pageflip.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Internally we only use 32bits for limiting the maximum object size
(both for CPU and GPU allocations) so to prevent overflow limit the
reported aperture size.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/sna_driver.c: In function 'sna_handle_uevents':
src/sna/sna_driver.c:759:2: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration]
Also take the opportunity to include udev support in the configure
summary.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Missing trim of "add 0" from
commit 0b7a6666f8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon Jan 5 14:00:44 2015 +0000
sna: Partially unroll conversion of rectangles to boxes for fills
not all redundant +(dx,dy) were dropped.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Converting from
switch(value)
{
case 1: return 1;
...
default: return -1;
}
you must remember to insert the breaks!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As the output configuration rarely changes, and is normally accompanied
by a hotplug event, we can cache the last probe for a small number of
seconds. If a hotplug event does fire, in the worst case by the 30s
output polling thread, then we reset the cache and force the probe. This
should improve application (and desktop) startup times as they often
seem to do many full xrandr probes (rather than query current status).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Copying the bool is_level() without including stdbool.h causes it to not
compile on some machines. Just convert back to the old faithful Bool.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The criteria for adding the modes is not associated with panels and
edids, so the name is quite misleading. We add any missing default modes
if we have a panel fitter and the output itself has not declared them
(via its EDID).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
event_id is now an array - but the misprint was hidden on 64bit systems,
the warning only apparent because of the pointer mismatch on 32bit
systems.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We only want to prevent sharing of physical handles across CRTC (on old
kernels). If we already have one assigned to a CRTC we know that it is
unshared and can keep using it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Using xcb, we cannot simply call xcb_dri3_query_version() without it
terminating the connection if DRI3 is not enabled on the target display.
Oops.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89172
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Remember vblanks are private to a CRTC, the same MSC on another CRTC may
fire at completely different times...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Try to avoid more clflushing on the current Pixmap if we have a
scanout-ready bo in the cache. We also note that since we unflip before
any other drawing takes place, we do not need to mark the flipped Pixmap
as being pinned to the scanout.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we have multiple events for the same vblank, append the notification
to an existing vblank. This is particularly useful as we it ensures that
we then report notifications in the same order as queued.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
At times, we want to clear pending flips from inside TearFree, and thus
need to disable recursion. Currently we dance with shadow_damage, but
now we can just migrate over to using the shadow_enabled flag.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Modifying the flag may cause havoc if we need to modeset whilst Present
is in control as the CRTC will be setup without reference to TearFree, but
then when Present unflips, we restore the stale configuration. So let's
have a separate flag just to disable TearFree flips when a Present flip
chain is active.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Following on from the previous attempt is the realisation that we can
simply disable TearFree during a Present flip queue, and re-enable
TearFree upon unflip.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
These two don't mix, so remove the claim that we do support async flips
when TearFree is enabled.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The Damage layer is slow, so reduce the amount of work it has to do by
explicitly throwing away any information other than the bbox.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
For the duration of the Present flip chain, replace our frontbuffer with
the Client's Pixmap. Before any attempt to draw into the real
frontbuffer, Present will unflip back to the TearFree front+shadow.
However, it does give the Client direct access to the scanout through
their Pixmap (effectively disabling TearFree on behalf of the Client).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the intention was to filter the return values from the kernel, the
filtering would have been applied to the kernel values and not to the
incoming values from Present. This filtering introduces crazy integer
promotion and truncation bugs all because Present feeds garbage into its
vblank requests.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>