Commit Graph

6335 Commits (2fa58c77fb9e563219f8ec647b9ddf52f3390ed2)

Author SHA1 Message Date
Adam Jackson a2fa2e0869 Fix stray caller of drmCompareDevices
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-05-04 15:57:14 -04:00
Adam Jackson 7040fea028 configure: Fix the <sys/sysmacros.h> check
AC_HEADER_MAJOR only defines MAJOR_IN_SYSMACROS if major() is _not_
defined by <sys/types.h> alone. It is, but it warns, and that's ugly.
To fix this, push -Werror into CFLAGS when invoking AC_HEADER_MAJOR so
the warning makes the compilation test fail.

Reviewed-by: Emil Velikov <emil.velilkov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-05-04 14:36:55 -04:00
Adam Jackson 7c27cd7c5d Export drmDevicesEqual
drmCompareBusInfo was almost this already, but it wasn't exported, its
name didn't match its functionality, and while it almost looks like it
was usable for sorting due to memcmp it wouldn't work if you had
multiple bus types. I don't really want to think about defining a
sensible sort order for bus types, so let's at least make it less of a
trap for the caller.

Invert its boolean sense to be 'true if equal', rename it to describe
the types it actually operates on, and export.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velilkov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-05-04 14:36:25 -04:00
Edward O'Callaghan 00aa2c1881 amdgpu: Use the canonical form in branch predicate
Suggested-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-03 21:36:02 +10:00
Eric Anholt 2ee1fd2470 Add the DPI encoder/connector types to KMS utils.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-04-25 16:10:38 -07:00
Eric Anholt d75a7ef1d7 Add pl111 as a KMS driver for utils.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-04-25 16:10:33 -07:00
Ilia Mirkin 691a215799 modetest: fix printing of fourcc on BE machines
fourcc is not a string, it's a packed integer. This happens to work out
on LE, but gets reversed on BE.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2017-04-19 23:25:43 -04:00
Edward O'Callaghan 7cfcd5ef4b amdgpu/: concisely && consistently check null ptrs in canonical form
Be consistent and use the canonical form while sanity checking
null pointers, also combine a few branches for brevity.

