Commit Graph

47 Commits (5f7deb50787b82038cc35fb1e31b761e33e5a341)

Author SHA1 Message Date
Xiaojie Yuan 7e6bf88cac amdgpu: move asic id table to a separate file
v2: fix an off by one error and leading white spaces
v3: use thread safe strtok_r(); initialize len before calling getline();
    change printf() to drmMsg(); add initial amdgpu.ids
v4: integrate some recent internal changes, including format changes
v5: fix line number for empty/commented lines; realloc to save memory;
    indentation changes
v6: remove a line error
v7: [Michel Dänzer]
* Move amdgpu.ids to new data directory
* Remove placeholder entries from amdgpu.ids
* Set libdrmdatadir variable in configure.ac instead of Makefile.am
  [Emil Velikov]
* Use isblank() instead of open-coding it [Emil Velikov]
* Don't leak asic_id_table memory if realloc fails [Emil Velikov]
* Check and bump table_max_size at the beginning of the while loop [Emil
  Velikov]
* Initialize table_max_size to the number of entries in data/amdgpu.ids
v8: [Michel Dänzer]
* Make sure amdgpu_asic_id.c gets rebuilt when amdgpu.ids changes

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Samuel Li <Samuel.Li@amd.com>
2017-06-13 10:21:39 +09:00
Emil Velikov 7e0bc3bf1c automake: make the build less chatty
Having the "Entering|Leaving directory X" messages it not required nor
useful in vast majority of the cases.

