Age | Commit message (Collapse) | Author |
|
Now that we register a callback with an external stack and not the
screen, we have to remove it when the screen is destroyed.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
ABI 22 brings in a new BlockHandler/WakeupHandler interface
(SetNotifyFd) and throws out the current interface (albeit without
delivering any improvements).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since mesa requires __DRI2_FLUSH version 4 for its DRI3 support and
mesa/i915 only provides version 3, libGL fails to load (not even falling
back to DRI2). Workaround this by not enabling DRI3.
References: https://bugs.freedesktop.org/show_bug.cgi?id=96783
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We give up on TearFree if we ever see an error whilst page flipping (in
the hope that we can keep displaying via direct use of the scanout).
With the advent of MST, this can happen simply by the user unplugging a
dock causing connectors to disappear and if we flip before we see the
uevent telling us which outputs are disabled, we get an error.
So, lets try and re-enable TearFree on the next opportunity, when all
the outputs are off and we can rebuild the shadow buffer.
Reported-by: Martin Jørgensen <mkj@gotu.dk>
References: https://bugs.freedesktop.org/show_bug.cgi?id=96180
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The preferred solution when direct rendering is too costly is to render
into the backbuffer and flip. However, if the user insists, we need to
tell the kernel when to flush the scanout due to direct rendering.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Sometimes the kernel may leave other planes enabled on our VT. So, just
as we validate that the CRTC state is as we expect when we take over the
VT, make sure all secondary planes on the CRTCs are also disabled.
Note to self: Xv needs to restore its planes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Continuing the udevless saga where we query for topology changes on
calls to RRGetInfo() and so where we cannot call RRGetInfo() ourselves
on discovering the changes (to facilitate hotplug). The next step is
explicitly prevent the recursive call.
References: https://bugs.freedesktop.org/show_bug.cgi?id=91929#c10
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When performing RRGetInfo() we drain any pending uevents before checking
the CRTC/connector statuses. However, some versions of libudev do a
blocking read and so when we call RRGetInfo() from a Timer callback
(outside of the usual sigtimer interrupts) that blocking read lasts
indefinitely.
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When we release the accel backend, we mark the interface as wedged.
However, when we release the modesetting backend we flush the vblank
queue which may want to do rendering. So if we do that first then
disable the accel backend, things we go much smoother.
References: https://bugs.freedesktop.org/show_bug.cgi?id=91658#c20
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>
|
|
References: https://bugs.freedesktop.org/show_bug.cgi?id=91467#c12
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since sna_set_desired_mode() always returns true, we can make it void
and remove some unreachable code.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
With a MST topology change, we can find outputs may disappear. We offered
a choice as to whether to simply disable them or completely remove them
from the listing of available outputs. However, clients never expected
that their operation on any output could trigger a BadID XError (or that
there is anyway to prevent race conditions). As such an option was made to
disable by default, but allow testing complete removal. Now the RandR
protocol has been clarified such that XID assigned to outputs are now
permanent, as such the option breaks the spec, so drop it.
See randrproto commit 895ee5264524c7c239ee4ef5e39c4e295323fb51
Author: Dave Airlie <airlied@redhat.com>
Date: Wed Apr 22 10:58:18 2015 +1000
randrproto: clarify output XID lifetimes.
This just makes a note that randr won't make outputs disappear
dynamically.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In the normal command processing stream, we will have lots of
opportunity to ask whether we should be batching requests together. If
we wakeup without doing any work, then we will check inside the block
handler whether the GPU is idle and flush then.
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>
|
|
Rather than imposing a maximum DRI level at compile time by compiling
out unwanted protocol handlers, default to limiting it at runtime so
that we can switch between any level.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Allow Option "DRI" "[23]" to also work with UXA.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
References: https://bugs.freedesktop.org/show_bug.cgi?id=88794
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In case the version numbering is disabled, like on Arch, include it
anyway in the full debug log.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Required for our internal bookkeeping of DPMS events.
Reported-by: Jiri Slaby <jirislaby:gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c79
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
When disabling outputs with DPMS, make sure we update front_active for
consistency.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Fixes build with slightly older X servers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Missed the git-add before pushing. :|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Having a reminder/alert when the debug tracing is enabled I find useful.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Admittedly ScrnInfoPtr->pScreen has nearly always existed, but for
completeness wrap it up in a compat macro.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
It looks out of place starting with a lower case letter when the
surrounding messages are sentence captilized.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
xf86DisableUnusedFunctions() uses crtc->dpms(off) to disable unused
pipes. In this case, we do want to explicitly disable the CRTC to
release any shared state (e.g. PLLs and encoders). However, the user can
also request for the DPMS to be disabled, either via the DPMS extension
or the ScreenSaver. Here, we don't want to full disable the pipe as that
incurs extra latency (and risk of failure) when switching the display
back on. In order to distinguish the two cases, we can hook into the
user paths and skip disabling the CRTCs.
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If Xinerama is enabled, than RandR12 will be silently disabled. Be
careful not to dereference the rrScrPiv when it doesn't exist.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87207
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In ZaphodHeads, we may reuse the same select read flags and attempt to
read from a blocking drm fd multiple times. However, if we clear the
read flags after first exhausting the fd, we shouldn't then block on
subsequent heads.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The mappable aperture size is stored as a page count, videoRam expects
size in KiB.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Rather than repeat our derivation of how much RAM we can map, just reuse
the already determined value.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As libudev only pulls off events one by one and we may need to process
several for a MST topology change, keep polling until complete.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Beware the barbarians at the gate, who invade and steal your ScrnInfoPtr
and its Entity from underneath you. In some configurations, we lose
access to the struct intel_device stored on the Entity after
initialisation, causing havoc. Workaround this by storing the
intel_device that we open in our driverPrivate.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If the ddx is configured without udev support, we do not receive
notifications when the MST topology is changed. This leads us to query
the kernel for bad connectors, and so we end up reporting an unknown
connection status for them, which the user and client often find
confusing. However, we can not simply act upon the detection failure as
we are too deep inside the callback chain and cannot change the arrays of
known connectors whilst iterating over them. A neat compromise is to
hook into the rrGetInfo call chain and poll for MST changes before we
report back the current configuration.
References: https://bugs.freedesktop.org/show_bug.cgi?id=84718
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In the early move-to-gpu in ScreenCreateResources we purposefully ignore
any errors from the move-to-gpu as they will be fixed up later when we
try to bind to the CRTCs. Mark it as ignored for future readers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Before we attach the Screen Pixmap to the scanout, we will have to
create a GPU bo and apply any fixups as required. Therefore failing to
pre-emptively move it during ScreenCreateResource is not fatal and the
failure can be simply ignored.
Suggested-by: Egbert Eich <eich@freedesktop.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The intention is to be able to capture the assertion in the Xorg.0.log
(journald equivalent). At the moment, it is emitted to stderr which is
difficult to capture and defeats the goal of only asking the reporter to
upload one log file.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Under the new world order, we may not have KMS rights until we are given
a VT.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
ADDFB fails with a headless config (as any fb size is invalid).
Fortunately, with headless we can use any depth we like.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1354424
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If the user specifies the Option "Primary" for a monitor, we need to set
it as the RandR primary output.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82193
|
|
As root, X gets away with many things, including submitting commands to
the DRM device whilst it is no longer authorised (i.e. when it has
relinquished master to another client across a VT switch). In the
non-root future, if we attempt to use the device whilst unauthorized the
rendering will be lost and we will mark the device as unusable. So flush
our render queue to the device around a VT switch.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|