As we treat it as a name we should capitilize each word, but we forgot
that rule (sometimes!) for Broadwell.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
According to BSpec the max number of VS URB entries for CHV is 640.
Based on a patch by Ville Syrjälä.
v2: Start using a GT info block like earlier generations.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> [v1]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Use the correct register (Yn_01) with first half of the
Y samples instead of using the register (Yn_23) with the
second half twice when computing the green channel.
Also use the Yn_01 register name instead of Yn for the red
channel as well, just for a bit of extra consistency.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89807
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
If at first you don't succeed, try, try again.
The kernel API is lame and requires a new interface for something that
is designed to be supported through the old interface...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since creating/destroying the mmu_notifier for sync userptr is fairly
expensive, leak the test userptr object to keep it around for the
lifetime of our process.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Currently we add fake modes to cater for applications that want to
change the screen size but limit themselves to only those that are
available, and do not wish to either use RandR scaling or their own. For
widescreen panels, these 4:3 aspect ratio modes require panel fitting
and so are less than satisfory. Since we add fake modes, let's add a few
common widescreen modes as well (choosing the right aspect ration for
the panel).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37858
References: https://bugs.freedesktop.org/show_bug.cgi?id=29890
References: https://bugs.freedesktop.org/show_bug.cgi?id=89996
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Sometimes we want to render with the GPU when doing a mode switch, e.g.
if we need to initialise an output surface. To do so, we need to prepare
the acceleration layer first.
Lots of thanks to Vasily for tracking this one down.
Reported-by: Vasily Khoruzhick <anarsoul@gmail.com>
Bugzilla: https://bugs.archlinux.org/task/43534
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
An oversight when enabling efficient sharing of the shadow_crtc (i.e.
clients flipping to one monitor).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When using Xinerama, RandR is automatically disabled, and calling RR
routines will trigger an assert() because the RR keys/resources are
not set, leading to an Xserver abort.
Hotplug makes little sense without RandR, so no need to install a
udev monitor if RandR is not available, as done in sna.
v3: Rebase onto backwards compatible rrPrivKey detection [ickle]
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since dixPrivateKeyRegistered was only introduced in 1.10, we need an
alternative probe for older Xservers.
Suggested-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As the test presumes we can queue all the modulus queries within the
same vblank, we can improve matters by synchronizing to the next vblank
first.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We have to disable the "shadow idle; skipping" test if the CRTCs are
showing stale content following a sna_crtc_attach().
Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89904
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Make sure we clear the scanout even after the error paths before
attaching the shadow buffer (in case it is full of unwanted junk).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In cases of stress, we use a timer to create a fake vblank event and
then we adjust the timer when it fires to match it up with the CRTC msc.
However, sometimes we fire before the vblank but less than a millisecond
and so below the precision of the timer causing us to send notifies too
early. Use a blocking vblank wait to fixup these rare cases.
Testcase: present/notify/accuracy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Otherwise we may process a SIGIO moving the cursor away from the CRTC
causing us to remove the cursor and then process a stale pointer inside
the modeset after the signal is complete.
Reported-by: Chris Bainbrigde <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
During swapbuffers, the sw cursor tries to write to the old buffer.
Ordinary this is not an issue as we are discarding it, but under
TearFree that write causes us to instantiate the shadow buffer with a
possible recursion into set_bo and mayhem.
v2:
commit 226a58bc59
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sat Apr 4 20:58:24 2015 +0100
sna/dri2: Prevent the sw cursor from copyig to a buffer as we discard it
Tried to fix it by disabling SourceValidate. However, it a direct hook
into the Damage code by miSprite that triggers the copy. Since there
appears to be no way to intervene, we just mark that copy as internal
and ignore it.
Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
So we don't disable the hwcursor when we have a rotation set but not all
pipes activated.
Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
During swapbuffers, the sw cursor tries to write to the old buffer.
Ordinary this is not an issue as we are discarding it, but under
TearFree that write causes us to instantiate the shadow buffer with a
possible recursion into set_bo and mayhem.
Reported-by: Chris Bainbridge <chris.bainbridge@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=89903
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Suggested by Emil Velikov:
Normally hard coding pkg-config is considered a bad idea. Please
try PKG_CHECK_EXISTS - it would work like a charm when
cross-compiling.
Cheers
Emil
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We were not updating the window->crtc for the immediate swaps with the
result that after switching CRTCs, we were requesting a vblank on the
wrong pipe and triggering an error path (forcing the blit and negating
the elision).
Testcase: test/dri2-speed
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We expect mesa nowadays to preferentially use the render pipeline for
doing its clears and so want to avoid handing it back an active BLT bo
if we don't have semaphores (as that would cause a sync).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In order to make tools indivdiually selectable for compiling, we don't
want to override earlier tools - so use '+=' rather than a plain '='
when adding each tool to the set of PROGRAMS.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>