Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
This test will attempt to use the VIC to blit from one surface to
another.
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
This test will attempt to use VIC to clear a surface.
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
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>
|
|
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
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>
|
|
These helpers facilitate exporting and importing buffer objects to and
from PRIME file descriptors.
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
Add helpers to export and import buffer objects via flink names.
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
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
|
|
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
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
|
|
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
|
|
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
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>
|
|
These are handy to test alpha blending, so include them in the list of
supported formats.
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
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>
|
|
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>
|
|
Fixes memory leaks.
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: James Zhu <James.Zhu@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
|
|
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
|
|
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
|
|
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
|
|
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>
|