summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-05-04tests: tegra: Add VIC flip testHEADmasterThierry Reding3-2/+367
This test will attempt to use the VIC to blit one surface to another and perform a vertical flip. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-04tests: tegra: Add VIC blit testThierry Reding3-2/+375
This test will attempt to use the VIC to blit from one surface to another. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-04tests: tegra: Add VIC clear testThierry Reding3-2/+205
This test will attempt to use VIC to clear a surface. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02tests: tegra: Add syncpt-wait testThierry Reding3-2/+153
This is a very simple sanity test to check whether or not a syncpt can be incremented by a host1x client. This uses gr2d on Tegra20 through Tegra114 and VIC on Tegra124 and later. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02tegra: tests: Add VIC04 supportThierry Reding4-1/+532
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02tests: tegra: Add VIC03 supportThierry Reding5-1/+786
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02tests: tegra: Add VIC supportThierry Reding7-2/+334
Implement a small abstraction interface to allow different versions of VIC to be used transparently. An operations structure is selected based on the VIC version number reported by the DRM_TEGRA_IOCTL_OPEN_CHANNEL IOCTL. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02tegra: Add PRIME support helpersThierry Reding2-0/+65
These helpers facilitate exporting and importing buffer objects to and from PRIME file descriptors. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02tegra: Add flink helpersThierry Reding2-0/+53
Add helpers to export and import buffer objects via flink names. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02tegra: Extract common buffer object allocation codeThierry Reding1-14/+23
All of the buffer object allocation functions use the same boilerplate code. Move that code into a separate function that can be reused. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02tegra: Add API to wait for job completionThierry Reding3-39/+159
The API uses fences emitted by the job submission to wait for the completion of the job. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02tegra: Allow channels to return a versionThierry Reding3-0/+8
When opening a channel, allow a version number to be returned so that userspace can parameterize based on it, rather than having to guess a version from the environment. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02WIP: tegra: Update for de-staged ABIThierry Reding10-347/+719
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02tegra: Add gr2d-fill testThierry Reding4-2/+161
This test uses the IOCTLs for job submission and fences to fill a sub- region of the screen to a specific color using gr2d. Signed-off-by: Thierry Reding <treding@nvidia.com> --- Changes in v2: - free framebuffer when done
2018-05-02tegra: Install tegra-openclose testThierry Reding3-3/+11
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02tegra: Add helper library for testsThierry Reding6-2/+541
This library provides helpers for common functionality needed by test programs. Signed-off-by: Thierry Reding <treding@nvidia.com> --- Changes in v3: - fix libdrm-test.la link failure Changes in v2: - fix a couple of memory leaks and get rid of some unneeded code
2018-05-02tegra: Add channel, job, pushbuf and fence APIsThierry Reding9-1/+704
These functions can be used to open channels to engines, manage job submissions, create push buffers to store command streams in and wait until jobs have been completed. Signed-off-by: Thierry Reding <treding@nvidia.com> --- Changes in v2: - automatically allocate buffer objects as required by pushbuffers - pushbuffers can now have more than one associated buffer object - add drm_tegra_pushbuf_prepare() function
2018-05-02tegra: Indent according to .editorconfigThierry Reding4-212/+212
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02etnaviv: Avoid dereferencing type-punned pointerThierry Reding1-2/+3
Use proper types directly rather than casts to avoid warnings from GCC about potentially breaking strict-aliasing rules: etnaviv/etnaviv_bo.c: In function 'lookup_bo': etnaviv/etnaviv_bo.c:71:2: warning: dereferencing type-punned pointer might break strict-aliasing rules [-Wstrict-aliasing] if (!drmHashLookup(tbl, handle, (void **)&bo)) { ^~ Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02freedreno: Avoid dereferencing type-punned pointerThierry Reding1-2/+3
Use proper types directly rather than casts to avoid warnings from GCC about potentially breaking strict-aliasing rules: freedreno/freedreno_bo.c: In function 'lookup_bo': freedreno/freedreno_bo.c:51:2: warning: dereferencing type-punned pointer might break strict-aliasing rules [-Wstrict-aliasing] if (!drmHashLookup(tbl, key, (void **)&bo)) { ^~ Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02libsync: Remove spurious blank lineThierry Reding1-1/+0
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02tests: kms: Add planes blending testThierry Reding2-0/+347
Note that this is kind of Tegra specific right now since it assumes the existence of three planes and that the planes are in the Tegra Z-order, which means the first plane is lowest and the third plane is highest. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02tests: kms: Support various formats with alpha componentsThierry Reding1-0/+8
These are handy to test alpha blending, so include them in the list of supported formats. Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02nouveau: Add noop test programThierry Reding2-2/+132
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-02nouveau: Support fence FDsThierry Reding3-34/+133
Add a new nouveau_pushbuf_kick_fence() function that takes and emits a sync fence FD. The fence FD can be waited on, or merged with other fence FDs, or passed back to the kernel as a prerequisite for a subsequent HW operation. Based heavily on work by Lauri Peltonen <lpeltonen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-01intel: add support for ICL 11Paulo Zanoni3-2/+31
Add the PCI IDs and the basic code to enable ICL. This is the current PCI ID list in our documentation. Kernel commit: d55cb4fa2cf0 ("drm/i915/icl: Add the ICL PCI IDs") v2: Michel provided a fix to IS_9XX that was broken by rebase bot. v3: Fix double definition of PCI IDs, update IDs according to bspec and keep them in the same order and rebase (Lucas) Cc: Michel Thierry <michel.thierry@intel.com> Reviewed-by: Michel Thierry <michel.thierry@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2018-04-27amdgpu: Deinitialize vamgr_high{,_32}Michel Dänzer1-0/+2
Fixes memory leaks. Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
2018-04-24Intel: Add a Kaby Lake PCI IDMatt Atwood1-2/+4
Based on kernel commit '672e314b21dc ("drm/i915/kbl: Add KBL GT2 sku")' v2: name change M -> ULX, add enumeration in KBL ULX v3: add entry to IS_KABYLAKE Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2018-04-19amdgpu: enlarge the maximum number of cards supportedXiaojie Yuan1-1/+1
128 is the maximum number of cards that the kernel can support at the moment. Change-Id: I155b7b21635306d8ecc440b85fb8954501ab5599 Signed-off-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2018-04-06tests/amdgpu: add vce mv tests support and setsJames Zhu2-3/+235
Signed-off-by: James Zhu <James.Zhu@amd.com> Acked-by: Leo Liu <leo.liu@amd.com>
2018-04-03libdrm: gralloc_handle.h: Fix build issue with AndroidJohn Stultz1-1/+1
In trying to integrate the new gralloc_handle.h with the drm_hwcomposer, I started seeing the following compilation errors: In file included from external/drm_hwcomposer/platformdrmgeneric.cpp:28: external/libdrm/android/gralloc_handle.h:108:9: error: cannot initialize return object of type 'native_handle_t *' (aka 'native_handle *') with an lvalue of type 'struct gralloc_handle_t *' return handle; ^~~~~~ 1 error generated. This seems to be due to the gralloc_handle_create() definition needs to return a native_handle_t * type, rather then a gralloc_handle_t *, which is what the code actually returns. After talking w/ Rob Herring, having the code return the native handle should be the proper fix, so that is what this patch changes. Cc: Chih-Wei Huang <cwhuang@android-x86.org> Cc: Stefan Schake <stschake@gmail.com> Cc: Robert Foss <robert.foss@collabora.com> Cc: Sean Paul <seanpaul@google.com> Cc: Rob Herring <robh@kernel.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2018-03-30headers: Update READMEDaniel Stone1-5/+1
Nouveau has made a very deliberate choice to hide its actual kernel ABI behind libdrm. i915 is no longer out of date. Signed-off-by: Daniel Stone <daniels@collabora.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
2018-03-30headers: Sync with drm-nextDaniel Stone8-26/+451
Taken from the drm-next pull for 4.17-rc1 (694f54f680f7), and manually reconciled: core: - Dropped DRM_MODE_TYPE_ALL and DRM_MODE_FLAG_ALL; these are purely internal details of the bits accepted by the currently running kernel, and can not be generally relied on by userspace - Add HDCP flags - Note CTM entry representation is sign-magnitude format, not two's-complement amdgpu: - Add QUERY_STATE2 context op - Add VCN firmware version query etnaviv: - Add more GPU feature flags i915: - Add caps, params and ioctls for PMU / perf-stream - Add support for explicit fencing nouveau: - Add TILE_COMP layout vc4: - Add perfmon ioctls virtgpu: - Add capset-fix param vmware: - Add handle-close ioctl and explicit-fencing support Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2018-03-30headers: sync up amdgpu_drm.h with drm-nextRex Zhu1-0/+4
Add sensor_info type AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_MCLK AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_SCLK Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
2018-03-28Revert "libdrm: intel/Android.mk: Filter libdrm_intel library requirements ↵Emil Velikov1-2/+0
on x86/x86_64" This reverts commit ed07718ae7bab596297abf210bb0c37c6dba58ed. The commit added a guard since libpciaccess may be missing on some setups. As of last commit there are no traces of the project, from Android POV. Hence, we can revert this workaround - which caused similar breakage to the one it's trying to fix. This time in Mesa. Cc: Rob Herring <rob.herring@linaro.org> Acked-by: John Stultz <john.stultz@linaro.org>
2018-03-28intel: Do not use libpciaccess on AndroidTomasz Figa2-2/+13
This patch makes the code not rely anymore on libpciaccess when compiled for Android to eliminate ioperm() and iopl() syscalls required by that library. As a side effect, the mappable aperture size is hardcoded to 64 MiB on Android, however nothing seems to rely on this value anyway, as checked be grepping relevant code in drm_gralloc and Mesa. Cc: Rob Herring <rob.herring@linaro.org> Signed-off-by: Tomasz Figa <tfiga@google.com> [Emil Velikov: rebase against master. add missing __func__, Eric] Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: John Stultz <john.stultz@linaro.org>
2018-03-22xf86drmMode: merge successive mutually-exclusive #ifsEric Engestrom1-2/+1
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-22libdrm: Use readdir instead of readdir_r to avoid build warningsJohn Stultz1-19/+3
Building libdrm under AOSP, we see the following build warning: external/libdrm/xf86drm.c:2861:12: warning: 'readdir_r' is deprecated: readdir_r is deprecated; use readdir instead [-Wdeprecated-declarations] while (readdir_r(sysdir, pent, &ent) == 0 && ent != NULL) { ^ Building on Linux with glibc produces the same warning. Thus, this patch replaces readdir_r with readdir. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102031 Cc: Robert Foss <robert.foss@collabora.com> Cc: Rob Herring <robh@kernel.org> Cc: Stefan Schake <stschake@gmail.com> Cc: John Stultz <john.stultz@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> [Emil Velikov: remove unused variables, Eric] Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2018-03-22android: Add missing include exportsStefan Schake1-1/+3
They were set for the static library but not the shared variant. Signed-off-by: Stefan Schake <stschake@gmail.com> Acked-by: John Stultz <john.stultz@linaro.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-22omap: add Android build supportGowtham Tammana1-0/+13
Add Android.mk file to build libdrm_omap library. Signed-off-by: Gowtham Tammana <g-tammana@ti.com> Signed-off-by: Andrew F. Davis <afd@ti.com>
2018-03-22libdrm: amdgpu: Adding DRM_RDWR flag in amdgpu_bo_exportSatyajit1-2/+3
Currently while exporting prime handle to fd read write access is not granted. mmap fails because of this. mmap was not supported on prime initially. Here is link to related discussion https://lists.freedesktop.org/archives/dri-devel/2017-February/131840.html Adding the DRM_RDWR flag in amdgpu_bo_export to support mmap. Signed-off-by: Satyajit <satyajit.sahu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2018-03-20meson: drop unnecessary variableEric Engestrom1-2/+1
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-20meson: move line to allow using `config` earlierEric Engestrom1-2/+2
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-20meson: drop unneeded dependency to libudevEric Engestrom1-7/+1
libdrm only needed libudev for a few days 3 years ago, between fde4969176822fe54197 and its revert 5b0e76f143887c4ec7db. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-20meson,configure: include config.h automaticallyEric Engestrom96-370/+3
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-20meson: replace `if(compiles) have=true` with `have=compiles`Eric Engestrom1-3/+2
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-03-20meson,configure: always define UDEVEric Engestrom3-5/+7
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-03-20meson,configure: always define HAVE_VISIBILITYEric Engestrom3-5/+6
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-03-20meson,configure: always define HAVE_OPEN_MEMSTREAMEric Engestrom3-6/+6
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-03-20tests: fix memory leak issueInki Dae1-3/+6
Fixed memory leak issue to drmModeRes and drmModePlaneRes objects. These objects were allocated by drmModeGetResources and drmModeGetPlaneResources functions but not freed properly. So this patch frees them by calling drmModeFreeResources drmModeFreePlaneResources functions at failure case. Signed-off-by: Inki Dae <inki.dae@samsung.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>