Commit Graph

6106 Commits (3832374dafb8d0b1b69d8856be28352514afab5d)

Author SHA1 Message Date
Dave Airlie 3832374daf drm: update drm.h to latest in drm-next.
This syncs the drm.h header with my drm-next branch as of
6d61e70ccc21606ffb8a0a03bd3aba24f659502b.

It brings over the semaphore API changes.

Generated using make headers_install.
Generated from git://people.freedesktop.org/~airlied/linux drm-next commit 6d61e70ccc2.

[airlied: I split patch in two, split reviewed by across both]

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-29 05:31:23 +10:00
Dave Airlie 92b5b308ca amdgpu: sync amdgpu_drm with kernel.
This syncs the amdgpu_drm header with my drm-next branch as of
6d61e70ccc21606ffb8a0a03bd3aba24f659502b.

It brings over the VM and semaphore API changes.

Generated using make headers_install.
Generated from git://people.freedesktop.org/~airlied/linux drm-next commit 6d61e70ccc2.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-27 13:08:39 +10:00
Eric Anholt b9549c954e headers: Update drm_fourcc and vc4_drm.h with new VC4 tiling UAPI.
Taken from make headers_install of drm-misc-next
(34c8ea400ff6383b028f63df2453914163afc07c)

Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-06-22 10:49:00 +01:00
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
Michel Dänzer 87dac00db3 amdgpu: Add .editorconfig file for amdgpu coding style
The .editorconfig file in the toplevel directory doesn't match.

Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-06-13 10:20:16 +09:00
Michel Dänzer 57d67d55d3 tests/amdgpu: s/uvd_messages.h/decode_messages.h/ in Makefile.am
Fixes make distcheck with amdgpu enabled.

Fixes: ec65d19809 ("tests/amdgpu: rename uvd messages to decode
                      messages")

Trivial.
2017-06-12 17:16:47 +09:00
Tom St Denis b6f450e065 tests/amdgpu: Fix device_id option
The device_id option [-d] was badly broken.  This commit fixes
the width (was 8 is now 16 bits) as well as enables searches
without specifying a bus id.  It was also comparing "dev" from
the bus field which is not the PCI device id.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
2017-06-06 12:14:13 -04:00
Leo Liu 16444e1061 tests/amdgpu: implement vcn dec unit tests
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
2017-06-05 10:41:13 -04:00
Leo Liu c1f5eea50f tests/amdgpu: add vcn tests support and sets
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
2017-06-05 10:41:13 -04:00
Leo Liu 01096f2122 tests/amdgpu: move decode sum to common
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
2017-06-05 10:41:13 -04:00
Leo Liu 1851f1b57a tests/amdgpu: separate decode messages
AVC decode messages will be common with VCN decode

Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
2017-06-05 10:41:13 -04:00
Leo Liu ec65d19809 tests/amdgpu: rename uvd messages to decode messages
It will be shared with VCN decode

Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
2017-06-05 10:41:13 -04:00
Eric Engestrom 48aac8c6ef headers: sync drm_sarea.h with airlied/drm-next
Adds the C++ extern guards from
ebbb0e5cfd2ceb1150b1 drm: add extern C guard for the UAPI headers

Generated using `make headers_install` from airlied/drm-next
at commit 2a1720376adda5ecf8e636fbfb05339c7dad1c55

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-03 23:39:22 +01:00
Eric Engestrom 1b8db17779 headers: sync drm_fourcc.h with airlied/drm-next
This adds a bunch of modifiers stuff, as well as a few new formats.
Includes the following changes:
ebbb0e5cfd2ceb1150b1 drm: add extern C guard for the UAPI headers
b9fb2a21ac8058965a6b drm_fourcc: Document linear modifier
af913418261d6d3e7a29 drm_fourcc: Fix DRM_FORMAT_MOD_LINEAR #define
fd056f05b9fcba35b77e drm: add fourcc codes for 16bit R and RG
73f1a5858bf82f3bf232 drm/fourcc: add vivante tiled layout format modifiers
ba2b5277dc52cc96944d drm: add RGB formats with separate alpha plane
5e91144dd702d068b22a drm/tegra: Add tiling FB modifiers

Generated using `make headers_install` from airlied/drm-next
at commit 2a1720376adda5ecf8e636fbfb05339c7dad1c55

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-03 23:39:12 +01:00
Rob Herring ce9e3ba6e2 Android: fix missing trailing \
In commit bbe998791d ("Android's major/minor/makedev live in
<sys/sysmacros.h>"), it didn't apply cleanly and I missed the trailing
\, so add it here.

Signed-off-by: Rob Herring <robh@kernel.org>
2017-05-28 09:34:13 -05:00
Elliott Hughes bbe998791d Android's major/minor/makedev live in <sys/sysmacros.h>
Bug: https://github.com/android-ndk/ndk/issues/398

Signed-off-by: Rob Herring <robh@kernel.org>
2017-05-28 09:30:10 -05:00
Marek Olšák 81312f3730 Bump version to 2.4.81 2017-05-24 17:01:36 +02:00
Leo Liu eeb51df3ce amdgpu/drm: add AMDGPU_HW_IP_VCN_ENC
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2017-05-23 17:43:46 -04:00
Leo Liu 5faee77272 amdgpu/drm: add AMDGPU_HW_IP_VCN_DEC
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2017-05-23 17:43:07 -04:00
Hawking Zhang 3f457d2a6e amdgpu: add raven family id
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2017-05-23 17:41:31 -04:00
Nicolai Hähnle 41be41f99e amdgpu: add missing extern "C" headers
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Xie <AlexBin.Xie@amd.com>
2017-05-16 15:45:45 +02:00
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