Do not rely on a fully populated set of CRTCs, but merely note that the
GETRESOURCES ioctl returns an error if KMS is not enabled.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As the wakeup handler is called more frequently, we want to avoid any of
the more heavyweight processing. So trim the wakeup handler down to the
check to see if the GPU is idle and so we should immediately flush what
we have currently queued.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
One last minute refactor too far, combining the too if(priv->gpu_bo)
blocks forgot that the first block tried to free gpu_bo...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
By moving the test into the common function for creating a mappable GPU
bo, we can also consider recreating that bo when desirable.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Otherwise we will fail to map it into the GTT. In theory, this should
just result in the same fallback paths, but pushing that knowledge up
further should help us make better decisions.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This is required for copying from depth-15 surfaces onto other depths.
Reported-by: Reinis Danne
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we missed the PCI-ID for the CRW GT1 variant, we would not have enabled
render support for those particular Haswell machines.
Reported-by: Kenneth Graunke <kenneth@whitecape.org>
When applying pan and zoom to a mismatched video, it would inevitably
miscompute the origin and scale factors.
Reported-by: Matti Hamalainen <ccr@tnsp.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61610
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Good Maarten for reporting the bug, bad Maarten for silently fixing up my
mistakes when testing! Thanks to Colin Walter and his tinderbox.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Otherwise chaos ensues:
Invalid read of size 8
==8647== at 0x8477BC1: has_offload_slaves.isra.38 (sna_accel.c:14402)
==8647== by 0x84958E7: sna_accel_block_handler (sna_accel.c:13729)
==8647== by 0x164B13: BlockHandler (dixutils.c:387)
==8647== by 0x2B5273: WaitForSomething (WaitFor.c:210)
==8647== by 0x160790: Dispatch (dispatch.c:357)
==8647== by 0x14F549: main (main.c:298)
==8647== Address 0xf3383e8 is 24 bytes inside a block of size 152 free'd
==8647== at 0x4C2BA6C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8647== by 0x2403DF: damageDestroyPixmap (damage.c:1549)
==8647== by 0x1FFD88: XvDestroyPixmap (xvmain.c:372)
==8647== by 0x1FE789: ShmDestroyPixmap (shm.c:273)
==8647== by 0x8507C24: _sna_dri_destroy_buffer (sna_dri.c:448)
==8647== by 0x289986: do_get_buffers (dri2.c:521)
==8647== by 0x289C0F: DRI2GetBuffersWithFormat (dri2.c:690)
==8647== by 0x28B68F: ProcDRI2Dispatch (dri2ext.c:306)
==8647== by 0x160A40: Dispatch (dispatch.c:428)
==8647== by 0x14F549: main (main.c:298)
==8647==
==8647== Invalid read of size 8
==8647== at 0x8477BCA: has_offload_slaves.isra.38 (regionstr.h:74)
==8647== by 0x84958E7: sna_accel_block_handler (sna_accel.c:13729)
==8647== by 0x164B13: BlockHandler (dixutils.c:387)
==8647== by 0x2B5273: WaitForSomething (WaitFor.c:210)
==8647== by 0x160790: Dispatch (dispatch.c:357)
==8647== by 0x14F549: main (main.c:298)
==8647== Address 0xdfdfdfdfdfdfdfe7 is not stack'd, malloc'd or (recently) free'd
Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Merely hinting that it was preferred by using sse+387 was not enough
for GCC to emit the faster SSE2 code.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>