summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* build: ensure m4 sub-directory is createdHEADmasterRussell King2014-11-221-0/+1
| | | | | | | Ensure autogen.sh creates the m4 sub-directory before running autoreconf, otherwise autotools fails. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* packaging: add README and INSTALL filesRussell King2014-09-272-0/+327
| | | | | | | Add some of the usual documentation files to describe the package and the standard installation instructions. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* add .rej files to .gitignoreRussell King2014-09-271-0/+1
| | | | Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* src: fix failure to enter VTRussell King2014-09-131-1/+6
| | | | | | | | | | If EnterVT fails, we end up segfaulting the server, because we have marked the vtSema true when this isn't the case - we try to LeaveVT twice, once for the fatal error (which causes a segfault) and once more as a result of the segfault. Ensure that we reset this flag when EnterVT fails to avoid this error. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: validate source/destination formatsRussell King2014-09-134-4/+39
| | | | Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: split out the non-alpha workaroundRussell King2014-09-131-85/+61
| | | | Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: add updated gal extensionRussell King2014-09-122-5/+30
| | | | | | | Work on etnaviv has standardised this extension. Use the new version instead, obsoleting the old version. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: fix composite using non-alpha picturesRussell King2014-09-121-0/+108
| | | | | | | | | | The Vivante GPU hardware appears to be buggy with some formats and mask combinations, and is particularly noticable with BGRA/RGBA swizzles with non-alpha formats. Fix this by switching to alpha formats, and subsituting a maximal global alpha value instead. This allows rendercheck to pass for all formats with PE20 hardware. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: better solid mask handlingRussell King2014-09-121-41/+46
| | | | | | | Improve the solid mask handling: we can do these checks earlier, and by doing so, allow more mask formats through to be rendered by hardware. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: remove unused BoxCopy()Russell King2014-09-121-16/+0
| | | | | | BoxCopy() is not used, and is #if 0'd out. Remove it. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: fix PutImage() positioning bugRussell King2014-09-121-1/+2
| | | | | | | | xts finds that PutImage() fails. This is because PutImage() on a window drawable must include the drawables position on the pixmap, and this was not being taken into account. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: fix FillSpans() X coordinateRussell King2014-09-121-1/+1
| | | | | | | FillSpans() x2 coordinate was undefined as it should be adding the width to the x1 coordinate. Fix this. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: fix PolyFillRectSolid()Russell King2014-09-121-18/+34
| | | | | | | | | PolyFillRectSolid() must fill the rectangles in the order provided, and must not optimise overlaps (due to XOR and similar GC operations.) Re-architect the solid fill function to fill each rectangle in the provided order for each clip box. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: fetch solid colour and convert to ARGB8888Russell King2014-09-121-18/+73
| | | | | | | | When fetching the solid colour to fill the temporary composite pixmap, always ensure that it is formatted for ARGB8888 to match the destination format. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* vivante: fix temporary composite pixmap to be 32-bit ARGB8888Russell King2014-09-121-12/+4
| | | | | | | | | The temporary composite pixmap was being created with a variable depth, but we were trying to place ARGB8888 formatted pixels into it. Fix by ensuring that this is always created with a depth of 32, and move the format initialisation to one place. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: move extraction of foreground colour to separate functionRussell King2014-09-121-9/+10
| | | | Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: fix PolyPoint() CoordModePreviousRussell King2014-09-121-8/+18
| | | | | | | | The PolyPoint() CoordModePrevious implementation was incorrect - it only accounted for the previous point's relative position, not its absolute position, leading to rendering errors. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: vivante_fill() takes the boxes themselves rather than the regionRussell King2014-09-121-26/+15
| | | | | | | Arrange for vivante_fill() to take the clip box and a list of boxes to operate on, rather than a region. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: fix Composite repeat handlingRussell King2014-09-121-5/+20
| | | | | | | | We should change the Picture's repeat setting across a Composite operation. Ensure that this is restored after we've done processing the operation. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: fix buggy error path when mapping non-shmem bosRussell King2014-08-261-0/+1
| | | | | | | | We were freeing the vivante_pixmap structure, but were then going on to store a pointer to it - this is not what was intended. Ensure that we mark the pixmap as being without a vivante_pixmap structure. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* packaging: only include *_drv.so objects in base packageRussell King2014-08-141-1/+1
| | | | Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: use xf86ScreenToScrn(pScreen)Russell King2014-08-142-3/+3
| | | | | | | Use xf86ScreenToScrn(pScreen) rather than directly converting via xf86Screens. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* src: use xf86ScreenToScrn(pScreen)Russell King2014-08-141-1/+1
| | | | | | | Use xf86ScreenToScrn(pScreen) rather than directly converting via xf86Screens. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* src: avoid passing the Armada buffer manager for non-Armada hardwareRussell King2014-08-143-10/+26
| | | | | | | | | Avoid passing the Armada buffer manager into the acceleration backend when we are not using the Armada-DRM kernel driver. The Armada buffer manager relies on some private IOCTLs which are not implemented by other driveres. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: avoid assert() in prepare_cpu_drawable()Russell King2014-08-141-1/+0
| | | | | | | | The same pixmap may be used multiple times in the unaccelerated functions. Do not require the in-use counter to be zero when preparing it. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: fix overlapping operationsRussell King2014-08-031-3/+15
| | | | | | | | | | | | | Where the 2D engine has multiple pixel pipes, it is possible for two GPU operations to overlap and operate concurrently. If this occurs with an overlapping blit copy, one copying to the scanout buffer, and another copying from the scanout buffer, it results in corrupted pixel data read from the scanout buffer. This happens when software cursor mode is enabled with a GC320, as is the case with iMX6Q SoCs. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* vivante: include alpha channel in pixmapsRussell King2014-08-021-4/+5
| | | | | | | | | | | Always include the alpha channel in pixmap operations. This required as the blit can be used to upload images to the pixmaps which back a Xrender picture, where the alpha channel must be preserved, and because the 2D PE2.0 engine will avoid copying those bits. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Add vivante support for blending alpha-only solid masksRussell King2014-07-231-20/+98
| | | | | | | | | | | We can blend alpha-only solid masks in PictOpOver mode by using the Vivante GPU's global alpha mode, and instead performing an ATop operation. Gnome uses this when fading between two images, so this is a useful operation to accelerate. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Clean up vivante_accel_Composite() a littleRussell King2014-07-231-12/+11
| | | | Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Add support for imx-drmRussell King2014-07-232-2/+18
| | | | | | | | | Add support for attaching to the imx-drm kernel module, thus allowing the driver to be used on iMX hardware as well. It should be noted that the libGAL backend does not support iMX, and so should be manually disabled in the Xorg config file. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Allocate Xv BOs using 16-bpp allocationsRussell King2014-07-231-3/+8
| | | | | | | Use 16-bpp BO allocations to allocate Xv display buffers, rather than 32-bpp and tweaking the height appropriately. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Fix bug in vivante pixmap dumping functionsRussell King2014-07-231-2/+8
| | | | | | | The vivante pixmap functions we not restoring the mapping state of the pixmap correctly. Fix this. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Fix FillSpans positioning bugRussell King2014-07-191-4/+4
| | | | | | | | FillSpans included the drawable x/y coordinates. This is not necessary as the GC has miTranslate set, which ensures that we receive pre- translated coordinates here. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Fix CloseScreen bug in src/common_drm.cRussell King2014-07-151-3/+3
| | | | | | | Fix another server segfault when shutting down due to incorrect shutdown ordering. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Move compat-api.h headerRussell King2014-05-102-2/+2
| | | | | | | Building on Ubuntu 14.04 fails because the compat-api header is included too early. Fix these build errors. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Fix bail out on pictures we don't yet handle in composite methodRussell King2014-03-211-26/+46
| | | | | | | | | | | | | | | It is better to bail out early on pictures we don't handle than to try to handle them and then fail. We check: - the operation is one we can support - the source and destinations do not have alpha maps - the source has a drawable, or is a solid single coloured surface - the mask does not have an alpha map, and is not component alpha - the mask has a drawable The last case was missed, and this causes Audacious to crash when using the GTK+ theme. Bug reported by Matthew Coburn. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Split out the final blending operationRussell King2014-03-211-59/+70
| | | | | | | | Move the final composite blend operation out into a separate function to allow it's re-use with other code paths. This permits some future optimisations to the composite operations. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Use compat-api.h for glyphsRussell King2014-03-201-4/+1
| | | | | | | We are duplicating this logic in vivante_unaccel_render.c - remove this and use the compat-api.h provided version. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Split out the ioctl issuing functionRussell King2014-03-201-2/+8
| | | | | | | This functionality can be re-used by providing other ioctls, so move it out from vivante_map_bo_to_gpu(). Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Move owner checking into vivante_map_gpu()Russell King2014-03-202-1/+4
| | | | | | | | Move the pixmap owner checking into vivante_map_gpu(), which is where the ownership is switched. This helps to keep all that logic localised. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Disable vivante batch processingRussell King2014-03-203-1/+45
| | | | | | | | | | | | With modern kernel drivers, there is no need to implement batching; this is only necessary if the kernel driver is buggy and allows the commit-with-stall to return before the pending operations have been completed. This allows removal of the batch code; however, keeping the batch code around is wise should the bug reappear in later code drops. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Tidy up commented out gcoHAL_Commit() and indentationRussell King2014-03-201-4/+1
| | | | | | | Tidy up the code a little by removing these unnecessary calls to gcoHAL_Commit(), and fix the indentation in vivante_fill(). Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Ensure DRI2 is closed down at the right pointRussell King2014-03-201-4/+4
| | | | | | | | DRI2 is initialised before we hook the accelerator functions into the screen, so closing down DRI2 should happen after these functions have been unhooked from the screen for proper symmetry. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Rename map_dma_buf -> dmabuf_mapRussell King2014-03-202-3/+3
| | | | | | This gives it a better namespace. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Move GPU source programming into gal_prepare_gpu()Russell King2014-03-201-27/+10
| | | | | | | | We don't need to replicate this in every function, we can just do this when preparing the vivante pixmap for GPU access - but currently only for the non-blended operations. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Move Picture format into vivante_pixmapRussell King2014-03-202-34/+32
| | | | | | | | | Rather than carrying this around as a separate variable, store it in the vivante_pixmap structure so it follows the pixmap around. This ensures we have a consistent set of metadata about the image stored in the pixmap. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Fix segfault on X shutdown.Russell King2013-12-231-2/+3
| | | | | | | | | Freeing the vivante-held information on the screen pixmap after the vivante acceleration backend leads to a segfault in the GALCORE libraries. Avoid this by ensuring that this is done before the backend is shutdown. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Avoid bouncing pixmaps between GPU and CPU on ChangeWindowAttributes()Russell King2013-12-231-21/+29
| | | | | | | | | Avoid unnecessary bouncing of pixmaps between the GPU and CPU when ChangeWindowAttributes() is called. We don't need to map this to the CPU unless we're actually need to access the pixmap; merely checking for the flags is insufficient. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Remove old/obsolete ioctlsRussell King2013-12-052-102/+0
| | | | | | | The mainline kernel will never support these old obsolete ioctls as it has more generic implementations for these. Remove them. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
* Convert Armada DRM CRTC into a set of library functionsRussell King2013-12-046-777/+939
| | | | | | | Convert much more of the Armada DRM driver to be a set of library Armada independent DRM functions. Signed-off-by: Russell King <rmk@arm.linux.org.uk>