One can always have them printed by `make -w' or by overriding the
AM_MAKEFLAGS variable.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-11-22 13:54:23 +00:00
Emil Velikov de13ea3877 headers: Add README file
Since we're trying to standardise and make things more consistent in
the area, add a basic README which covers some of the more popular
topics.

v2:
 - Drop drm-misc (Daniel Vetter)
v3:
 - Elaborate on when and which headers to update
 - Add a list of headers and the respective "issues"
 - Add file to EXTRA_DIST

Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-11-14 19:52:38 +00:00
The etnaviv authors 95e2cc6a80 libdrm: add etnaviv drm support
Add the libdrm_etnaviv helper library to encapsulate etnaviv-specific
interfaces to the DRM.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Rob Herring <robh@kernel.org>
2016-09-17 15:05:25 +02:00
Andreas Boll a5446775f2 automake: Don't include Android Makefiles in the release tarball
Currently only some Android Makefiles are included in the release tarball.
To be more consistent one could either add the remaining files or don't
ship Android Makefiles altogether.

According to Emil the Android folk doesn't use our release tarballs.
Thus it makes sense to remove those files from distribution which also
means less work for maintenance in the future.

Suggested-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-07-23 09:45:53 +02:00
Eric Anholt 3c717f61f8 vc4: Add headers and .pc files for VC4 userspace development.
The headers were originally written in Mesa, imported to the kernel,
and improved upon in vc4-gpu-tools.  These come from the v-g-t copies
and will replace the Mesa and v-g-t copies, and hopefully be used from
new tests in igt, as well.

v2: Fix linking against libdrm_intel instead of libdrm.
v3: Drop Libs and Cflags since they'll be inherited from libdrm.
v4: Switch to Requires.private.  I was wrong about standard practice,
    apparently only Intel was doing plain Requires (sorry to all
    involved).

Signed-off-by: Eric Anholt <eric@anholt.net>
2016-02-03 11:29:52 -08:00
Emil Velikov 00808a99d0 automake: set --enable-valgrind during make distcheck
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-21 17:32:03 +01:00
Emil Velikov 1e66ee21ab Move -lm link flag to LIBADD
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-08-24 18:24:24 +01:00
Jérôme Glisse 51d72a619e drm: Add -lm to libdrm ldflags to fix build failure.
Last commit (b556ea127e) introduced
use of log2 which require -lm flag for the linker on quite few
distribution. Just add that flag to fix build.

Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
2015-08-24 13:16:56 -04:00
Emil Velikov bf4826430a Force enable amdgpu for the dist build/check.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-13 17:42:04 +01:00
Alex Deucher 0936139536 drm: add libdrm_amdgpu (v7)
This is the new ioctl wrapper used by the new admgpu driver.
It's primarily used by xf86-video-amdgpu and mesa.

v2: fix amdgpu_drm.h install
v3: Integrate some of the sugestions from Emil:
    clean up Makefile.am, configure.ac
    capitalize header guards
    fix _FILE_OFFSET_BITS with config.h
    use drm_mmap/drm_munmap
    Remove unused ARRAY_SIZE macro
    use shared list implementation
    use shared math implementation
    use drmGetNodeTypeFromFd helper
v4: remove unused tiling defines
v5: include amdgpu.h in Makefile.am
v6: update amdgpu_drm.h
v7: libdrm.h -> libdrm_macros.h

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-05 13:47:48 -04:00
Emil Velikov 5b0e76f143 Revert "Add device enumeration interface (v4)"
This reverts commit fde4969176.

The commit adds an API that does not seem flexible enough to be used in
current open-source projects. Additionally it adds a hidden dependency
of libudev, which when used in mesa caused grief when combined with
Steam('s runtime).

Let's revert this for now and add a tweaked API later on that can be
used in mesa/xserver.

Cc: Frank Min <frank.min@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Jammy Zhou <Jammy.Zhou@amd.com>
2015-06-29 11:12:21 +01:00
frank fde4969176 Add device enumeration interface (v4)
Add an interface for enumerating PCI devices on
a system.

v3: switch to udev/sysfs for the enumeration
v4: fix warnings

Signed-off-by: Frank Min <frank.min@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-05-26 12:34:38 -04:00
Emil Velikov e2b531866f man: rework the Makefile.am
Remove GNU make specific constructs and take into consideration that
Solaris man 7 is not the same as Linux man 7.

This commit introduces a dependency of xorg-macros 1.12 (released 4+
years ago) which is used to handle the above man section discrepancies.

Cc: Niveditha Rau <niveditha.rau@oracle.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28 11:21:10 +01:00
Emil Velikov 9f90ee9cdf automake: wrap an insanely long line
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-10 17:50:49 +00:00
Emil Velikov 4c6b1b1a82 autotools: add WARN_CFLAGS to all targets
... minus test/ttmtest. The latter is not really hooked up with the
actual build.

This will give us 66 warnings on a distribution build of which
 - 12 -Wunused-variable
 - 11 -Wunused-function
 - 19 -Wmissing-prototypes
and a few -Wswitch-enum, -Wtype-limits etc.

Adding the CFLAGS gives some exposure to these so that we can fix them.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27 15:51:24 +00:00
Emil Velikov 0dec5e14cf autotools: add AM_DISTCHECK_CONFIGURE_FLAGS
To make sure that the release/distribution tarball is not broken for all
the targets. Currently the experimental APIs are disabled by default
amongst others.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27 15:49:20 +00:00
Thierry Reding d6a4c2cbd1 libdrm: Add NVIDIA Tegra support
Add the libdrm_tegra helper library to encapsulate Tegra-specific
interfaces to the DRM.

Furthermore, Tegra is added to the list of supported chips in the
modetest and vbltest programs.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-27 17:05:35 +01:00
Emil Velikov 268dce4192 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>
2014-09-28 17:09:34 +01:00
Emil Velikov f52309ebbe 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>
2014-09-28 17:09:33 +01:00
Emil Velikov deb690f78d 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>
2014-09-28 17:09:33 +01:00
Emil Velikov 98ec08d836 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>
2014-09-28 17:09:33 +01:00
Emil Velikov 4255d3d51d libdrm, freedreno, intel, nouveau, radeon: add Makefile.sources
Will be used to consolidate the required sources lists as well as the
install-able headers. This is turn will help us to avoid the
duplication with the upcoming Android build support.

v2: Rename the headers variable to *_H_FILES.
v3: Rebase on top of symbol visibility patches.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-09-01 16:06:01 +01:00
Thierry Reding 5d8357976a configure: Support symbol visibility when available
Checks whether or not the compiler supports the -fvisibility option. If
so it sets the VISIBILITY_CFLAGS variable which can be added to the per
directory AM_CFLAGS where appropriate.

By default all symbols will be hidden via the VISIBILITY_CFLAGS. The
drm_public macro can be used to mark symbols that should be exported.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-07-30 16:58:14 +02:00
Eric Anholt 734de7093d drm: Initialize or valgrind-clear modesetting ioctl arguments.
Fixes valgrind complaints in the modesetting driver.  I tried to
follow each ioctl's pattern for whether it was initializing just the
in values, or both in and out values.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-01-20 10:58:06 -08:00
Rob Clark 41fc2cc8a9 freedreno: add freedreno DRM
The libdrm_freedreno helper layer for use by xf86-video-freedreno,
fdre (freedreno r/e library and tests for driving gpu), and eventual
gallium driver for the Adreno GPU.  This uses the msm gpu driver
from QCOM's android kernel tree.

Note that current msm kernel driver is a bit strange.  It provides a
DRM interface for GEM, which is basically sufficient to have DRI2
working.  But it does not provide KMS.  And interface to 2d and 3d
cores is via different other devices (/dev/kgsl-*).  This is not
quite how I'd write a DRM driver, but at this stage it is useful for
xf86-video-freedreno and fdre (and eventual gallium driver) to be
able to work on existing kernel driver from QCOM, to allow to
capture cmdstream dumps from the binary blob drivers without having
to reboot.  So libdrm_freedreno attempts to hide most of the crazy.
The intention is that when there is a proper kernel driver, it will
be mostly just changes in libdrm_freedreno to adapt the gallium
driver and xf86-video-freedreno (ignoring the fbdev->KMS changes).

So don't look at freedreno as an example of how to write a libdrm
module or a DRM driver.. it is just an attempt to paper over a non-
standard kernel driver architecture.

v1: original
v2: hold ref's to pending bo's (because qcom's kernel driver doesn't),
    various bug fixes, add ringbuffer markers so we can emit IB's to
    portion of ringbuffer (so that gallium driver can use a single
    ringbuffer for both tile cmds and draw cmds.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-02-14 12:13:15 -05:00
Maarten Lankhorst f9a9311c5e libdrm: remove DISTCHECK_CONFIGURE_FLAGS
I'm fairly sure the extra flags it specifies no longer exist, so
there is no point in keeping it. It only adds a warning when
running make distcheck.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2013-02-05 14:14:01 +01:00
David Herrmann 08cb5c1d02 man: fix manpage build instructions
This fixes all the out-of-tree build-failures with manpages and uses a
.man_fixup file to avoid overriding man-pages on every build.

Manpages are only built if xsltproc is found and the stylesheets are
available locally. You can disable building manpages with
--disable-manpages so the quite expensive xsltproc procedure can be
skipped.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-16 10:59:14 -08:00
Jesse Barnes 1dbd873700 man: disable man page building until David saves us all
I must have botched something in the push of the xml switchover, since I
now get errors when building the pages and aliases.  Just disable for
now.
2013-01-09 17:28:41 -08:00
Jesse Barnes 2426a6a711 libdrm: man page infrastructure and a few sample man pages 2012-09-17 08:07:04 -07:00
Inki Dae e07b650662 libdrm: add exynos drm support
this patch adds libdrm_exynos helper layer that inclues some intefaces
for exynos specific gem and virtual display driver and also adds exynos
module name to modtest and vbltest.

Changelog v2:
- fixed exynos broken ioctl.
  the pointer of uint64_t *edid should be removed.
- removed unnecessary definitions.
- added drm prime interfaces.
  this feature is used to share a buffer between drivers or memory managers
  and for this, please, refer to below links:
	http://www.mjmwired.net/kernel/Documentation/dma-buf-sharing.txt
	http://lwn.net/Articles/488664/

this patch is based on a link below:
	git://anongit.freedesktop.org/mesa/drm
	commit id: d72a44c7c4

Reviewed-by: Rob Clark <rob@ti.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Rob Clark <rob@ti.com>
2012-05-12 10:04:54 -05:00
Rob Clark ef1b958cc8 omap: add omapdrm support
This adds libdrm_omap helper layer (as used by xf86-video-omap,
omapdrmtest, etc).

Signed-off-by: Rob Clark <rob@ti.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
[danvet: pushed for Rob, he doesn't yet have commit access.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-03-28 23:00:14 +02:00
Javier Jardón fd3ed34a20 build: Update autotools configuration
Replace some deprecated autoconf macros and use the new libtool
syntax
2011-03-21 13:43:43 +00:00
Pauli Nieminen 21105bc186 libdrm: Move intel_atomic.h to libdrm core for sharing.
intel_atomic.h includes very usefull atomic operations for
lock free parrallel access of variables. Moving these to
core libdrm for code sharing with radeon.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2010-03-17 11:48:00 +02:00
Jakob Bornecrantz 8c0571a733 libkms: Add libkms 2009-12-04 16:11:55 +01:00
Kristian Høgsberg bef7f88de9 Enable experimental APIs for distcheck 2009-12-03 11:27:16 -05:00
Kristian Høgsberg 4f070d593c Install kernel headers in ${includedir}/drm 2009-11-20 19:46:34 -05:00
Kristian Høgsberg e8523e087f Drop stale TODO and unused ChangeLog 2009-11-17 11:15:56 -05:00
Kristian Høgsberg 4f57abfe66 Move libdrm/ up one level 2009-11-17 11:15:06 -05:00
Kristian Høgsberg a66cf9ce68 Use headers copied from kernel instead of shared-core 2009-11-17 10:54:11 -05:00
Kristian Høgsberg 2b42af9a2f Copy headers from kernel v2.6.32-rc6-130-g5b8f0be 2009-11-17 10:54:07 -05:00
Kristian Høgsberg a99680384a Add makefile rule to copy headers from kernel tree 2009-11-17 09:23:52 -05:00
Julien Cristau 89cc98c0d5 Only install libdrm_intel.pc if we build libdrm_intel 2009-11-05 15:49:09 +00:00
Eric Anholt a773ce1db8 Add libdrm_intel.pc by popular demand. 2009-02-23 13:30:44 -08:00
Eric Anholt d7cf298e54 Add some trivial regression tests, one of which fails. 2007-07-19 04:59:59 -07:00
Adam Jackson 017174085f Fix silly install issue by moving the header install rules for shared-core
into shared-core/Makefile.am. Bump to 1.0.3.
2005-08-20 03:32:09 +00:00
Adam Jackson 07d23f9c60 autoconfiscate libdrm 2005-07-10 22:42:42 +00:00