automake: remove obsolete makefiles

Rather than having two extra makefiles in order to ship ~10 headers
just fold its 5 lines of code into the top one makefile.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Remove i810_drm.h and i830_drm.h from the distribution tarball

Both of these headers are not installed since they were imported.
They  are not even used internally. The latter no longer exist in the
kernel...

Note the * symbol in EXTRA_DIST causes 'make distcheck' to fail. When
was the last time we ran it ?

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
automake: fix 'make commit-headers'

Not too long ago the in-kernel drm public headers were moved. Since then
we could no longer fetch/update the ones in libdrm using the command.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
configure: unconditionally check for atomic ops/primitives

Just have the check once, and let new drivers opt-in if they want
to use them. Move the block further up the script, to tie nicely
with the actual usage of $HW defines.

Move the final $HW users to be alongside their brethren.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
libkms: build the intel backend only when needed

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
libkms: move sources lists to makefile.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
libkms: add Android build

Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
modetest: move sources lists to makefiles.sources

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
modetest: add Android build

v2: include modetest rather than modeset.
Spotted by Mauro Rossi and Paulo Sergio.

Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
modetest: Add support of STI driver

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
automake: pick up all files for distribution.

Autotools is already smart enough to pick the *.pc.in files but it
needs some help with the Android.mk ones.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Add private mmap/munmap wrappers

Unlike Linux, Android (bionic) has separate functions - mmap & mmap64.
Add a local wrapper (inspired by gallium) that will be used throughout
libdrm to combat this bionic feature.

v2:
 - Drop the undefined unlikely macro.
 - Use macro for munmap under Android.
 - Wrap long lines.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
drm: use drm_mmap/drm_munmap wrappers

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
libkms: use drm_mmap/drm_munmap wrappers

... for all by exynos.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
nouveau: use drm_mmap/drm_munmap wrappers

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
radeon: use drm_mmap/drm_munmap wrappers

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
freedreno: use drm_mmap/drm_munmap wrappers

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
intel: use drm_mmap/drm_munmap wrappers

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
configure.ac: bump version to 2.4.57 for release

Signed-off-by: Rob Clark <robclark@freedesktop.org>
fix compile error on 32bit systems

4c2766b (drm_mmap/drm_unmap) brought this error for every .c file that
was not #including config.h:

  In file included from private.h:4:0,
                   from abi16.c:29:
  ../libdrm.h: In function 'drm_munmap':
  ../libdrm.h:81:4: error: size of unnamed array is negative

Signed-off-by: Rob Clark <robdclark@gmail.com>