This provides for using the existing DDX with future DRI drivers which
may break from the traditional names - but only with the help of the
user/packager. This scheme needs to be replaced with a robust mechanism
for driver loading if AIGLX and co are to be kept.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Note that this is worsened, but not caused, by:
commit e1a63de899
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Nov 2 09:10:32 2012 +0000
sna/gen4+: Prefer GPU spans if the destination is active
References: https://bugs.freedesktop.org/show_bug.cgi?id=55500
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we reuse the input parameter 'box' to hold the array of boxes that
need to be migrated, we need to be careful that we do not later confuse
it with the original input parameter. Otherwise,
==1315== Invalid read of size 2
==1315== at 0x928B091: box_inplace (sna.h:506)
==1315== by 0x9292278: sna_pixmap_move_area_to_gpu (sna_accel.c:2554)
==1315== by 0x9292C14: sna_drawable_use_bo (sna_accel.c:2774)
==1315== by 0x9356C01: gen7_composite_set_target (gen7_render.c:2448)
==1315== by 0x9357AA2: gen7_render_composite (gen7_render.c:2800)
==1315== by 0x92DB12E: glyphs_to_dst (sna_glyphs.c:552)
==1315== by 0x92DEA8D: sna_glyphs (sna_glyphs.c:1664)
==1315== by 0x4F920E: damageGlyphs (in /tmp/Xorg)
==1315== by 0x4F2FF6: ProcRenderCompositeGlyphs (in /tmp/Xorg)
==1315== by 0x437260: Dispatch (in /tmp/Xorg)
==1315== by 0x426466: main (in /tmp/Xorg)
==1315== Address 0xd637054 is 20 bytes inside a block of size 208,464 free'd
==1315== at 0x4C2A2FC: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==1315== by 0x92CCFCD: __sna_damage_destroy (sna_damage.c:1469)
==1315== by 0x928AD74: sna_damage_destroy (sna_damage.h:284)
==1315== by 0x9291CB2: sna_pixmap_move_area_to_gpu (sna_accel.c:2470)
==1315== by 0x9292C14: sna_drawable_use_bo (sna_accel.c:2774)
==1315== by 0x9356C01: gen7_composite_set_target (gen7_render.c:2448)
==1315== by 0x9357AA2: gen7_render_composite (gen7_render.c:2800)
==1315== by 0x92DB12E: glyphs_to_dst (sna_glyphs.c:552)
==1315== by 0x92DEA8D: sna_glyphs (sna_glyphs.c:1664)
==1315== by 0x4F920E: damageGlyphs (in /tmp/Xorg)
==1315== by 0x4F2FF6: ProcRenderCompositeGlyphs (in /tmp/Xorg)
==1315== by 0x437260: Dispatch (in /tmp/Xorg)
Reported-by: Matti Ruohonen <kiesus@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56591
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
There exists a race with plymouthd that can cause the drm device to
reject us as the rightful master, and so cause X to fail to load. Try
waiting for a couple of seconds for whatever it was to close before
giving in.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Adam Jackson notes that what appeared to be my paranoid ramblings in SNA
actually served a purpose - it prevents a server crash following
server regen if an indirect client happened to be running at the time
(e.g. LIBGL_INDIRECT_ALWAYS=1 glxgears).
Reported-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since RandR itself is disabled if Xinerama is enabled, for example with
ZaphodHeads, calling RRGetInfo() upon a hotplug event generates an
assertion.
Reported-by: Stephen Liang <inteldriver@angrywalls.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55260
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Damage is processed in two phases, with the actual Damage being appended
before the operation is performed so that a copy can be made before
modification (e.g. software cursors).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
On gen6+, bo are expected to be LLC by default. However, as using the bo
for the scanout causes it to be moved into the uncached domain, this
assumption is then false and we should release the bo back to the system
rather than spread the uncached buffers around. The most common
allocator of scanouts is for pageflipping which are already non-reusable
due to the DRI2 export, so there should actually be little impact.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When we return NULL from sna_drawable_use_bo(), the expectation is that
the damage pointer is also NULL. However, one SHM path leaked.
References: https://bugs.freedesktop.org/show_bug.cgi?id=56180
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes regression from commit c51aaa731e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu Oct 11 11:36:00 2012 +0100
sna/gen7: Replace bogus state tracking assertion
The assumption being that we only used the encoded flags for determining
the composite state is false for the magic CA pass.
Reported-by: Oleksij Rempel <bug-track@fisher-privat.net>
Reported-by: Eyal Lotem <eyal.lotem@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56037
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The only path where this is correct already handles it as the special
case that it is, everywhere else it just nonsense.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As the maximum reported image sizes are for the source image, we should
be careful not to recommend the application use an output Window larger
than can be handled by the overlay hardware. So shrink it to fit, whilst
preserving the aspect ratio.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Libdrm's possible_clones is a mask of encoders. Xorg's possible_clones
is a mask of outputs, so we just can't do the following:
output->possible_clones = kencoder->possible_clones;
This is a problem on Haswell because, at least with the current
patches floating on the mailing list, there is more than one connector
per encoder.
This patch writes the code to properly translate libdrm's encoder mask
into Xorg's output mask.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we are forced to use the GPU bo as the target because the CPU bo is
busy, the priv->cpu flag is likely to remain set, so we need to clear it
rather than fail the assertion that is false.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>