summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-03-08sna/gen4: Initialise a pair of unimportant variablesChris Wilson
Should never actually affect any results. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-07sna: Fallback if we cannot fit the tiling copy into the apertureChris Wilson
If we cannot fit the source/destination and a tile into the aperture, then we cannot perform the copy and must do it using the CPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-07sna: Trim tile sizes to fit aperture constraintsChris Wilson
This is especially important with gen2 where we have no unmappable GTT to utilise. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-07sna: Remove the unused output and crtc listsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-07sna: Disambiguate sna_crtc_resize()Chris Wilson
sna_crtc_resize() operates upon the whole configuration rather than a single crtc like the other sna_crtc_* so rename it to make it distinct. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-07sna: Supply a fake pipe to run completely headlessChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-07sna: Return early if there are no outputs to setupChris Wilson
Instead of reporting failure, just try to run headless. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-07intel: Relax the has-kms test slightlyChris Wilson
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>
2013-03-06sna: Disable read-read optimisationsChris Wilson
There is still a lurking issue, so punt on the optimisation for now. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61628 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-06sna: Lighten the wakeup handler slightlyChris Wilson
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>
2013-03-05sna: Typo ('unsuported') in DBG messagesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-05sna: Assert that the pixmap is not pinned before releasing the GPU boChris Wilson
Nothing suspicious in this set, just an extra dab of paranoia. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-05sna: The GPU bo submit is still required before mapping for inplace operationsChris Wilson
As we may choose to force the stall as we would be doing a read-back in any event... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-05sna: Use drawable_gc_flags() to select placement for PolyArcChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-05sna: Fix deference of just nullified GPU bo in previous commitChris Wilson
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>
2013-03-05sna: Refactor the is-mappable test for inplace operationsChris Wilson
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>
2013-03-05sna: Prefer GPU for self-copies when undamaged on the CPUChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-05sna: Be explicit when checking for an idle bo after CPU synchronisationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-05sna: Ensure that the tearfree swap is unmapped afterwardsChris Wilson
After swapping the bo for the screen pixmap, we need to make sure that we don't chase any dangling pointers. References: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1133490 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-04sna: Drop a local variable only used to hold a constantChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-04sna: Ensure we do not attempt to operate inplace on a very large pixmapChris Wilson
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>
2013-03-04sna/gen3: Always prefer BLT for copiesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-04sna/gen3: Perform alpha-fixup upon copy sourcesChris Wilson
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>
2013-03-03sna: Only destroy the cached CLEAR picture if it existsChris Wilson
Reported-by: Reinis Danne Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-03sna: Nullify cache pointers upon server regenChris Wilson
To make sure we don't chase dangling pointers on the next pass. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-03sna/gen3: Correct typo in assertionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-03sna/gen3: Add some debug around rendercopies of the fbconChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-03sna: CPUID return ISA features in ecx/edxChris Wilson
Whereas we were wrongly looking in eax. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61733 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-03sna: Undo preferred depth for gen3Chris Wilson
Mesa is buggy. Qt is buggy. Everything is buggy. References: https://bugs.freedesktop.org/show_bug.cgi?id=61441 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-03sna: Probe for kernel support of framebuffer formatsChris Wilson
References: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1135403 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-03sna/dri: Guard against failed batch submissionChris Wilson
Avoid dereferencing a NULL bo if we do not submit a batch for the copy operation. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61708 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-03sna: Eliminate a few used-once local variablesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-01Fix Haswell CRW PCI-IDsChris Wilson
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>
2013-03-01sna: Chain up CloseScreenChris Wilson
Remember to call into the chained CloseScreen destructors! Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56608 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-01sna: Assert that inplace operations are done on coherent mapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-01sna: Assert that when caching a pixmap header the pScreen matchChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-01sna: Assert that we do not resurrect stale pixmap across a server regenChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=56608 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-01sna: Assert that the ScrnInfo and ScreenPtr relationship is correctChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=56608 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-01sna: Move some conditional code out-of-lineChris Wilson
Just to reduce the number of ifdefs, one at a time. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-01sna: Use depth-15 rather than depth-16 for reduced bw devicesChris Wilson
Keeping the number of bits identical between the RGB channels helps prevent discoloration. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-03-01sna: Track number of pixmaps allocated whilst counting bo leaksChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-28sna/video: Correct scaling of source offsetsChris Wilson
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>
2013-02-27sna: Fix syntax for __get_cpuid()Chris Wilson
It is a function not a macro like cpuid() and takes pointers to its arguments! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-27sna/dri: Fix use of uninitialised pipe along error pathChris Wilson
> sna_dri.c:2018:6: warning: variable 'pipe' is used uninitialized > whenever 'if' condition is true [-Wsometimes-uninitialized] > if (get_private(front)->pixmap != get_drawable_pixmap(draw)) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > sna_dri.c:2150:42: note: uninitialized use occurs here > DRI2SwapComplete(client, draw, 0, 0, 0, pipe, func, data); Reported-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-27sna: Prettify GCC version detection in headersChris Wilson
And fixup a basic error in the process. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-27sna: Improve compatibility of cpuid.h detectionChris Wilson
Reported-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-27sna: Remove the trailing '.' from the previous commitChris Wilson
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>
2013-02-27sna: Migrate dirty tracking across ScreenPixmap updatesChris Wilson
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>
2013-02-26sna/gen2: Add SSE2 fast paths for vertex emissionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-02-26sna: Force GCC to use the SSE unit for SSE2 routinesChris Wilson
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>