Probe for i830_dri.so and, if it exists, use that driver in preference
to i915_dri.so for DRI (i.e. GL clients). This was suggested in the
context of distributions supplying i915g as the main DRI driver for
gen3, in which case we need to provide a separate DRI driver for gen2.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we try to release the framebuffers whilst not DRM_MASTER, the
operation will fail and we will leak the buffers. So do not bother
during the normal expiration to clean the scanout cache if vt switched
away.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
sna_video_hwmc.c: In function 'create_context':
sna_video_hwmc.c:95: warning: assignment from incompatible pointer type
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
There is a workaround that says the first RENDER command following use of
the BLT should be a non-pipelined command. To be safe, emit a MI_FLUSH
before setting up the invariants.
Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1168066
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
One particular buffer type is quite cunning and simultaneously sets both
CPU/GPU as all damaged (the upload buffer) so be aware when making bold
assertions.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Each of the overlay, sprite and textured video can support XvMC
passthrough, so we need to setup an XvMC adaptor for each of our Xv
adaptors.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Whilst we are not DRM master, not only is another server in control of
the outputs and responding to the udev event, we ourselves cannot
change modes and just cause contention upon the DRM device. Instead
inform userspace of the change as soon as we are DRM master again and
back in control.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The passthrough is actually a generic, albeit private, mechanism that
anything can use to pass along a GEM handle for use with Xv.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The condition that we have a mapped GPU bo iff priv->cpu is only true if
we have a GPU bo at the time of using the CPU -- if we create the GPU bo
during move_to_gpu, then that assertion is bogus.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Irrespective of the DDX debug settings, some people wish to run Xorg
under valgrind and so prefer to have the cleaner output by making the
DDX valgrind aware.
(Actually Maarten wants valgrind support enabled by default...)
Suggested-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since we started discarding the flush flags on cached bo (in order to
prevent DRI flush states leaking), we failed to preserve the flush flag
for large bo (which uses it to keep batches trim and other hints).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
My overzealous reading of the bspec lead me to the conclusion that the
MI_LOAD_SCANLINES command was only available on the blitter ring. This
is false, thankfully, and allows us to do vsync'ed Xv.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
According to the opengl glx_sync_control spec, the Unadjusted System Time
(or UST) is a 64-bit monotonically increasing counter that is available
throughout the system:
http://www.opengl.org/registry/specs/OML/glx_sync_control.txt
Therefore, sending 0, even in this corner case, is out of spec. However,
we cannot just return FALSE here as that triggers a BadDrawable error to
be sent, and as is often the case mishandled, to the client. This results
in a certain compositor terminating, for example.
As an alternative we can use the monotonic system timestamp which in
theory should also be monotonic with the previous and subsequent vblank
times.
Based on a patch by Daniel Kurtz.
Reported-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When we are replacing a bo with fresh data, we can drop pending
operations to it and thereby reduce the complexity of the replacement.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The two similar chipsets do not use the same PCI-ID encoding schema.
Fixes regression from
commit 235a3981ea
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Mar 26 20:37:14 2013 +0000
sna/gen7: Use GT2 values for GT2 variants
Reported-by: zaverel@free.fr
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we often first clear the destination before performing a blend, we
get a performance boost if that first write populates the render cache.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The memory attributes changed slightly, and in particular there is now
an explicit uncached setting - which of course happened to be the value
currently selected.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The check was only testing for GT2+ and excluding the normal GT2
devices. See also
commit ce9f044836
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Feb 8 16:01:54 2013 +0000
sna/gen6: Use GT2 settings for both GT2 and GT2+
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The sysinfo function is Linux-specific. sysconf(_SC_PHYS_PAGES), while
not truly portable, is available on many more systems, including Linux,
Solaris, NetBSD, FreeBSD and OpenBSD. So use that instead. Verified
that this results in the same value as the sysinfo call on a handful of
Linux systems.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
If the OS has not initialised support for the extended instructions,
then their use may result in general protection faults.
Based on code by Thiago Macieira.
Reported-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
It requires use of the cpuid feature eax=7:ecx=0, so it requires the
extended version of __cpuid to pass in the subfeature.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Be neat and tidy in case we are shutdown but the server is not
regenerated (e.g. a hot-unplug).
Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If asked to perform pixelformat conversion of a sample that resides
outside the valid area, we can simply substitute CLEAR.
Bugzila: http://bugs.freedesktop.org/show_bug.cgi?id=62681
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>