Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
Signed-off-by: Ben Clouser <ben.clouser@toradex.com>
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Use the new helpers to initialise boxes from position + size, get box
widths and heights.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
Free the connector properties and associated memory when destroying
the connector to prevent memory leaks.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Implement support for passing the cursor hot x/y to the KMS driver
using drmModeSetCursor2().
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
Add backend support for generating source rotations while blitting.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
Add the picture coordinates to the debug output for the Xrender
Composite operation.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
Add questions about libdrm_armada and libdrm_etnaviv.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Free the GPU port privates in the success path as well as the failure
path.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|