freedreno: do not leak drmVersion

Cc: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
freedreno: zero out unused field

Since realloc() doesn't zero-init.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
radeon: sync with radeon_drm.h from kernel headers

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Bump version to 2.4.53 for release
nouveau: safen up nouveau_device list usage against concurrent access

I cannot make nouveau_bo_wrap thread-safe (by design), but it seems to be used to convert
drm fb's to nouveau_bo's and to get a notify handle from fifo->notify in nv30_screen.c

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
amend previous commit to actually compile

Ugh!
Mark functions printf-like where possible

These functions all take a format string and either a list of variable
arguments or a va_list. Use the new DRM_PRINTFLIKE macro to tell the
compiler about it so that the arguments can be checked against the
format string.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
intel: Fix some format strings

Some of the format strings for debug messages use the wrong modifier to
print sizes.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
libdrm: Remove extraneous parameter

The debug message's format string doesn't contain any conversion
specifiers, therefore making the fd argument unused.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
tests: Use drmFreeVersion() instead of drmFree()

drmFreeVersion() frees the memory allocated for the name, date and desc
fields in addition to that for the struct _drmVersion.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
freedreno: Implement support for OpenFIMG DRM interface

This patch adds support for OpenFIMG DRM interface to Freedreno libdrm
code to reduce code duplication between Freedreno and OpenFIMG
projects, because semantics used by kernel side of both are nearly
identical.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
freedreno: of: Use local DRM API header

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
freedreno: Allow back-end specific mapping

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
freedreno: of: Override mapping method with exynos-drm-specific one

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
freedreno: Disable BO caching for now

Somehow it ends up doing more bad than good. Let's disable it until the
cause is found.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
freedreno: of: Allocate uncached BOs

Until proper synchronization is added, to ensure coherency, disable
caching of BOs and use write-combine mapping.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
freedreno: of: Disable prep/fini until it gets implemented

At the moment Exynos DRM does not support cpu_prep/fini calls, so this
code does not have any effect. Disable it until it becomes of any use.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
freedreno: of: Remove unused definitions

They are no longer part of the public interface and so they should not
be present in this header.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
freedreno: of: Add support for 2D pipe

This will be used to submit ring buffers for 2D accelerator.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>