summaryrefslogtreecommitdiff
path: root/tegra
AgeCommit message (Collapse)AuthorFilesLines
2024-04-10include poll.h instead of sys/poll.hDavid Heidelberg1-1/+1
Fixes: f803a45e7442 ("add libsync.h helper") Fixes: 4c18828e16f0 ("tegra: Add job and push buffer APIs") Signed-off-by: David Heidelberg <david@ixit.cz>
2024-03-29meson: Replace usages of deprecated ExternalProgram.path()Joaquim Monteiro1-1/+1
!347 fixed some of these, but not all. Signed-off-by: Joaquim Monteiro <joaquim.monteiro@protonmail.com>
2023-02-10meson: drop pthread-stubs dependency on BSDsJan Beich1-1/+1
pthread-stubs >= 0.4 simply passes -pthread which is similar to what dependency('threads') returns. And make it a private dependency for subprojects even on Linux. Reviewed-by: Emmanuel Vadot <manu@FreeBSD.org>
2022-02-23tests: tegra: Add VIC 3.0 supportThierry Reding1-0/+6
The Video Image Composer (VIC) 3.0 can be found on NVIDIA Tegra124 SoCs. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23tegra: Add syncpoint APIsThierry Reding7-1/+201
These new functions can be used to allocate and free syncpoints, as well as wait for a syncpoint threshold to be reached. Jobs can also be waited on if a syncpoint was attached to them. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23tegra: Add job and push buffer APIsThierry Reding6-1/+374
These new functions can be used to create a job on a given channel, add commands to the job using its push buffer and submit the job. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23tegra: Add channel APIsThierry Reding5-1/+247
These new functions can be used to open a channel to a given engine, map and unmap buffer objects to that channel, and close the channel. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23tegra: Include private.h in list of source filesThierry Reding1-1/+6
This makes sure that the proper dependencies are created and that the file is distributed. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23tegra: Make API more consistentThierry Reding2-11/+12
Most functions in libdrm_tegra take as first parameter the object that they operate on. Make the device and buffer object creation functions follow the same scheme. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23tegra: Add PRIME support helpersThierry Reding3-0/+67
These helpers facilitate exporting and importing buffer objects to and from PRIME file descriptors. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23tegra: Add flink helpersThierry Reding3-0/+55
Add helpers to export and import buffer objects via flink names. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23tegra: Fix mmap() of GEM buffer objectsThierry Reding2-3/+3
Store 64-bit offset values and use libdrm's built-in drm_mmap() function instead of mmap() to ensure the full 64-bit offset is used. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23tegra: Extract common buffer object allocation codeThierry Reding1-13/+22
All of the buffer object allocation functions use the same boilerplate code. Move that code into a separate function that can be reused. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23tegra: Remove unused IOCTL implementationsThierry Reding3-111/+0
The DRM_TEGRA_GEM_{GET,SET}_FLAGS and DRM_TEGRA_GEM_{GET,SET}_TILING IOCTLs were badly designed and have since been obsoleted by framebuffer modifiers. Remove these implementations to make it clear their usage is discouraged. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-23tegra: Indent according to .editorconfigThierry Reding3-187/+191
Reindent the sources according to the settings found in the newly added .editorconfig. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-01-20meson: use the modern interface for pkg.generateDylan Baker1-3/+1
This produces no differences in the generated output. I've had to manually add `requires : 'libdrm'` to libdrm_intel, otherwise libdrm ends up in `Requires.private` instead of `Requires`. Signed-off-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-20meson: switch the meson builtin for symbol visiblityDylan Baker1-0/+1
This allows meson to check if the compiler supports gnu style symbol visibility, and apply the appropriate flags as necessary, rather than us adding them by hand Signed-off-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Simon Ser <contact@emersion.fr>
2021-12-14meson: add override_dependency when possibleDylan Baker1-0/+4
This allows consumers of libdrm as a subproject to use the simpler `dependency('libdrm', fallback : 'libdrm')` syntax, as the libdrm build files already tell meson that they override a dependency called "libdrm". Signed-off-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Simon Ser <contact@emersion.fr>
2021-10-06tegra: use drmCloseBufferHandleSimon Ser1-5/+1
Instead of manually calling drmIoctl, use the equivalent function from libdrm core. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2021-03-09meson: use library() instead of shared_library().Fang Tan1-1/+1
This allows users to select the library type (static or shared) using the Meson -Ddefault_library built-in option. Issue: https://gitlab.freedesktop.org/mesa/drm/-/issues/45 Reviewed-by: Simon Ser <contact@emersion.fr> Signed-off-by: Fang Tan <tanfang@uniontech.com>
2019-11-11tegra: convert to new symbols checkEric Engestrom3-39/+20
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
2019-10-18Revert "Revert "libdrm: remove autotools support""Eric Engestrom1-27/+0
The external tooling issue has been fixed, so we can delete autotools again :)
2019-10-16Revert "libdrm: remove autotools support"Marek Olšák1-0/+27
This reverts commit f057dc91e93ae21e11ab48a26127d569972f3eae.
2019-10-14libdrm: remove autotools supportEric Engestrom1-27/+0
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-04*-symbols-check: let meson figure out how to execute the scriptsEric Engestrom1-2/+2
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
2019-10-04*-symbols-check: use normal shell over bashEmil Velikov1-1/+1
None of the tests are bash specific. Tested with bash, zsh, dash, mksh and ksh. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Niclas Zeising <zeising@daemonic.se> Reviewed-by: Niclas Zeising <zeising@daemonic.se> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-10-04*-symbols-check: error out when using unset variablesEmil Velikov1-0/+2
It will make bugs like the one fixed with previous patch dead obvious. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-10-04automake: set NM before running the testsEmil Velikov1-0/+1
Set/export the NM variable since it may not be set already. Fixes: 4f08bfe96da ("*-symbol-check: Don't hard-code nm executable") Cc: Heiko Becker <heirecka@exherbo.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-09-19autotools: make symbols hidden by defaultLucas De Marchi1-1/+2
Now that symbols that should be exported are annotated accordingly, make all the rest hidden by default. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Eric Engestrom <eric.engestrom@intel.com>
2018-09-19meson: make symbols hidden by defaultLucas De Marchi1-1/+1
Now that symbols that should be exported are annotated accordingly, make all the rest hidden by default. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-09-19tegra: annotate public functionsLucas De Marchi1-13/+13
while read sym; do read f func line _ <<<$(cscope -d -L -1 $sym) if [ ! -z "$f" ]; then sed -i "${line}s/^/drm_public /" $f fi done < /tmp/a.txt In which /tmp/a.txt contains the public symbols from tegra-symbol-check. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Eric Engestrom <eric.engestrom@intel.com>
2018-03-20meson,configure: include config.h automaticallyEric Engestrom1-4/+0
This will prevent any more missing `#include "config.h"` bug, at the cost of having to recompile some files that didn't need to be when changing build options. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-09meson: use pkg-config to detect libatomic_opsEric Engestrom1-1/+1
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-23*-symbol-check: Don't hard-code nm executableHeiko Becker2-1/+2
Helpful if your nm executable has a prefix based on the architecture, for example. Signed-off-by: Heiko Becker <heirecka@exherbo.org> Cc: Timo Gurr <timo.gurr@gmail.com> [Eric: v2: rebase and add Meson support] Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-01-12Add meson build systemDylan Baker1-0/+52
This patch adds a complete meson build system, including tests and install. It has the necessary hooks to allow it be used as a subproject for other meson based builds such as mesa. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-and-tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-04-03tegra: update symbol-checkErik Faye-Lund1-2/+5
I get a few more symbols in my build tegra-libraries, so let's include these in the whitelist as well. While we're at it, update the comment at the top. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2015-04-28drm: remove drm_public macroEmil Velikov1-13/+0
Some compilers (like the Oracle Studio), require that the function declaration must be annotated with the same visibility attribute as the definition. As annotating functions with drm_public is no longer required just remove the macro. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: remove no longer needed VISIBILITY_CFLAGSEmil Velikov1-1/+0
With earlier commits we've annotated the private symbols, thus we no longer require the -fvisibility=hidden CFLAGS. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: rename libdrm{,_macros}.hEmil Velikov1-1/+1
Provide a more meaningful name, considering what it does. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28tegra: add symbols testEmil Velikov2-0/+33
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-11-27tegra: Implement drm_tegra_bo_{get,set}_tiling()Thierry Reding2-0/+61
These two functions are simple wrappers around the corresponding IOCTLs and operate on drm_tegra_bo objects. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-27tegra: Implement drm_tegra_bo_{get,set}_flags()Thierry Reding2-0/+49
These two functions are simple wrappers around the corresponding IOCTLs and operate on drm_tegra_bo objects. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-27libdrm: Add NVIDIA Tegra supportThierry Reding6-0/+381
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>