Mikhail Golubev [Mon, 20 Apr 2020 18:08:50 +0000 (20:08 +0200)]
xf86drm: Check non-absolute path only for virtio based devices
This fixes bug in drmParseSubsystemType() that cases situation when
subsequent call to readlink() from get_subsystem_type() will result in
EACCESS.
Signed-off-by: Mikhail Golubev <mikhail.golubev@opensynergy.com>
Peter Seiderer [Sat, 7 Mar 2020 11:23:09 +0000 (12:23 +0100)]
tests/amdgpu: needs atomic_ops
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Acked-by: Alex Deucher alexander.deucher@amd.com
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Tue, 21 Apr 2020 10:27:01 +0000 (11:27 +0100)]
tests: install drmdevice
Just like the other tests (tools really) install drmdevice. It is a
simple tool which is useful for basic check/testing.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Emmanuel Vadot [Fri, 24 Jan 2020 18:27:41 +0000 (19:27 +0100)]
tests/nouveau/threaded: adapt ioctl signature for FreeBSD
FreeBSD also use (int, unsigned long int, ...) like GLIBC.
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emmanuel Vadot [Tue, 21 Jan 2020 17:49:47 +0000 (18:49 +0100)]
libdrm: Implement drmParsePciDeviceInfo for FreeBSD
The FreeBSD kernel expose a pseudo-device /dev/pci to obtain information
about present PCI device.
Uee the PCIOCGETCONF ioctl on this device to look up the desired device
information.
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emmanuel Vadot [Mon, 20 Apr 2020 20:44:02 +0000 (22:44 +0200)]
libdrm: get_pci_path is Linux only so add an ifdef
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emmanuel Vadot [Tue, 21 Jan 2020 17:49:11 +0000 (18:49 +0100)]
libdrm: Add get_sysctl_pci_bus_info for FreeBSD
The FreeBSD drm driver expose a sysctl hw.dri.%d.busid which contain
the busid.
Use this sysctl to parse the busid information based on the major/minor
that allow us to implement FreeBSD support for drmParsePciBusInfo.
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emmanuel Vadot [Fri, 24 Jan 2020 19:43:05 +0000 (20:43 +0100)]
libdrm: drmCheckModesettingSupported: fix for FreeBSD
FreeBSD only support up to 10 GPUs not 16.
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emmanuel Vadot [Tue, 21 Jan 2020 17:41:38 +0000 (18:41 +0100)]
libdrm: drmCheckModesettingSupported: Fix for FreeBSD
Remove some useless busid rewritting.
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emmanuel Vadot [Tue, 21 Jan 2020 16:58:28 +0000 (17:58 +0100)]
libdrm: drmGetDeviceNameFromFd2: Add FreeBSD variant
The FreeBSD variant of drmGetDeviceNameFromFd can already handle
the different node type so just call it.
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emmanuel Vadot [Tue, 21 Jan 2020 16:56:49 +0000 (17:56 +0100)]
libdrm: Default to PCI for FreeBSD
FreeBSD have some support for DRM on !PCI device but no code is currently
upstream. Default to PCI for now.
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emmanuel Vadot [Tue, 21 Jan 2020 16:53:07 +0000 (17:53 +0100)]
libdrm: drmGetMinorNameForFD: Add FreeBSD variant
Use the FreeBSD variant function to obtain the minor name and the
device node.
Return the correct path based on where the node is (drm/ versus dri/).
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emmanuel Vadot [Tue, 21 Jan 2020 16:50:15 +0000 (17:50 +0100)]
libdrm: drmGetDeviceNameFromFd: Add FreeBSD variant
Get the major/minor via fstat and after checking that this is a drm node
construct the full device node name using devname.
Note that we should be able to use fdevname to avoid calling fstat + devname
but for some reason it doesn't work on drm node (probably due to how the device
node are created in the linux compat code for drm on FreeBSD).
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emmanuel Vadot [Tue, 21 Jan 2020 16:47:09 +0000 (17:47 +0100)]
libdrm: drmGetMinorType: Add FreeBSD version
Resolve the minor type based on the device node path.
The minor type is either in /dev/drm/X where X is the type or
in a Linux-compatible device node in /dev/dri/
This means we need the major number on FreeBSD so add it to the function
arguments.
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emmanuel Vadot [Tue, 21 Jan 2020 16:39:10 +0000 (17:39 +0100)]
xf86drm: Remove ifdef for FreeBSD and DRM_MAJOR
FreeBSD devfs only provides on the fly generated major/minor.
The major number is irrelevant for FreeBSD so remove the special case.
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emmanuel Vadot [Tue, 21 Jan 2020 16:42:44 +0000 (17:42 +0100)]
libdrm: drmNodeIsDRM: Add FreeBSD variant
FreeBSD devfs have on the gly generated major minor so we cannot use them
to test if the device is a drm node.
Instead get the devfs node name and test if it is in a subdirectory "drm/"
or "dri/".
Historycally DRM device on FreeBSD are created in /dev/drm/ and link are
present in /dev/dri/ for compatibility reason.
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Eric Engestrom [Sun, 29 Mar 2020 20:45:52 +0000 (22:45 +0200)]
meson: don't detect <sys/sysctl.h> on Linux
The header is not required on Linux, and is in fact deprecated in glibc 2.30+
Reported-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Niclas Zeising <zeising@daemonic.se>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Tested-by: Niclas Zeising <zeising@daemonc.se>
James Zhu [Sat, 11 Apr 2020 13:50:15 +0000 (09:50 -0400)]
tests/amdgpu/vcn: add dummy feedback message
Latest VCN firmware has feedback header check.
Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Timo Aaltonen [Fri, 3 Apr 2020 11:39:47 +0000 (14:39 +0300)]
Bump version to 2.4.101
Pierre-Eric Pelloux-Prayer [Tue, 17 Mar 2020 15:50:56 +0000 (16:50 +0100)]
amdgpu: increase cpu_map_count storage size
Mesa expects to be able to map the same buffer, without unmapping it.
This leads to problem on long-running program.
On the other hand, libdrm uses cpu_map_count as a refcount and expects
its value to decrease so it can unmap buffers.
The previoulsy proprosed fix (https://patchwork.freedesktop.org/patch/258005/)
stopped increased the counter when it went past INT_MAX.
This commit instead proposes to use a larger type to store cpu_map_count.
The outcome is the same: long running apps will not crash, only the
implementation differs.
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1423
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Swathi Dhanavanthri [Fri, 20 Mar 2020 00:38:30 +0000 (17:38 -0700)]
intel: sync i915_pciids.h with kernel
Changes:
3882581753d1 ("drm/i915/tgl: Add new PCI IDs to TGL")
Signed-off-by: Swathi Dhanavanthri <swathi.dhanavanthri@intel.com>
Reviewed-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Daniel Stone [Tue, 26 Nov 2019 10:41:26 +0000 (10:41 +0000)]
Add DRM_MODE_CONNECTOR_WRITEBACK to xf86drmMode.h
xf86drmMode.h currently duplicates the connector-type definitions from
drm_mode.h. Add DRM_MODE_CONNECTOR_WRITEBACK, which is only visible
through a client cap, from drm_mode.h.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Michel Dänzer [Thu, 27 Feb 2020 11:21:09 +0000 (12:21 +0100)]
tests: Only copy con->modes[0] if it exists
con->modes can be NULL. Fixes crash in that case.
Closes: https://gitlab.freedesktop.org/mesa/drm/issues/34
Reviewed-by: Daniel Stone <daniels@collabora.com>
Vasyl Vavrychuk [Wed, 29 Jan 2020 15:08:41 +0000 (16:08 +0100)]
xf86drm: fix subsystem type lookup for virtio mmio-based devices
Currently the code assumes that a virtio based device is always located
on the PCI bus.
Modify the parser to make it check the device's parent directory to
determine on which bus it is located.
Output for virtio-pci is the PCI bus.
Output for virtio-mmio is the Platform bus.
Signed-off-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
Signed-off-by: Mikhail Golubev <Mikhail.Golubev@opensynergy.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Vasyl Vavrychuk [Wed, 29 Jan 2020 02:54:56 +0000 (03:54 +0100)]
xf86drm: generalize the device subsystem type parsing code
Move the code, which used to get the device subsystem type from a device
path in sysfs, to a separate function to be reusable.
Signed-off-by: Vasyl Vavrychuk <vasyl.vavrychuk@opensynergy.com>
Signed-off-by: Mikhail Golubev <Mikhail.Golubev@opensynergy.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Eric Engestrom [Tue, 11 Feb 2020 20:25:00 +0000 (20:25 +0000)]
tests: drop redundant and slow `random` test
Suggested by Emil [1]:
> Feel free to drop the random test altogether. It's an old public API
> no active users (pretty ancient code uses it) and the in-tree users
> drmSL and drmHash already have respective tests.
This test takes minutes to run, while all the other tests combined take
barely more than a second.
Dropping it also helps the CI by avoiding random timeouts when `random`
takes more than the 4 minutes (!) we've allowed for it.
[1] https://gitlab.freedesktop.org/mesa/drm/merge_requests/26#note_390066
Suggested-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Huang Rui [Tue, 11 Feb 2020 10:52:41 +0000 (18:52 +0800)]
amdgpu: clean up the cs structure variable
This patch is to use generic variables as the input of amdgpu_cs_submit_raw2.
Because amdgpu_cs_submit_one won't handle IOCTL directly.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Huang Rui [Tue, 11 Feb 2020 10:42:34 +0000 (18:42 +0800)]
amdgpu: remove the un-used chunk_array
This array won't be used.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Huang Rui [Tue, 11 Feb 2020 10:26:07 +0000 (18:26 +0800)]
amdgpu: use amdgpu_cs_submit_raw2 in amdgpu_cs_submit
So far, amdgpu_cs_submit_raw2 is mainly used for upper layer (Mesa), however,
amdgpu_cs_submit is used for current all unit tests. Our intention is that the
unit tests can actually verify the API which is really used.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Huang Rui [Tue, 11 Feb 2020 07:40:24 +0000 (15:40 +0800)]
amdgpu: use alloca for dependencies and sem_dependencies
Use alloca instead of malloc, then we don't need free them at the end of this
function.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Daniel Stone [Tue, 11 Feb 2020 20:19:16 +0000 (12:19 -0800)]
Add drmModeGetFB2
Add a wrapper around the getfb2 ioctl, which returns extended
framebuffer information mirroring addfb2, including multiple planes and
modifiers.
Changes since v7:
- add new symbols to core-symbol.txt (Eric Engestrom)
Changes since v5:
- style change
Changes since v4:
- Set fb_id at init instead of memclear() and set (Eric Engestrom)
Changes since v3:
- remove unnecessary null check in drmModeFreeFB2 (Daniel Stone)
Changes since v2:
- getfb2 ioctl has been merged upstream
- sync include/drm/drm.h in a seperate patch
Changes since v1:
- functions should be drm_public
- modifier should be 64 bits
- update ioctl number
Signed-off-by: Juston Li <juston.li@intel.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Juston Li [Tue, 11 Feb 2020 20:19:15 +0000 (12:19 -0800)]
include/drm: sync up drm.h
a) delta: Adds DRM_IOCTL_MODE_GETFB2
b) Generated using make headers_install
c) Taken from drm-next-misc:
commit
3ff4c24bdb1f494c217c80348f9db4896043ed81
Author: Lyude Paul <lyude@redhat.com>
Date: Fri Jan 17 17:47:48 2020 -0500
drm/dp_mst: Fix indenting in drm_dp_mst_topology_mgr_set_mst()
Signed-off-by: Juston Li <juston.li@intel.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Alex Deucher [Thu, 30 Jan 2020 17:54:40 +0000 (12:54 -0500)]
amdgpu: add new marketing names from 19.50
Add new marketing names.
Acked-by: Leo Liu <leo.liu@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Imre Deak [Wed, 22 Jan 2020 09:31:22 +0000 (11:31 +0200)]
intel: drm_intel_bo_gem_create_from_* on platforms w/o HW tiling
Platforms without a HW detiler doesn't support the get_tiling IOCTL.
Fix the drm_intel_bo_gem_create_from_* functions assuming the default
no-tiling, no-swizzling setting for the GEM buffer in this case.
v2:
- Add the missing gem handle IOCTL parameter. (Eric)
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Eric Engestrom [Wed, 7 Nov 2018 15:00:24 +0000 (15:00 +0000)]
meson: always define whether headers exist
Combined with -Wundef (added in
75758d2ccf & enforced in
ba17673eed),
this provides absolute safety against #ifdef typos.
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Eric Engestrom [Mon, 11 Nov 2019 23:51:04 +0000 (23:51 +0000)]
meson: add symbols check for core libdrm
All the libdrm_* submodules have symbols checks, no reason to keep core
libdrm wild.
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Ezequiel Garcia [Mon, 22 Jul 2019 16:08:22 +0000 (13:08 -0300)]
modetest: Fix segmentation fault
When a mode is set with just a connector "-s foo",
we get a nasty segmentation fault. Fix it.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
John Stultz [Thu, 27 Jun 2019 21:37:07 +0000 (21:37 +0000)]
libdrm: modetest: Allow selecting modes by index
Often there are many similar modes, which cannot be selected
via modetest due to its simple string matching.
This change adds a mode index in the display output, which can
then be used to specify a specific modeline to be set.
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Rob Clark <robdclark@chromium.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: John Stultz <john.stultz@linaro.org>
[emil: rebase]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Luben Tuikov [Fri, 6 Dec 2019 03:02:28 +0000 (22:02 -0500)]
tests/amdgpu: Fix buffer overflow (v3)
This patch fixes the following warning:
-Wformat-overflow=
v2: Use the correct strlcat(3).
v3: Use strncat(3) and remove libbsd dependency.
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Luben Tuikov [Fri, 6 Dec 2019 03:10:43 +0000 (22:10 -0500)]
tests/amdgpu: Fix unused function warning (v2)
This patch fixes:
-Wunused-function
v2: Always enable amdgpu_ras_test().
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Luben Tuikov [Fri, 6 Dec 2019 02:05:13 +0000 (21:05 -0500)]
tests/amdgpu: Fix various warnings (v2)
This patch fixes the following warnings:
-Wformat=
-Wmaybe-uninitialized
-Wmisleading-indentation
-Wstringop-truncation
-Wunused-function
-Wunused-variable
It also removes forward declarations and moves
global functions to the bottom, keeping locals
at the top, in ras_tests.c.
v2: Fix compilation.
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Marek Olšák [Tue, 7 Jan 2020 19:44:35 +0000 (14:44 -0500)]
Revert "tests/amdgpu: Fix various warnings"
This reverts commit
fb1634583f3ba22c67cad0df7022b6ac48a40c56.
Marek Olšák [Tue, 7 Jan 2020 19:44:31 +0000 (14:44 -0500)]
Revert "tests/amdgpu: Fix unused function warning (v2)"
This reverts commit
4ff499cd85f86a7b5b28f3449de2fbad1b91c795.
Marek Olšák [Tue, 7 Jan 2020 19:44:27 +0000 (14:44 -0500)]
Revert "tests/amdgpu: Fix buffer overflow (v3)"
This reverts commit
680542ce086f5d0ba70331f8d350edfae20c534f.
Luben Tuikov [Tue, 17 Dec 2019 22:03:41 +0000 (17:03 -0500)]
tests/amdgpu: Proper format for "-l"
Proper format for command line option "-l",
listing the supported and unsupported tests:
1) Add an aligned column header.
2) Align all fields into columns.
3) Fixed length fields, come before the last
column, which is a variable length field.
4) Variable length field, which is the name of the
test, goes in the last column.
5) If a suite is disabled, do not iterate over its
tests, as they'd naturally be all disabled.
Now the output looks like this:
$sudo ./amdgpu_test -l
What: ID: Status: Name
Suite: 1: ENABLED: Basic Tests
Test: 1: ENABLED: Query Info Test
Test: 2: ENABLED: Userptr Test
Test: 3: DISABLED: bo eviction Test
Test: 4: ENABLED: Command submission Test (GFX)
Test: 5: ENABLED: Command submission Test (Compute)
Test: 6: ENABLED: Command submission Test (Multi-Fence)
Test: 7: ENABLED: Command submission Test (SDMA)
Test: 8: ENABLED: SW semaphore Test
Test: 9: DISABLED: Sync dependency Test
Test: 10: DISABLED: Dispatch Test (Compute)
Test: 11: DISABLED: Dispatch Test (GFX)
Test: 12: DISABLED: Draw Test
Test: 13: DISABLED: GPU reset Test
Suite: 2: ENABLED: BO Tests
Test: 1: ENABLED: Export/Import
Test: 2: DISABLED: Metadata
Test: 3: ENABLED: CPU map/unmap
Test: 4: ENABLED: Memory alloc Test
Test: 5: ENABLED: Memory fail alloc Test
Test: 6: ENABLED: Find bo by CPU mapping
Suite: 3: DISABLED: CS Tests
Suite: 4: DISABLED: VCE Tests
Suite: 5: ENABLED: VCN Tests
Test: 1: ENABLED: VCN DEC create
Test: 2: ENABLED: VCN DEC decode
Test: 3: ENABLED: VCN DEC destroy
Test: 4: ENABLED: VCN ENC create
Test: 5: ENABLED: VCN ENC decode
Test: 6: ENABLED: VCN ENC destroy
Suite: 6: DISABLED: UVD ENC Tests
Suite: 7: DISABLED: Deadlock Tests
Suite: 8: ENABLED: VM Tests
Test: 1: ENABLED: resere vmid test
Test: 2: ENABLED: unaligned map
Test: 3: ENABLED: vm mapping test
Suite: 9: DISABLED: RAS Tests
Suite: 10: ENABLED: SYNCOBJ TIMELINE Tests
Test: 1: ENABLED: syncobj timeline test
$_
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Luben Tuikov [Fri, 6 Dec 2019 03:02:28 +0000 (22:02 -0500)]
tests/amdgpu: Fix buffer overflow (v3)
This patch fixes the following warning:
-Wformat-overflow=
v2: Use the correct strlcat(3).
v3: Use strncat(3) and remove libbsd dependency.
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Luben Tuikov [Fri, 6 Dec 2019 03:10:43 +0000 (22:10 -0500)]
tests/amdgpu: Fix unused function warning (v2)
This patch fixes:
-Wunused-function
v2: Always enable amdgpu_ras_test().
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Luben Tuikov [Fri, 6 Dec 2019 02:05:13 +0000 (21:05 -0500)]
tests/amdgpu: Fix various warnings
This patch fixes the following warnings:
-Wformat=
-Wmaybe-uninitialized
-Wmisleading-indentation
-Wstringop-truncation
-Wunused-function
-Wunused-variable
It also removes forward declarations and moves
global functions to the bottom, keeping locals
at the top, in ras_tests.c.
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Yifan Zhang [Mon, 16 Dec 2019 05:28:58 +0000 (13:28 +0800)]
tests/amdgpu: fix a amdgpu_test hang issue on some platforms.
The computer ring test name mis-match in different files,
thus may be set with TRUE on wrong platforms.
Change-Id: I0b918ff8faf08c9c9f1ad55f4dcd18f66b956901
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Scott Anderson [Tue, 17 Dec 2019 09:08:02 +0000 (22:08 +1300)]
meson: Replace 'config.h' with config_file
This fixes an issue with libdrm failing to build when used as a meson
subproject. Using 'config.h' directly will cause it to possibly refer to
the wrong file.
By using `@0@.format(config_file)`, it will be transformed into the
correct relative path, e.g. `./config.h` in normal build,
`./subprojects/libdrm/config.h` in subproject build.
Signed-off-by: Scott Anderson <scott@anderso.nz>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Tue, 17 Dec 2019 22:11:55 +0000 (22:11 +0000)]
add a minimal .gitignore back
It was entirely deleted along with autotools, but adding this simple one
will cover most people's needs.
Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Eric Engestrom [Tue, 17 Dec 2019 22:29:11 +0000 (22:29 +0000)]
gitlab-ci: rename build folder to simply `build`
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
José Roberto de Souza [Tue, 10 Dec 2019 20:04:54 +0000 (12:04 -0800)]
intel: sync i915_pciids.h with kernel
Changes:
651cc835d5f6 ("drm/i915: Add new EHL/JSL PCI ids")
b6a8781a447c ("drm/i915/cml: Remove unsupport PCI ID")
8717c6b7414f ("drm/i915/cml: Separate U series pci id from origianl list.")
v2: added the latest CML changes
Cc: James Ausmus <james.ausmus@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Devarsh Thakkar [Tue, 3 Dec 2019 14:37:36 +0000 (06:37 -0800)]
modetest: Use floating vrefresh while dumping mode
Add function to derive floating value of vertical
refresh rate from drm mode using pixel clock,
horizontal total size and vertical total size.
Use this function to find suitable mode having vrefresh
value which is matching with user provided vrefresh value.
If user doesn't provide any vrefresh value in args then
update vertical refresh rate value in pipe args using this
function.
Also use this function for printing floating vrefresh while
dumping all available modes.
This will give more accurate picture to user for available modes
differentiated by floating vertical refresh rate and help user
select more appropriate mode using suitable refresh rate value.
V4:
1) While setting mode, print mode name and vrefresh using struct
drmModeModeInfo instead of struct pipe_args.
2) Revert back to using a float value instead of float *
for vrefresh arg in connector_find_mode().
V3:
1) Change name of function used to derive refresh rate.
V2:
1) Don't use inline function for deriving refresh rate from mode.
2) If requested mode not found, print refresh rate only
if user had provided it in args.
Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Flora Cui [Mon, 18 Mar 2019 08:45:31 +0000 (16:45 +0800)]
tests/amdgpu: add gfx ring bad slow draw test
for gfx9
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Flora Cui [Mon, 18 Mar 2019 06:14:42 +0000 (14:14 +0800)]
tests/amdgpu: add gfx ring draw hang test
for gfx9
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Flora Cui [Mon, 18 Mar 2019 07:32:30 +0000 (15:32 +0800)]
tests/amdgpu: add bad slow dispatch test
add gfx/compute bad slow dispatch test for gfx9
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Flora Cui [Mon, 18 Mar 2019 02:58:53 +0000 (10:58 +0800)]
tests/amdgpu: add dispatch hang test
add compute/gfx dispatch hang test for gfx9
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Flora Cui [Fri, 15 Nov 2019 08:32:14 +0000 (16:32 +0800)]
tests/amdgpu: update draw test for gfx9
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
changzhu [Mon, 4 Nov 2019 03:48:19 +0000 (11:48 +0800)]
tests/amdgpu: enable dispatch/draw tests for Renoir
It can run dispatch/draw tests on new renoir chips. So it needs to
enable dispatch/draw tests for Renoir again.
Change-Id: I3a72a4bbfe0fc663ee0e3e58d8e9c304f513e568
Signed-off-by: changzhu <Changfeng.Zhu@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Thomas Petazzoni [Thu, 26 May 2016 08:46:57 +0000 (10:46 +0200)]
xf86atomic: require CAS support in libatomic_ops
Since AO_compare_and_swap_full() is used by libdrm, AO_REQUIRE_CAS
must be defined before including <atomic_ops.h> so that we are sure
that CAS support will be provided. This is necessary to make sure that
the AO_compare_and_swap_full() function will be provided on all
architectures, including the ones that don't have built-in CAS support
such as SPARCv8.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Lauren Post [Tue, 22 Mar 2016 21:08:25 +0000 (22:08 +0100)]
Add ARM support into xf86drm.h
This provides support for Xorg interface. Without this the vivante
samples will hang during close requiring a reboot
[Adapted from yocto project]
Upstream-Status: Pending
Signed-off-by: Lauren Post <lauren.post@freescale.com>
Signed-off-by: Evan Kotara <evan.kotara@freescale.com>
[Thomas: change CAS code to only be used on ARMv6/ARMv7, and not
ARMv4/ARMv5, which don't support ldrex/strex. If no CAS implementation
is provided libdrm falls back to a system call for locking/unlocking.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
---
Changes v1 -> v2:
- add comment explaining exclusion of ARMv4/ARMv5 and lower
Peter Seiderer [Mon, 16 Jul 2018 21:01:40 +0000 (23:01 +0200)]
meson.build: fix intel atomics detection
Use the stronger compiler.link() test (instead of the weaker
compiler.compile()) to fix the intel atomics detection.
Fixes false positive in case of sparc compile (buildroot toolchain).
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Alex Deucher [Tue, 3 Dec 2019 14:08:54 +0000 (09:08 -0500)]
amdgpu: add new marketing names from 19.30
Add new marketing names.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Pierre-Eric Pelloux-Prayer [Tue, 3 Dec 2019 15:00:41 +0000 (16:00 +0100)]
gitlab-ci: update to current ci-templates master
To workaround skopeo issues.
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Ross Burton [Mon, 18 Jun 2018 14:07:03 +0000 (15:07 +0100)]
tests/nouveau/threaded: adapt ioctl signature
POSIX says ioctl() has the signature (int, int, ...) but glibc has decided to
use (int, unsigned long int, ...) instead.
Use a #ifdef to adapt the replacement function as appropriate.
Signed-off-by: Ross Burton <ross.burton@intel.com>
[Taken from https://raw.githubusercontent.com/openembedded/openembedded-core/master/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch]
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
xinxu@loongson.cn [Thu, 8 Aug 2019 08:47:07 +0000 (08:47 +0000)]
tests/amdgpu/basic_tests.c: change BUFFER_SIZE used in Userptr Test adjust to PAGE_SIZE
Userptr Test will fail on PAGE_SIZE bigger than BUFFER_SIZE(8 * 1024)
Signed-off-by: xinxu <xinxu@loongson.cn>
(cherry picked from commit
fb7dfdc5fb58795365b70117c3eb625f2edb8f06)
Devarsh Thakkar [Fri, 15 Nov 2019 14:31:00 +0000 (06:31 -0800)]
modetest: Add support for setting mode having floating vertical refresh rate
For the scenario where user may require to modeset with a mode
supporting a fractional value for vertical refresh-rate,
appropriate mode can be selected by searching for mode
having matching fractional vertical refresh rate using
below equation.
vrefresh = (1000 * pixel clock) / (htotal * vtotal) Hz.
We do this way since driver doesn't return float value of vrefresh
as it use int for vrefresh in struct drm_mode_info, but we can derive
the actual value using pixel clock, horizontal total size and
vertical total size values.
So for e.g. if user want to select mode having 59.94 Hz as refresh rate
then with this patch it be can done as shown in below command,
given there is an appropriate mode is available :
modetest -M xlnx -s 39:1920x1080-59.94@BG24 -v
NOTE: Above command was tested on xilinx DRM driver with DP
monitor which was supporting mode having 59.94 Hz refresh rate.
V2: Update commit message
V3: Update with below changes as per review comments :
1) Use epsilon for vrefresh comparison
2) Use implicit type-casting wherever possible
V4: Keep patch version history on main commit message
Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Eric Engestrom [Sat, 16 Nov 2019 11:13:36 +0000 (11:13 +0000)]
gitlab-ci: add PowerPC build
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Eric Engestrom [Wed, 24 Oct 2018 10:19:15 +0000 (11:19 +0100)]
gitlab-ci: add aarch64 & armhf builds
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Eric Engestrom [Wed, 5 Sep 2018 11:23:26 +0000 (12:23 +0100)]
gitlab-ci: add x86 (32 bits) build
Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Eric Engestrom [Sun, 20 Oct 2019 22:06:56 +0000 (23:06 +0100)]
gitlab-ci: set up cross build infra
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Eric Engestrom [Tue, 12 Nov 2019 12:13:11 +0000 (12:13 +0000)]
gitlab-ci: drop arch build down to daily builds
Suggested-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Simon Ser [Sat, 26 Oct 2019 17:36:37 +0000 (19:36 +0200)]
Fix missing stdlib includes in xf86drmMode.h
Including xf86drmMode.h results in undefined references to uint32_t
and ssize_t. Include the stdlib headers that define them to allow the
file to be included without xf86drm.h.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 23 Oct 2019 22:34:43 +0000 (23:34 +0100)]
meson: drop old symbols check environment
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 23 Oct 2019 22:32:55 +0000 (23:32 +0100)]
tegra: convert to new symbols check
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 23 Oct 2019 22:32:54 +0000 (23:32 +0100)]
radeon: convert to new symbols check
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 23 Oct 2019 22:32:54 +0000 (23:32 +0100)]
omap: convert to new symbols check
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 23 Oct 2019 22:32:54 +0000 (23:32 +0100)]
nouveau: convert to new symbols check
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 23 Oct 2019 22:32:54 +0000 (23:32 +0100)]
libkms: convert to new symbols check
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 23 Oct 2019 22:32:54 +0000 (23:32 +0100)]
intel: convert to new symbols check
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 23 Oct 2019 22:32:54 +0000 (23:32 +0100)]
freedreno: convert to new symbols check
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 23 Oct 2019 22:32:54 +0000 (23:32 +0100)]
exynos: convert to new symbols check
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 23 Oct 2019 22:32:54 +0000 (23:32 +0100)]
etnaviv: convert to new symbols check
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 23 Oct 2019 22:32:54 +0000 (23:32 +0100)]
amdgpu: convert to new symbols check
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 23 Oct 2019 21:57:51 +0000 (22:57 +0100)]
meson: import Mesa's symbols check script
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 23 Oct 2019 22:29:27 +0000 (23:29 +0100)]
freedreno: drop leftover symbol from the export list
Fixes:
09cbccff558988c57e52 ("freedreno: remove deprecated ringmarker API")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Chunming Zhou [Wed, 24 Jul 2019 07:55:20 +0000 (15:55 +0800)]
libdrm: wrap new flexible syncobj query interface v2
v2: nit-picks fix
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Christian König <Christian.Koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
For the xf86drm.[ch] part : Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Chunming Zhou [Thu, 24 Oct 2019 06:42:13 +0000 (14:42 +0800)]
sync up drm.h
a) delta: drm: use pad as flags in drm_syncobj_timeline_array.
b) Generated using make headers_install.
c) Generated from origin/drm-misc-next commit
949561eb85bcee10248e7da51d44a0325d5e0d1b"
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Eric Engestrom [Wed, 25 Sep 2019 21:54:59 +0000 (22:54 +0100)]
gitlab-ci: pre-build containers to improve CI run time and reliability
Shaves about 50% off the build time on both debian and arch builds.
(yeah, I know, it's very small anyway compared to mesa, but we might
want to add more things in the future)
This also makes the build no longer dependent on external websites:
once the image is build, only fdo-internal services are used.
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Eric Engestrom [Fri, 18 Oct 2019 17:05:45 +0000 (18:05 +0100)]
Revert "Revert "libdrm: remove autotools support""
The external tooling issue has been fixed, so we can delete autotools
again :)
Marek Olšák [Wed, 16 Oct 2019 21:35:55 +0000 (17:35 -0400)]
Bump the version to 2.4.100 for autotools
Marek Olšák [Wed, 16 Oct 2019 21:33:28 +0000 (17:33 -0400)]
Revert "libdrm: remove autotools support"
This reverts commit
f057dc91e93ae21e11ab48a26127d569972f3eae.
Marek Olšák [Wed, 16 Oct 2019 19:27:05 +0000 (15:27 -0400)]
Bump the version to 2.4.100
Marek Olšák [Wed, 9 Oct 2019 23:18:08 +0000 (19:18 -0400)]
amdgpu: add amdgpu_cs_query_reset_state2 for AMDGPU_CTX_OP_QUERY_STATE2
This is a better GPU reset query.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Marek Olšák [Tue, 24 Sep 2019 21:43:15 +0000 (17:43 -0400)]
include: update amdgpu_drm.h
Generated from kernel commit:
815fb4c9d7da862 "drm/amdgpu: return tcc_disabled_mask to userspace"
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Nirmoy Das [Mon, 14 Oct 2019 14:53:36 +0000 (16:53 +0200)]
test/amdgpu: don't free unused bo handle
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Eric Engestrom [Wed, 7 Nov 2018 15:30:55 +0000 (15:30 +0000)]
libdrm: remove autotools support
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Wed, 19 Dec 2018 12:16:25 +0000 (12:16 +0000)]
RELEASING: update instructions to use meson instead of autotools
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Eric Engestrom [Fri, 4 Oct 2019 08:37:31 +0000 (09:37 +0100)]
*-symbols-check: let meson figure out how to execute the scripts
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>