Fixes a missed configuration option from
commit 8a6a21bff8 [2.21.11]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Wed Jun 26 13:29:48 2013 +0100
sna: Use the existing configuration for initial modes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Even if the CRTC is inactive, we still need to initialise the gamma
tables.
Reported-and-tested-by: Timo Kamph <timo@kamph.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66563
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since we have a second place dependent upon the hidden ordering of the
output options, simplify by copying the complete enum block from
hw/xfree86/modes/xf86Crtc.c
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Marty Jack found that the enums for the user overrides were off by one
(his xorg conf was no longer being applied). This is because I had
missed the introduction of ZoomModes in 1.14.99 increasing all the
important enum values by one.
Reported-by: Marty Jack <marty19@comcast.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Specifying
Section "Device"
Option "ReprobeOutputs" "true"
EndSection
will restore the old behaviour of scanning each output on startup and
picking a spanning mode.
The behaviour was changed in
commit 8a6a21bff8 [2.21.11]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Wed Jun 26 13:29:48 2013 +0100
sna: Use the existing configuration for initial modes
Please do notify us of any circumstances that force you to use this
flag.
References: https://bugs.freedesktop.org/show_bug.cgi?id=66494
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The kernel bugs have long since been fixed and should have been
propagated to all stable kernels long ago. Now there should be no need
to workaround those bugs.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Only in the !fallback path will we try using the render pipeline after
the blt, in which case we can try using render rather than forcing a
stall. In the fallback path, we are going to incur stalls and readbacks,
anyway so ignore them when considering blt.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When copying into an a8 surface we need to replicate the result into the
green channel. It helps to tell the GPU from where to source the value
to be replicated.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We had the check in a couple of places, but missed a key one that
decided whether or not to perform a GTT mapping of a bo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We only want to preserve the plymouthd splash screen for flicker free
start up, a subsequent regeneration should be cleared instead.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Atter a modeset or KMS takeover, we do a quick readback of the kernel
state in order to verify that it matches our expectations. If we find
that a foreign framebuffer is attached, or no mode if set on the output,
we then turn off that connection and release any resources associated
with that pipe. This patch tries to reduce the number of superfluous
requests to turn off a connection.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
ModeSet is called after updating each CRTC, unlike crtc_notify which is
called after applying all changes. The last is what we need as if we are
called too early we detect that the next CRTC doesn't match our
expectations and so we disable it, right before applying the desired
mode.
References: https://bugs.freedesktop.org/show_bug.cgi?id=66494
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We cannot simply rely on connector->encoder->crtc status as with the
introduction of Haswell or SDVO we may have multiple connectors using the
same encoder. So we need to explictly check the connector status first,
before determining if the output is connected to an active encoder and
CRTC.
References: https://bugs.freedesktop.org/show_bug.cgi?id=66488
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Currently we leak the fd should we open the device node and decide that
is not a GEM/KMS kernel driver. The simplest way to perform the cleanup
upon failure is to move the checking for GEM/KMS into the device open
routine.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
I forgot how insane the data structure for the list of dirty boxes
attached to the damage is. It is neither a simple list, nor does not store
the count of boxes within each chunk.
Fixes regression from
commit 9026bb9546 [2.21.11]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Jun 28 15:59:17 2013 +0100
sna: Inspect the dirty boxes when querying whether damage contains a rectangle
A side effect is that we now make sure that there is an upper bound to
the amount of searching we do for the no-reduce fast path.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66430
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes regression from
commit 77fa8ab08b [2.21.11]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Jun 25 22:25:25 2013 +0100
sna: Free just-allocated bo if we fail to set-tiling on CREATE_EXACT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we unconditionally use it irrespective of whether we then call
accelerated code paths or not.
Fixes regression from
commit dc18eaa585 [2.20.10]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sun Aug 12 10:34:10 2012 +0100
sna: Make the failure to create render caches non-fatal
in the event we need to start with a hung GPU.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
A few new paths were missing the debug check, and clarify a few indirect
uses by performing the explicit check.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Search the few canonical locations for our hang state so that we can be
more explicit to the user about what to include.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We can improve our query for whether the rectangle of interest is within
the damage by checking whether the damage extents contains the entire
box rather than just checking for an overlap.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Use drmSetMaster/drmDropMaster instead of calling the ioctls
directly. Fixes compilation on OpenBSD where these ioctls
aren't defined.
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Avoid having to search the device tree once again in order to simply
recover the path we used to open the device.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
With the split into per-swizzle functions, and with the forced
optimisation levels, it appears that i386 doesn't suffer so badly and
the tiled memcpy are a viable method.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Always enable gcc to fully optimize the core memcpy routines (provided
that optimisations are not entirely disabled, for instance for
debugging).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The inplace routine assumed that the region to be read was already in
pixmap coordinates. Making it so makes the code easier, so do it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Rather than peppering the discard manually before the call to free the
GPU bo, always discard the COW when we actually free the GPU bo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Refactor the CPU mapping tests to a single function, and remember to
test for a pending GPU write (i.e. bo->exec).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This helps in the cases where we have subtracted a small number of
rectangles from an all-damage pixmap (such as a number of successive
GetImage, PutImage operations). The danger is that we end up searching a
long list of dirty boxes - maybe just search the first chunk if that
becomes noticeable?
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
With the advent of the more permissive mapping schemes and finer damage
tracking, we are more liable to have pixmaps mapped and so can reach the
upload path with the pixmap still mapped.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>