v2: rebase on top of 'add amdgpu_cs_wait_fences' series.

Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-04-19 18:08:10 +10:00
Nicolai Hähnle 90c304584a amdgpu: add a test for amdgpu_cs_wait_fences
Signed-off-by: monk.liu <Monk.Liu@amd.com>
[v2: actually hook up the test case]
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-04-18 21:05:48 +02:00
Nicolai Hähnle d8d45a4938 amdgpu: add the interface of waiting multiple fences
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
[v2: allow returning the first signaled fence index]
Signed-off-by: monk.liu <Monk.Liu@amd.com>
[v3:
 - cleanup *status setting
 - fix amdgpu symbols check
v4: simplify return from amdgpu_cs_wait_fences (suggested
    by Edward O'Callaghan)]
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com> (v1)
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> (v1)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-04-18 21:05:00 +02:00
Rob Clark f45853802e freedreno: fix double-free on exit
Fixes: a07ae97 ("freedreno: fix device close issues")
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2017-04-15 14:43:17 -04:00
Christian Gmeiner f02719c524 configure.ac: bump version for release
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-04-15 00:45:57 +02:00
Philipp Zabel 2f902a6844 etnaviv: add fence fd support
Add etna_cmd_stream_flush2 with in-fence fd and out-fence fd support for
explicit fencing.

v3: added etna_cmd_stream_flush2 to etnaviv/etnaviv-symbol-check

v2: renamed etna_cmd_stream_flush_explicit to etna_cmd_stream_flush2

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2017-04-12 11:58:38 +02:00
Philipp Zabel 26e51e413b etnaviv: sync uapi header
Import the etnaviv header changes from kernel commits 9ad59fea162c
("drm/etnaviv: submit support for in-fences") and 78ec187f64fa
("drm/etnaviv: submit support for out-fences") for fence fd support.

The drm_etnaviv_gem_submit structure was extended to include a flags
field, new flags for in-fence and out-fence fds and an input/output
fence fd field.

This is one-way backwards compatible because old userspace code passing
a short structure not including the flags field to new kernels will
cause the remaining fields to be zero-filled. New userspace code must
make sure to only pass the short structure to old kernels, though.

Not generated using make headers_install, since the drm/etnaviv_drm.h
uapi header is not installed yet by the kernel.
Copied from the airlied/drm-next commit 78ec187f64fa.

v2: improved commit message

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2017-04-12 11:58:33 +02:00
Eric Engestrom 3f1df25e0b intel: remove dead code
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
2017-04-10 17:17:12 +01:00
Tobias Jakobi 47521438eb exynos: add C++ support to exynos_drmif header
Add the usual extern "C" when compiling in C++ mode.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-04-08 21:33:30 +01:00
Marek Olšák c9c77c3717 configure.ac: bump version for release 2017-04-08 21:58:46 +02:00
Samuel Pitoiset 047aba1697 amdgpu: allow to query GPU sensor related information
This exposes amdgpu_query_sensor_info().

v2: - add amdgpu_query_sensor_info() to the symbols list

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-07 17:58:54 +02:00
Daniel Stone 1142f9b30f configure.ac: bump version for release 2017-04-07 09:10:15 +01:00
Ander Conselvan de Oliveira 890d43a6a8 Add CRTC ID to vblank event
When using the atomic API, one request can span multiple CRTCs, however
one event is generated per CRTC. As we cannot disambiguate the CRTC with
user data (since we only have one piece of user data to pass in), newer
kernels can include the CRTC ID in the page flip event.

Add a new vfunc to dispatch vblank events carrying a CRTC ID to clients
who negotiate a higher interface version.

[daniels: Rebased, include new cap, call page_flip_handler if it is set
          but page_flip_handler2 isn't even on newer contexts, write a
	  commit message.]

v2: Split into separate commit.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@intel.com>
2017-04-06 20:32:43 +01:00
Daniel Stone e379c6a137 Headers: Sync drm{,_mode}.h with the kernel
Generated using make headers_install, based on drm-misc-next commit
5db06a8a98f515f67446a69c57577c4c363ec65d.

This clarifies the comments around modifiers such that they are
per-framebuffer rather than per-plane, adds the beginnings of aspect
ratio mode flags, link status properties, and updates the 'reserved'
field from vblank events to include the CRTC ID.

v2: Split into separate patch, pull in full kernel changes.
v3: Undo revert of connector-type enums, since it is not actually
    harmful.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-06 20:32:43 +01:00
Emil Velikov 0010d312db configure.ac: pthread-stubs is not a thing on GNU/kFreeBSD
As mentioned on the xcb mailing list, the platform uses the GLIBC
forwarding mechanism.

https://lists.freedesktop.org/archives/xcb/2016-November/010896.html

Reported-by: Andreas Boll <andreas.boll.dev@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2017-04-05 18:11:25 +01:00
Eric Engestrom 10ca5e13a8 man: fix bug report instructions (third time's the charm)
Compile- and run-tested this time.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-04-04 18:07:29 +01:00
Eric Engestrom 294be2616e man: fix bug report instructions (for real this time)
/me derped, component libdrm doesn't exist under Mesa because it's in DRI.
While at it, give the full URL and make it https.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-04-04 17:38:38 +01:00
Eric Engestrom 33312e42a7 man: fix bug report instruction
Component "libdrm" doesn't exist (anymore?)

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-04-04 17:09:04 +01:00
Eric Engestrom 64423a7036 man/drm(7): fix typo
Reported-by: Oliver Kisielius <oliver.kisielius@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100559
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-04-04 17:00:23 +01:00
Marek Olšák e61e999838 configure.ac: bump the version to 2.4.77 2017-04-04 11:36:00 +02:00
Emil Velikov 6312017266 configure.ac: bring back pthread-stubs check
Accidentally removed with earlier commit. Although rather than simply
adding the check for all platforms, use the same heuristics as we do in
mesa.

Namely: pthread-stubs is a thing only for BSD platforms. Everyone else
should have lightweight pthread API in their C runtime library.

Fixes: 4ecd1ef010 ("xf86drm: fix null termination of string buffer")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2017-04-03 18:01:49 +01:00
Bernd Kuhls 6796859fcc tests/etnaviv: link against libdrm
Fixes link errors detected by buildroot autobuilders:

http://autobuild.buildroot.net/results/68a/68af62f4ab6944d326468818562c05fd5cc55b03/build-end.log

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100530
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 17:57:22 +01:00
Erik Faye-Lund e5053343de tegra: update symbol-check
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>
2017-04-03 17:51:13 +01:00
Rob Herring 51a514c43f Android: disable pointer-arith and enum-conversion
Disable some more warnings from clang. These don't appear to be warnings
worth fixing.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 17:46:06 +01:00
Rob Herring c4d673acdc Android: fix building of modetest and proptest
These tests depend on tests/util/ headers, but expect the include path
to be tests/.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 17:46:06 +01:00
Seung-Woo Kim 7b806e8789 xf86drm: remove memory leaks in drmGetBusid/drmGetReservedContextList
In error path of drmGetBusid() and drmGetReservedContextList(),
there are memory leaks for error path. So this removes them.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 17:46:06 +01:00
Seung-Woo Kim 2dc30dd527 tests/exynos: fix invalid code of error path in g2d test
This patch fixes invalid code of error path including NULL
deference and leak in g2d test.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 17:46:06 +01:00
Seung-Woo Kim a398adba7c tests/exynos: remove unused-function build warning
The function g2d_blend_test() is blocked to call because of
feature unsafety. This patch blocks with proper feature name
and also blocks the function itself to remove build warning.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 17:46:06 +01:00
Seung-Woo Kim 762be6c210 exynos/fimg2d: remove unused-function build warning
The function g2d_reset() is not anymore used after the commit
e3c97d1a24 ("exynos/fimg2d: add g2d_validate_xyz() functions"),
so it should be removed.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 17:46:06 +01:00
Seung-Woo Kim c9ef5c4a1c exynos: fix type-punned pointer build warning
As like the commit ecc2a09729 ("xf86drm: Fix type-punned pointer
build warning"), this fixes following build warning.

   exynos_drm.c: In function 'exynos_handle_event':
   exynos_drm.c:420:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
      e = (struct drm_event *) &buffer[i];
                  ^

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 17:46:06 +01:00
Emil Velikov f5995751b0 amdgpu: add amdgpu_bo_va_op_raw to the symbol check
Otherwise the make check will rightfully fail.

Fixes: 4e369f25a9 ("amdgpu: add amdgpu_bo_va_op_raw")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 17:46:06 +01:00
Junwei Zhang eead591107 amdgpu: add REPLACE and CLEAR checking for VA op (v2)
v2: fix indent

Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 18:32:12 +02:00
Nicolai Hähnle 0a4626fead headers: the uint*_t vs. __u* discrepancy in amdgpu_drm is fixed
This was already done in commit 3dc002df3e ("amdgpu: sync amdgpu_drm.h
with kernel 4.11-rc2"), now update the README accordingly.

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 18:32:09 +02:00
Nicolai Hähnle f104148e40 headers: sync amdgpu_drm.h from airlied/drm-next
Changes include: PRT and preemption flags, sensor info, and some more
changes for Vega10.

Generated using make headers_install from airlied/drm-next commit
320d8c3d38739fa8e31a076b86cbdafcf8897d5e.

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 18:31:47 +02:00
Nicolai Hähnle 4e369f25a9 amdgpu: add amdgpu_bo_va_op_raw
This variant allows the caller full control over flags and size, and
allows passing a NULL bo (for PRT support).

Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: Jerry Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2017-04-03 10:11:24 +02:00
Christian Gmeiner 18fbd7f089 etnaviv: remove struct etna_specs
There is no need to cache spec values directly as library
users will cache them anyway.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-04-01 17:12:02 +02:00
Marek Olšák 8d61a9a923 configure.ac: bump version for release 2017-03-29 20:06:22 +02:00
Leo Liu c7b5aaeb1f amdgpu_drm: add AMDGPU_HW_IP_UVD_ENC
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2017-03-27 21:45:50 +02:00
Christian König f684bb109f amdgpu: stop reading CC_RB_BACKEND_DISABLE on Vega10
Follow up to 'drm: don't access deprecated register on Vega10'.

The same information is available in enabled_rb_pipes_mask and reading that
register can cause GRBM bus problems.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2017-03-27 21:42:07 +02:00
Junwei Zhang a784c38af7 tests/amdgpu: add Polaris12 support for cs test
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-27 21:42:07 +02:00
Leo Liu f810e31bcf tests/amdgpu: add vce unit test support for vega10
swizzle mode needs reference and input picture luma and
chroma pitch aligned with 256

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-27 21:42:07 +02:00
Leo Liu 5a44f9e6c6 tests/amdgpu: add uvd unit test support for vega10
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-27 21:42:07 +02:00
Huang Rui fee173dc77 tests/amdgpu: fix the count number for vega10
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-27 21:42:07 +02:00