summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-05-18build: fix present.h detectionunstable-develLubomir Rintel
With xserver 1.20.4 it's necessary to include xorg-server.h before present.h: In file included from /usr/include/xorg/randrstr.h:46, from /usr/include/xorg/present.h:27, from conftest.c:37: /usr/include/xorg/servermd.h:51:2: error: #error Drivers must include xorg-server.h before any other xserver headers Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Russell King <rmk@armlinux.org.uk>
2019-05-18build: correct --enable option defaultsRussell King
Some of the defaults for the --enable options were different from those which were described in the help text. Correct the help text to conform to the configure defaults. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-08-29etnaviv: fix coding style of previous patchRussell King
Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-08-29etnaviv: Prevent seg-fault when non-etnaviv card is presentBen Clouser
Signed-off-by: Ben Clouser <ben.clouser@toradex.com> Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-08-29etnaviv: use different error codeStefan Agner
The return code LDR_NOHARDWARE has been dropped in X.Org Server 1.20. Use LDR_MODSPECIFIC instead. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-08-29common: Make 24bbp support optionalStefan Agner
24bbp support has been removed in X.Org Server 1.20. Make its support optional so this driver can be built for newer X.Org Server versions. Suggested-by: Christian Gmeiner <christian.gmeiner@gmail.com> Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-19src: Xv: do not deallocate buffers if off-CRTCRussell King
Do not deallocate the Xv framebuffers if the drawable is not displayed on any CRTC. This avoids an allocate-free cycle each time the image is updated when (eg) all CRTCs are disabled due to monitor disconnection. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-19src: Xv: fix primary plane disable for rotated displaysRussell King
Fix the CRTC box dimensions used for determining whether the primary plane is fully obscured by the overlay, and therefore whether the primary plane can be disabled. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
2018-07-13src: use box_init(), box_width() and box_height()Russell King
Use the new helpers to initialise boxes from position + size, get box widths and heights. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-13common: add box_init(), box_width() and box_height() helpersRussell King
Add a helper to initialise a box from a position + size, and to obtain the width and height from an existing box. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-13src: move connector handling to separate fileRussell King
Separate out the connector handling from the rest of the common drm bits - it is separate enough not to need to be part of the same file. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-13src: simplify common_drm_conn_set_property()Russell King
Move the search for the property out, which allows us to clean up the code a little. This functionality will also be needed for common_drm_conn_get_property(). Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-13src: clean up connector properties when destroyingRussell King
Free the connector properties and associated memory when destroying the connector to prevent memory leaks. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-13src: scan properties in common_drm_conn_init()Russell King
Rather than scanning connector properties twice, create the list of properties exported to RandR in common_drm_conn_init() rather than common_drm_conn_create_resources(). This avoids needing to call drmModeGetProperty() for the same properties multiple times, and checking for the DPMS and EDID properties in multiple places. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-13src: store crtc id instead of entire drmModeCrtc structureRussell King
We only make use of the crtc ID from the drmModeCrtc structure, which is the same ID we got from the drmModeRes mode resources. Rather than fetching the drmModeCrtc structure, just store and use the crtc ID directly. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-13src: ensure we free EDID blobRussell King
Ensure that we free the EDID blob after we've parsed it, rather than leaking its memory. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-13src: lookup and store the EDID connector propertyRussell King
Lookup and store the EDID connector property, rather than doing this each time we call want to read the modes. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-13src: lookup and store the DPMS connector propertyRussell King
Lookup and store the DPMS connector property, rather than doing this each time we call the connectors DPMS function. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-13src: avoid NULL pointer dereference when setting output propertiesRussell King
Avoid a potential NULL pointer dereference when we try to set output properties in common_drm_conn_set_property(). Only properties that are registered with RandR have the atom array. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-13src: bump minimum libdrm to 2.4.47 and use drmSetClientCap()Russell King
drmSetClientCap() was added in libdrm version 2.4.47, which is a useful wrapper for our universal plane support. Use this instead of open coding this functionality. DRM_CLIENT_CAP_UNIVERSAL_PLANES was introduced in 2.4.56, but we don't want to force that version just for this definition. Provide a compat definition for this. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-13src: improve robustness converting from kernel enumsRussell King
Improve the robustness of our conversion from kernel enums, specifically the subpixel order and the connector type. Recent kernels have more connector types, which will cause us to overflow the array of names should we encounter a KMS driver with such a connector. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-07-13common: correct path for drm_fourcc.h includeRussell King
Correct the path for the drm_fourcc.h include - the "drm" version is the C library derived version from the kernel includes it was built with, rather than the libdrm version. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-06-27Add COPYING fileRussell King
Since this is, in part, derived from xf86-video-intel, we have to maintain the license terms from that package as this is a derived work. Take a copy of the COPYING file from that package, and update it for my authorship. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-06-27src: implement support for drmModeSetCursor2()Russell King
Implement support for passing the cursor hot x/y to the KMS driver using drmModeSetCursor2(). Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-06-27src: read default depth from KMS driverRussell King
Read the default depth from the KMS driver, allowing this configuration to come from the kernel. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-06-27src: move bpp, depth, rgb weight and visual init into common_drm.cRussell King
Move the initialisation of bpp, depth, rgb weight and visuals into common_drm.c - apart from the depth 24 flags, none of this depends on armada. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-06-27src: move armada_get_cap() to common_drm.cRussell King
There is nothing armada specific about armada_get_cap(), so move it to common_drm.c. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-06-25etnaviv: clean up drawable picture acquisitionRussell King
Acquiring the source and mask drawable pictures are actually identical operations, so we should share this code rather than duplicating it. Provide etnaviv_acquire_drawable_picture() for this purpose. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-06-25etnaviv: handle translations with rotationsRussell King
Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-06-25etnaviv: support for rotating source in non-masked composite opsRussell King
Add support for rotating source pixmaps in non-masked composite operations to support on-GPU rotation of the display. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-06-25etnaviv: take account of transform for source originRussell King
Prepare to support rotations by transforming the source pixmap offsets to destination coordinates, which is the coordinate space used by the GPU's source origin register. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-06-25etnaviv: prepare to support rotations in source acquireRussell King
Prepare to support rotations when acquiring a source. When checking whether the pixmap contains all the required pixels, we need to translate the untransformed coordinates to the coordinates on the source pixmap. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-06-25etnaviv: add backend support for source rotationsRussell King
Add backend support for generating source rotations while blitting. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2018-06-09etnaviv: clean up GC320 workaroundRussell King
Re-use the etnaviv_de_start() code for the GC320 workaround to ensure that all relevant 2D GPU states get emitted for the operation. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-11-03etnaviv: avoid out of bounds accelerated picture accessesRussell King
The GPU can't handle repeats or accesses outside of the source pictures so we need to be careful to handle these correctly. If the source coordinates fall entirely within the source picture, we're fine. Replace picture_needs_repeat() with picture_has_pixels() which validates that the region we're going to fetch is covered by the underlying drawable. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2017-11-03etnaviv: add default string for error codesRussell King
Add a default string for error codes that consists of the error code and the errno. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2017-11-03etnaviv: add coordinates to Xrender Composite debugRussell King
Add the picture coordinates to the debug output for the Xrender Composite operation. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2017-11-03etnaviv: fix stale cache_timer pointerRussell King
When the X server starts a new generation, the cache_timer pointer, if set, will be stale. Ensure that this is NULL'd when cleaning up so we create a new cache timer. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2017-08-31etnaviv: fix timeout calculationRussell King
The timeout calculation was multiplying the milliseconds by 10msec in nanoseconds rather than 1msec in nanoseconds. Fix this, and make these more clear by using groups of 1000. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2017-05-01etnaviv: fix glyph upload crashRussell King
A missing memset() meant that the usermem node wasn't correctly initialised. Add the missing memset. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2017-03-16FAQ: add some more questionsRussell King
Add questions about libdrm_armada and libdrm_etnaviv. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-03-16build: disable DRI3 and present extensions by defaultRussell King
Disable the DRI3 and PRESENT extensions by default as they do not work correctly with etnaviv MESA. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-03-16build: avoid testing for libetnaviv libraryRussell King
Avoid testing for the libetnaviv library if we're not building for the GALcore-compatible variant of etnaviv. This avoids a useless test and associated noise in the configure log. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-03-16build: change defaults for etnaviv and vivante backendsRussell King
Change the default configure behaviour from auto-detecting the etnaviv and vivante GPU backends to explicitly needing these to be disabled. This avoids some configuration tests that may confuse users for the common code. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-03-16build: make configure etnaviv/etnadrm messages clearRussell King
Make the configure output explicit about which etnaviv variant it is referring to in order to avoid confusion. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-28src: Xv: add colorimetry configurationRussell King
Add colorimetry configuration to the Xv backend, so that gstreamer and other media players can configure the ITU 601 vs ITU 709 colorimetry information for the overlaid video. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-28src: Xv: free GPU port privates in success path as wellRussell King
Free the GPU port privates in the success path as well as the failure path. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-25src: Xv: add support for disabling the primary planeRussell King
When Xv video is being displayed at full screen, and the video is completely unobscured, there is no point having the primary plane enabled; this wastes system bus bandwidth as the display hardware has to read the primary plane to check the colorkey. Disable the primary plane in this case, restoring it when the primary plane becomes visible once again. This results in a gain of CPU performance of about 20% when video is displayed at full screen on the Dove Cubox. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-25src: Xv: get planes from common_drm_planesRussell King
Get the plane information from the common_drm_planes layer rather than parsing this information ourselves. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-25src: Xv: simplify plane disable in armada_drm_check_plane()Russell King
armada_drm_check_plane() does not need to clear the clip boxes; move the plane disable out of armada_drm_plane_StopVideo() and call it directly from armada_drm_check_plane(). Signed-off-by: Russell King <rmk@armlinux.org.uk>