summaryrefslogtreecommitdiff
path: root/src/intel_uxa.c
AgeCommit message (Collapse)Author
2011-05-30Revert "Revert "i965: Invalidate pixmap binding location on reuse.""Owain G. Ainsworth
This reverts commit 59449d604066542d5485359050d3083fa7bb40f8.
2011-05-30intel: Restore manual flush for old kernelsChris Wilson
Daniel Vetter pointed out that the automagic flush by the kernel for the busy-ioctl was only introduced upstream in 2.6.37. So we still need to manually emit a flush on old kernels. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 97e9557619e58ef769eb7cbf1a03fbd52be7f2ed) Conflicts: src/intel_driver.c
2011-05-29Take advantage of the kernel flush for dirty bo in the busy ioctlChris Wilson
Rather than just creating and submitting a batch that simply contains a flush in order to periodically ensure that rendering reaches the scanout, we can simply ask the kernel whether the scanout is busy. The kernel will then submit a flush on our behalf if it is dirty, which takes advantage of the kernel's dirty state tracking. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 6f104189bb9439ab0e05f04d4be020813eb04bf9) Conflicts: src/intel_display.c src/intel_driver.c
2011-05-29Cleanup gen2 tiling confusionDaniel Vetter
A tile on gen2 has a size of 2kb, stride of 128 bytes and 16 rows. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit f660df2cb44b310740ed850037ff37891b671f28) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29Fix relaxed tiling on gen2Daniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit d21d781466785c317131a8a57606925867265dc8) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-05-29i830: amalgamate consecutive composites into a single primitiveChris Wilson
Improve aa10text on i845 from 218kglyphs/s to 234kglyphs/s Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 875d4828352c501ec5d0169735fb078807e76f2e) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-04-04don't do batch_submits in uxa block handler if vtswitchedOwain G. Ainsworth
avoids calling batch functions while we are vtswitched. the main benefit of this is that we dont' spam the log with batch submit failed messages
2011-03-16i965: Amalgamate surface binding tablesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 3cc74044ce3546cc7dc2e918cbabbb41a77f4026) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16uxa: Relax fencing some more for gen3Chris Wilson
Allow fenced allocations even for small pixmaps if the kernel supports relaxing fencing (where only the used pages are allocated). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit cc930a37612341a1f2457adb339523c215879d82) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Support BLT acceleration on gen6Owain G. Ainsworth
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 42363134bd38fb406d90cdb9e5b227836a793912) Conflicts: src/intel_driver.c src/intel_uxa.c
2011-03-16Update priv->stride after bo reallocationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 0bb1a5f19e09dc553761ddd90bf6319eab94a597) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Create the UXA generational resources during screen createOwain G. Ainsworth
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 3e28a0c0b43823d3104fe8fc50b5994b41fc0cc1) Conflicts: src/intel_driver.c
2011-03-16Don't replace the scanout bo through PutImageChris Wilson
As the bo may be pinned for either use by the scanout or through sharing with another application, under those circumstances we cannot replace the bo itself but must force the blit for PutImage. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31367 Reported-and-tested-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 53fbc9f1760ee481cba1f6dceb9e7c97282a2976) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Revert "i965: Invalidate pixmap binding location on reuse."Owain G. Ainsworth
This reverts commit 1797b60e4e5fc409e2201826baeb17b516122f3e. (this depends on snd stuff that is not yet commited -- fixes build)
2011-03-16i965: Invalidate pixmap binding location on reuse.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit d90c8f4d0bb6b79ecdcaa82f87291169c18c64b9) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Always flush the batch before blocking for new X requestsChris Wilson
This should prevent any lag when waiting upon user input, for example whilst logging in with gdm. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 4a186a612376bdd6f86c026e8b8b442108868a0a) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16uxa: Prevent reading past the last byte on upload/downloadChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29752 Reported-by: Sergey Samokhin <prikrutil@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit e8f41c371024e2f3845c7652b22af8f5900200f2) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16i965: Upload an entire vbo in a single pwrite, rather than per-rectangleChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit a1fa0dbfdafea32139d4457d81b9d722df955eaf) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Fix violation of gen6 requirements for depthbuffer tiling.Eric Anholt
In general, demoting of tiling of DRI2 buffers seems dubious, as we've got various bits of functionality that won't all work together unless buffers are tiled as expected. This just covers one instance of the problem, caught by assertions in Mesa. Fixes: fbo-1d fbo-d24s8. glean/readPixSanity glean/rgbTriStrip glean/scissor (cherry picked from commit a1c54f69643671ce296c57d132852e9846cc41d3) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Include a chipset generation number to clarify device specific paths.Owain G. Ainsworth
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 4083197a44d1a1a05d33654b3c7d6e96d7472fe7) Conflicts: src/intel_driver.c src/intel_driver.h src/intel_module.c src/intel_video.c (oga notes: few other things had to be pulled in to get this to work)
2011-03-16uxa: Re-enable acceleration.Chris Wilson
A side-effect of discriminating offscreen based on the devPrivate.ptr was that it broke uxa_finish_access and so after any fallback to s/w on a Pixmap, it remained in software for the reminder of its life. Introduce an explicit boolean to mark whether or not hardware acceleration is enabled for a pixmap (with a GEM buffer). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 707901bf98073fb56179a0b61c806f85ef8f413c) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Revert "Clear pixmap->devPrivate.ptr [regression in 7c7294e]"Chris Wilson
This reverts commit 48b4e224297fa807be0e2bc7a67bf7e94579e8de. The better fix is to manually mark the pixmap when acceleration is and is not permitted. Whilst the devPrivate.ptr are invalid upon creation, it is not worth carring code that serves no purpose. (cherry picked from commit 54f545e0631a287f421ef6a6f20831624b212cf2) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16Clear pixmap->devPrivate.ptr [regression from 7c7294e]Chris Wilson
ModifyPixmapHeader(pixdata = NULL) does not clear the pixmap->devPrivate.ptr, instead the NULL value is interpreted as meaning to keep the current value. (This is similar to the interpretation of the other invalid values like depth=-1 which also mean not to change the current property). However pixadata=NULL is indeed a valid value, and in 7c7294e, devPrivate.ptr == NULL was used to differentiate a bo pixmap from a system pixmap. Except that we never did clear the ptr as intended, and so X would immediately crash. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit d1925deedd70c6c4374e42de5aa44989fe328b58) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2011-03-16shadow+dri2: Allow dri2 to be independently enabled with shadowOwain G. Ainsworth
To enable DRI we create GEM buffers for the client to render into with hardware acceleration. In order to maintain coherency between any 2D render operations with the independent 3D clients (this includes the reading of 2D rasterisation by the direct rendering client, e.g. compiz using texture_from_pixmap) we need to replace the shadow pixmap with the GTT mapping. Therefore 2D rendering to a DRI buffer will be to uncached memory and thus penalised -- but the direct rendering clients will have full hardware acceleration. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 7c7294ec00d6c3a454a17a1b9983d14d0655162c) Conflicts: src/intel_dri.c src/intel_driver.c
2011-03-16Split shadow handling routines to their own file.Chris Wilson
This is about to get messy, so separate out the shadow from the normal code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 516d235c5b3bd51e9533925140d95d3b4533129c) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2010-09-13uxa: Apply source clipping to blitsChris Wilson
Yes, this should be done in the higher layers. Yes, I have written code to that. No, it is not ready, hence add the sanity check to the SRC_COPY_BLT. This isn't the first report that I've seen, but will be the last. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30120 Reported-by: rezbit.hex@gmail.com Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 08c2caca48323d6d5701dcef3486f850619d7905) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2010-09-12Enable a shadow buffer and disable GPU acceleration.Chris Wilson
An attempt to workaround the incoherency in gen2 chipsets, we avoid using dynamic reallocation as much as possible. The first step is to disable allocation of pixmaps using GEM and simply create them in system memory without a backing buffer object. This forces all rendering to use S/W fallbacks. The second step is to allocate a shadow front buffer and assign that to the Screen pixmap. This ensure that the front buffer remains in the GTT and pinned for scanout. The shadow buffer will be rendered to in the normal fashion via the Screen pixmap, and be marked dirty. In the block handler, the dirty shadow buffer is then blitted (using the GPU) over the front buffer. This should completely avoid having to move pages around in the GTT and avoid incurring the wrath of those early chipsets. Secondly, performance should be reasonable as we avoid the ping-pong caused by the small aperture and weak GPU forcing software fallbacks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Owain G. Ainsworth <oga@openbsd.org> (cherry-picked from commit 2b96c18165d713cd6781dbf217ec33e11cc961bc) Also pulled in the following commit: commit ae160d7fbfc79e78dad8702efcc55d9c0c25ff67 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Sep 10 13:19:12 2010 +0100 shadow: Simply modify the Screen pixmap header This is a slightly less risky strategy than having to remember to update all pointers to the old Screen pixmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-12Force use of GTT and fence registers for mapping tiled objectsChris Wilson
If the buffer object is tiled, we need to use the fence registers to perform the appropriate untiling for CPU access. Ensure that we always take this path for tiled objects, regardless of their size. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Owain G. Ainsworth <oga@openbsd.org> (cherry picked from 501e78b0095b00a635dc1dc182fc132f14f08f22)
2010-09-12Remove accel_pitch_alignmentChris Wilson
This has to be 64 on all generations currently, so replace the variable with a constant. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 42312bbd8c9cbadf0adc4556b76987857d105bd9) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2010-09-12Replace ROUND_* macros with ALIGN.Matt Turner
Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 7f86e5b5da88201e5443e26619c35a1a9745cf68) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
2010-09-12Rename common infrastructure to the intel namespace.Owain G. Ainsworth
After splitting out the i810 driver into its own legacy directory, we can identify the common routines not as i830 but as intel. This clarifies the code which *is* i830 specific. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 5c663ce8442bd3b69c96e29061c57cc565fca91d) Conflicts: src/Makefile.am src/drmmode_display.c src/intel.h src/intel_batchbuffer.c src/intel_dri.c src/intel_driver.c src/intel_memory.c src/intel_video.c src/xvmc/intel_xvmc.h OGA: adapted for ums