Robert Foss [Tue, 16 Jan 2018 17:07:15 +0000 (18:07 +0100)]
android: Change gralloc_handle_t members to be fixed width
In order to lessen future alignment issues, lets switch to
fixed width integers where possible.
This excludes the data_owner since it is a pid_t which
in theory could be larger than 32 bits.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Robert Foss [Tue, 16 Jan 2018 13:38:41 +0000 (14:38 +0100)]
android: Remove member name from gralloc_handle_t
The name member of gralloc_handle_t is no longer needed and has been removed.
The version field has also been bumped.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Robert Foss [Tue, 16 Jan 2018 14:19:15 +0000 (15:19 +0100)]
android: Mark gralloc_handle_t magic variable as const
Mark magic member of gralloc_handle_t as const.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Robert Foss [Tue, 16 Jan 2018 13:36:13 +0000 (14:36 +0100)]
android: Add version variable to gralloc_handle_t
The version variable will be used for versioning of this
struct and the corresponding accessor functions.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Robert Foss [Wed, 6 Dec 2017 18:28:13 +0000 (19:28 +0100)]
android: Move gralloc handle struct to libdrm
This struct is used in mesa and drm_hwcomposer.
Versions of if have been implemented in several grallocs:
drm_gralloc, gbm_gralloc, minigbm and intel-minigbm.
Other than the 1:1 move of the struct a new generic name
has been chosen and variables have had comments added to them.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Michel Dänzer [Mon, 12 Feb 2018 14:47:55 +0000 (15:47 +0100)]
amdgpu: Add amdgpu_query_sw_info to amdgpu-symbol-check
Fixes make check. Trivial.
Marek Olšák [Fri, 2 Feb 2018 17:15:00 +0000 (18:15 +0100)]
amdgpu: add amdgpu_query_sw_info for querying high bits of 32-bit address space
Reviewed-by: Christian König <christian.koenig@amd.com>
Dylan Baker [Wed, 7 Feb 2018 23:35:24 +0000 (15:35 -0800)]
meson: include headers in root directory in ext_libdrm
Which is used in wraps.
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Chunming Zhou [Thu, 8 Feb 2018 06:52:11 +0000 (14:52 +0800)]
amdgpu: clean up non list code path for vamgr v2
v2: Add missing "goto out"
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Michel Dänzer [Thu, 8 Feb 2018 08:50:53 +0000 (09:50 +0100)]
Revert "amdgpu: clean up non list code path for vamgr"
This reverts commit
41b94a3fb6e87d057fad78568d920d29489e5060.
It caused crashes with radeonsi in at least glxgears and Xorg.
Chunming Zhou [Thu, 8 Feb 2018 07:03:01 +0000 (15:03 +0800)]
tests/amdgpu: add bo eviction test
for(( i=1; i < 100; i++))
do
echo "Hello, Welcome $i times "
sudo ./amdgpu_test -s 1 -t 5
done
with above stricpt, run in two terminals, will reproduce Felix's swap leeking issue.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Chunming Zhou [Thu, 8 Feb 2018 06:52:11 +0000 (14:52 +0800)]
amdgpu: clean up non list code path for vamgr
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Chunming Zhou [Thu, 8 Feb 2018 06:35:26 +0000 (14:35 +0800)]
amdgpu: fix inefficient vamgr algorithm
issue: UMD allocates top 4GB, but don't do anything, just reserve top 4GB space,
but the performance of VP13 drops from 162fps to 99fps.
root cause:
our va hole list of vamgr is too long by time going.
fix:
reusing old hole as much as possible can make the list shortest.
result:
performance recovers as non-list path, next patch will remove non-list code path.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Chunming Zhou [Wed, 7 Feb 2018 03:22:32 +0000 (11:22 +0800)]
fix return value for syncobj wait
otherwise -ETIME is missed.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Bas Nieuwenhuizen [Tue, 6 Feb 2018 10:21:35 +0000 (11:21 +0100)]
drm: Fix 32-bit drmSyncobjWait.
Otherwise we get an EFAULT, at least on a 64-bit kernel.
Fixes:
2048a9e7 "drm: add drmSyncobjWait wrapper"
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Dylan Baker [Thu, 25 Jan 2018 23:44:37 +0000 (15:44 -0800)]
meson: fix libdrm_nouveau pkgconfig include directories
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Mon, 29 Jan 2018 14:51:31 +0000 (14:51 +0000)]
tests/amdgpu: add missing config.h include
Otherwise we'll end up without the macros set during configure stage.
And effectively error out in sanity tests such as the mmap static
assert.
To reproduce, do a multilib build - 32bit build on 64bit machine.
Cc: Fabio Pedretti <pedretti.fabio@gmail.com>
Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Fixes:
33dcc29f7cc ("amdgpu: Add VMID reservation per GPU context test.")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104819
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Eric Engestrom [Fri, 26 Jan 2018 11:18:03 +0000 (11:18 +0000)]
meson,configure: turn undefined preprocessor tokens warnings into errors
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 5 Jan 2018 15:27:17 +0000 (15:27 +0000)]
exynos/tests: use #ifdef for never-defined token
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 5 Jan 2018 15:25:31 +0000 (15:25 +0000)]
configure: always define HAVE_LIBDRM_ATOMIC_PRIMITIVES and HAVE_LIB_ATOMIC_OPS
Fixes #if undefined warnings
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 5 Jan 2018 14:57:59 +0000 (14:57 +0000)]
xf86drmHash: remove always-false #if guards
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 11:17:33 +0000 (11:17 +0000)]
meson,configure: add warning when using undefined preprocessor tokens
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 11:18:30 +0000 (11:18 +0000)]
meson: cleanup whitespace
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Eric Engestrom [Fri, 26 Jan 2018 15:10:46 +0000 (15:10 +0000)]
xf86atomic: fix -Wundef warning
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 16:23:01 +0000 (16:23 +0000)]
meson: sort HAVE_* defines
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 15:08:39 +0000 (15:08 +0000)]
always define HAVE_VALGRIND
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 15:15:29 +0000 (15:15 +0000)]
always define HAVE_CAIRO
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 15:19:03 +0000 (15:19 +0000)]
always define HAVE_FREEDRENO_KGSL
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 16:21:30 +0000 (16:21 +0000)]
meson,configure: always define HAVE_{INTEL,VMWGFX,NOUVEAU,EXYNOS,VC4,RADEON}
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 16:19:23 +0000 (16:19 +0000)]
meson,configure: remove unused HAVE_ETNAVIV define
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 16:17:53 +0000 (16:17 +0000)]
meson,configure: remove unused HAVE_FREEDRENO define
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 16:16:13 +0000 (16:16 +0000)]
meson,configure: remove unused HAVE_TEGRA define
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 16:10:04 +0000 (16:10 +0000)]
meson,configure: remove unused HAVE_OMAP define
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 16:05:45 +0000 (16:05 +0000)]
configure: remove unused HAVE_INSTALL_TESTS define
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 16:05:03 +0000 (16:05 +0000)]
configure: remove unused HAVE_CUNIT define
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 15:34:03 +0000 (15:34 +0000)]
meson: add missing HAVE_RADEON
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Eric Engestrom [Fri, 26 Jan 2018 11:03:32 +0000 (11:03 +0000)]
tests/etnaviv: drop unused `return 0`
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Eric Engestrom [Fri, 26 Jan 2018 11:05:09 +0000 (11:05 +0000)]
tests/util: drop unused parameters
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Eric Engestrom [Fri, 26 Jan 2018 11:05:28 +0000 (11:05 +0000)]
tests/util: fix signed/unsigned comparisons
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Eric Engestrom [Thu, 25 Jan 2018 11:24:03 +0000 (11:24 +0000)]
tests/amdgpu: drop unused variables
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Eric Engestrom [Fri, 26 Jan 2018 11:12:06 +0000 (11:12 +0000)]
tests/amdgpu: add parentheses to make operation priority explicit
While at it, align with the other half on the next line.
Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Eric Engestrom [Fri, 5 Jan 2018 15:32:14 +0000 (15:32 +0000)]
remove unnecessary double-semicolon
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Rob Clark [Wed, 24 Jan 2018 20:08:46 +0000 (15:08 -0500)]
freedreno: clamp priority based on # of rings
In case of a kernel that is new enough to support multiple submit-
queues, but with an adreno generation which doesn't support multiple
prioritized ringbuffers, we'd attempt to open a submit-queue with
prio=1 (medium), which is rejected by the kernel.
This could happen either w/ an older mesa (which uses fd_pipe_new())
or a newer mesa which defaults to prio=1 if no pipe context priority
flags are set.
The simple answer to fix both cases is to clamp the requested priority
according to the number of rings. This might not do exactly what you
want, if we hypothetically had 2 rings (it would result in requested
medium priority being high priority instead of low priority). But the
number of rings (for hw gen's that support this) is purely a software
construct, so the easy answer there is to have the kernel advertise at
least 3 rings if it supports more than one. There isn't really any
reason to do otherwise.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Michel Dänzer [Tue, 16 Jan 2018 15:49:45 +0000 (16:49 +0100)]
amdgpu: Disable VM test suite by default for SI ASICs
Hangs my Cape Verde.
Acked-by: Christian König <christian.koenig@amd.com>
Michel Dänzer [Tue, 16 Jan 2018 15:48:45 +0000 (16:48 +0100)]
amdgpu: Disable deadlock test suite by default for SI ASICs
Hangs my Cape Verde.
Acked-by: Christian König <christian.koenig@amd.com>
Andrey Grodzovsky [Thu, 25 Jan 2018 18:03:32 +0000 (13:03 -0500)]
amdgpu: Fix segfault in deadlock test.
If amdgpu_cs_query_fence_status terminates prematurely the BO
sometimes is unmapped before helper thread writes a vlaue
into it causing a segfault.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Andrey Grodzovsky [Thu, 25 Jan 2018 18:00:54 +0000 (13:00 -0500)]
amdgpu: Update deadlock test to not assert on ECANCELED
Kernel will abort jobs for guilty (causing GPU hang) context
with -ECANCELED don't assert if that the case.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Dylan Baker [Fri, 12 Jan 2018 19:53:39 +0000 (11:53 -0800)]
meson: set the minimum version correctly
Currently we ask for 0.42, but we actually require 0.43 because we pass
file objects as arguments to tests. If someone needs version 0.42 it
wouldn't be hard, just a lot of replacing files() with strings.
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Dylan Baker [Fri, 12 Jan 2018 19:51:17 +0000 (11:51 -0800)]
meson: set proper pkg-config version for libdrm_freedreno
Copy and paste error from exynos.
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Seung-Woo Kim [Wed, 10 Jan 2018 02:16:41 +0000 (11:16 +0900)]
modetest: Fix to check return value of asprintf()
There is warning about ignoring return value of 'asprintf'. Fix to
check return value of asprintf().
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Christian König [Mon, 22 Jan 2018 12:17:30 +0000 (13:17 +0100)]
amdgpu: fix high VA mask
That constant needs to be 64bits.
Fixes: amdgpu: use the high VA range if possible v2
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Christoph Haag [Thu, 18 Jan 2018 18:01:55 +0000 (19:01 +0100)]
meson: fix the install path of amdgpu.ids
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Michel Dänzer [Wed, 17 Jan 2018 16:05:31 +0000 (17:05 +0100)]
amdgpu: Symlink .editorconfig to tests/amdgpu
In order to use consistent editorconfig settings in both amdgpu
directories.
Reviewed-by: Christian König <christian.koenig@amd.com>
Michel Dänzer [Tue, 16 Jan 2018 15:55:53 +0000 (16:55 +0100)]
amdgpu: Don't dereference device_handle after amdgpu_device_deinitialize
Fixes use after free:
==2537== Invalid read of size 4
==2537== at 0x1162C9: suite_deadlock_tests_enable (deadlock_tests.c:101)
==2537== by 0x10B157: amdgpu_disable_suits (amdgpu_test.c:421)
==2537== by 0x10B157: main (amdgpu_test.c:560)
==2537== Address 0x5e44f24 is 452 bytes inside a block of size 1,016 free'd
==2537== at 0x4C2BE1B: free (vg_replace_malloc.c:530)
==2537== by 0x504CD8B: amdgpu_device_reference (amdgpu_device.c:164)
==2537== by 0x504CD8B: amdgpu_device_deinitialize (amdgpu_device.c:307)
==2537== by 0x1162BB: suite_deadlock_tests_enable (deadlock_tests.c:97)
==2537== by 0x10B157: amdgpu_disable_suits (amdgpu_test.c:421)
==2537== by 0x10B157: main (amdgpu_test.c:560)
==2537== Block was alloc'd at
==2537== at 0x4C2CC05: calloc (vg_replace_malloc.c:711)
==2537== by 0x504CA5E: amdgpu_device_initialize (amdgpu_device.c:212)
==2537== by 0x116298: suite_deadlock_tests_enable (deadlock_tests.c:93)
==2537== by 0x10B157: amdgpu_disable_suits (amdgpu_test.c:421)
==2537== by 0x10B157: main (amdgpu_test.c:560)
Reviewed-by: Christian König <christian.koenig@amd.com>
Michel Dänzer [Mon, 8 Jan 2018 10:20:25 +0000 (11:20 +0100)]
amdgpu: Don't print error message if parse_one_line returned -EAGAIN
It means it just didn't find an entry for the GPU in the amdgpu.ids file.
Fixes spurious
amdgpu_parse_asic_ids: Cannot parse ASIC IDs: Resource temporarily unavailable
error messages in that case.
Reported-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Dylan Baker [Fri, 15 Dec 2017 22:40:29 +0000 (14:40 -0800)]
README: Add note about meson
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Dylan Baker [Fri, 15 Dec 2017 22:34:02 +0000 (14:34 -0800)]
autotools: Include meson.build files in tarball
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Dylan Baker [Wed, 13 Sep 2017 18:46:13 +0000 (11:46 -0700)]
Add meson build system
This patch adds a complete meson build system, including tests and
install. It has the necessary hooks to allow it be used as a subproject
for other meson based builds such as mesa.
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-and-tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Hawking Zhang [Mon, 8 Jan 2018 03:20:30 +0000 (11:20 +0800)]
tests/amdgpu: execute copy linear on all the available rings
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Hawking Zhang [Mon, 8 Jan 2018 03:20:29 +0000 (11:20 +0800)]
tests/amdgpu: execute const fill on all the available rings
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Hawking Zhang [Mon, 8 Jan 2018 03:20:28 +0000 (11:20 +0800)]
tests/amdgpu: execute write linear on all the available rings
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Anuj Phogat [Wed, 10 Jan 2018 23:51:02 +0000 (15:51 -0800)]
intel: Add more Coffeelake PCI IDs
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Christian König [Sun, 7 Jan 2018 09:10:15 +0000 (10:10 +0100)]
test/amdgpu: fix compiler warnings
SWAP_32() should mask first and then shift.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Christian König [Tue, 7 Nov 2017 14:31:45 +0000 (15:31 +0100)]
amdgpu: use the high VA range if possible v2
Retire the low range on Vega10 this frees up everything below 0xffff800000000000 for HMM.
v2: keep the 32bit range working.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Christian König [Tue, 7 Nov 2017 14:31:45 +0000 (15:31 +0100)]
headers: sync up amdgpu_drm.h with drm-next
Sync up amdgpu changes from drm-next.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Christian König [Thu, 2 Nov 2017 17:54:59 +0000 (18:54 +0100)]
amdgpu: fix 32bit VA manager max address
The range is exclusive not inclusive.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Seung-Woo Kim [Thu, 4 Jan 2018 06:31:51 +0000 (15:31 +0900)]
amdgpu: fix not to add amdgpu.ids when building without amdgpu
The amdgpu.ids is only required when building with amdgpu support.
Fix not to add it without amdgpu.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Dave Airlie [Mon, 18 Dec 2017 01:24:34 +0000 (11:24 +1000)]
configure.ac: bump version for release
Keith Packard [Sat, 1 Jul 2017 07:43:15 +0000 (00:43 -0700)]
drm: Add CrtcGetSequence and CrtcQueueSequence IOCTLs [v2]
These provide a crtc-id based interface to get the current sequence
(frame) number and to queue an event to be delivered at a specific sequence.
v2: Remove FIRST_PIXEL_OUT flag. This has been removed from the
proposed kernel API
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Keith Packard [Fri, 17 Mar 2017 01:11:05 +0000 (18:11 -0700)]
drm: Add drm mode lease ioctl wrappers [v3]
drmModeCreateLease
drmModeListLessees
drmModeGetLease
drmModeRevokeLease
Changes for v2:
Remove lessee id from GetLease
Remove lessor_id from ListLeases
Add revoke
Renumber to track kernel rebase on drm-next
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Sat, 16 Dec 2017 23:27:10 +0000 (00:27 +0100)]
amdgpu: Add syncobj reset & signal wrappers.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Bas Nieuwenhuizen [Sat, 16 Dec 2017 23:27:09 +0000 (00:27 +0100)]
drm: Add drmSyncobjReset & drmSyncobjSignal wrappers.
anv already uses the ioctls but does not use libdrm, so these were
not wrapped yet.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Lucas Stach [Fri, 15 Dec 2017 10:30:26 +0000 (11:30 +0100)]
etnaviv: fix BO cache to properly work with different flags
Currently if the oldest BO in a bucket has different flags than what we
look for we'll miss the cache.Fix this by iterating over the cached BOs
until we find the oldest one with matching flags. This improves the hit
ratio for some of the buckets.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Andrey Grodzovsky [Fri, 15 Dec 2017 18:21:02 +0000 (13:21 -0500)]
tests/amdgpu: Add return CUE_SUCCESS to suite_vcn_tests_clean.
fixes:
806d0803600000faecb4025d8e9c7490cb097c25 (amdgpu: Use new suite/test disabling functionality.)
bug: https://bugs.freedesktop.org/show_bug.cgi?id=104280
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Christian Gmeiner [Fri, 15 Dec 2017 07:43:40 +0000 (08:43 +0100)]
etnaviv: support performance monitor requests
Add etna_cmd_stream_perf(..) to submit perform requests.
Userspace can submit pmrs via submit ioctl to sample perfmon
signals.
v3:
- mark perfmon bos as RW
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Christian Gmeiner [Fri, 15 Dec 2017 07:43:39 +0000 (08:43 +0100)]
etnaviv: add permon support
Query all domains and their signals and provide it this information
via struct etna_perfmon and the corresponding api functions.
v2:
- code style changes
- etna_perfmon_create(..): add missing clean up in error case
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Christian Gmeiner [Fri, 15 Dec 2017 07:43:38 +0000 (08:43 +0100)]
etnaviv: sync uapi header
Import the etnaviv header changes from kernel commit
05916bed1 (drm-next)
The drm_etnaviv_gem_submit structure was extended to include performance
monitor requests. Also two new ioctls got added to be able to readout
performance monitor domains and their signals.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Andrey Grodzovsky [Tue, 12 Dec 2017 13:33:09 +0000 (08:33 -0500)]
amdgpu: Remove dummy CU_ASSERT_EQUAL.
Fixes test failure on rhel.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Qiang Yu <Qiang.Yu@amd.com>
Michel Dänzer [Tue, 5 Dec 2017 11:59:35 +0000 (12:59 +0100)]
amdgpu.ids: Refresh from AMD 17.40 release
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Michel Dänzer [Thu, 30 Nov 2017 17:52:06 +0000 (18:52 +0100)]
amdgpu: Only remember the device's marketing name
There's no point in keeping around the full table of marketing names,
when amdgpu_get_marketing_name only ever returns the device's marketing
name.
Acked-by: Slava Abramov <slava.abramov@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Michel Dänzer [Fri, 1 Dec 2017 15:59:38 +0000 (16:59 +0100)]
amdgpu: Simplify error handling in parse_one_line
* Move empty/commented line check before the strdup and return -EAGAIN
directly
* Initialize r = -EAGAIN and remove redundant assignments
* Set r = -ENOMEM if last strdup fails, and remove redundant goto
Acked-by: Slava Abramov <slava.abramov@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Michel Dänzer [Thu, 30 Nov 2017 17:28:01 +0000 (18:28 +0100)]
amdgpu: Clean up amdgpu_parse_asic_ids error handling
* Move error message printing into amdgpu_parse_asic_ids and make it
return void
* Print only "Invalid format" error message if parse_one_line returns
-EINVAL
* Use strerror instead of printing the (negative) error code in hex
Acked-by: Slava Abramov <slava.abramov@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Andrey Grodzovsky [Fri, 24 Nov 2017 20:19:09 +0000 (15:19 -0500)]
amdgpu: Add explicit dependency test.
The test is as following:
1) Create context A & B
2) Send a command submission using context A which fires up a compute shader.
3) The shader wait a bit and then write a value to a memory location.
4) Send a command submission using context B which writes another value to the same memory location, but having an explicit dependency on the first command submission.
5) Wait with the CPU for both submissions to finish and inspect the written value.
Test passes if the value seen in the memory location after both submissions is from command B.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Michel Dänzer [Thu, 30 Nov 2017 14:52:50 +0000 (15:52 +0100)]
amdgpu: Add amdgpu_cs_create_syncobj2 to amdgpu-symbol-check
Fixes make check. Trivial.
David Mao [Tue, 28 Nov 2017 03:22:26 +0000 (11:22 +0800)]
amdgpu: Adding amdgpu_cs_create_syncobj2 to create syncobj as signaled initially
Signed-off-by: David Mao <david.mao@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Andrey Grodzovsky [Mon, 27 Nov 2017 12:26:13 +0000 (07:26 -0500)]
amdgpu: Dynamicly disable BO suite "Metadata" test.
Disable the test instead of doing #ifdef 0
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Andrey Grodzovsky [Fri, 24 Nov 2017 20:50:51 +0000 (15:50 -0500)]
amdgpu: Switch amdgpu CS tests enabling to the new way.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Rob Herring [Mon, 27 Nov 2017 19:38:29 +0000 (13:38 -0600)]
Android: disable warnings causing errors
AOSP master has changed the build default to -Werror making all the
warnings errors. Override that with -Wno-error.
Signed-off-by: Rob Herring <robh@kernel.org>
Andrey Grodzovsky [Tue, 14 Nov 2017 14:02:48 +0000 (09:02 -0500)]
amdgpu: Disable deadlock test suite for Vega 10
The test stalls the CP, until RCA is done the test is
disabled to not disrupt regression testing.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Andrey Grodzovsky [Mon, 13 Nov 2017 17:01:42 +0000 (12:01 -0500)]
amdgpu: Add memory over allocation test.
Allocates 1 TB of memory. Test is disabled by default
since it's triggers OOM killer.
v2:
FIx the test to only alloc the BO and assert if return value
not equal to -ENOMEM and remove test disable on start.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Andrey Grodzovsky [Fri, 10 Nov 2017 04:30:02 +0000 (23:30 -0500)]
amdgpu: Move memory alloc tests in bo suite.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Andrey Grodzovsky [Fri, 10 Nov 2017 04:30:01 +0000 (23:30 -0500)]
amdgpu: Use new suite/test disabling functionality.
Switch from disabling tests during run to using the new disable
API.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Andrey Grodzovsky [Fri, 10 Nov 2017 04:30:00 +0000 (23:30 -0500)]
amdgpu: Add functions to disable suites and tests.
Suits are diasbled based on hooks they provide (e.g incompatible
ASIC or missing blocks). Single tests are diasbled explicitly.
Suit or test can be forced to execute even if disabled by adding -f
flag after specifying suit [test] ids.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Eric Anholt [Wed, 8 Nov 2017 19:31:20 +0000 (11:31 -0800)]
headers: Drop outdated node about a delta in drm_mode.h.
Fixed in
9433b702fc16 ("headers: Sync drm{,_mode}.h with the kernel")
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Eric Anholt [Wed, 8 Nov 2017 19:22:55 +0000 (11:22 -0800)]
headers: Sync up kernel changes to use kernel types instead of stdint.h.
This pulls in pieces of drm-next
d65d31388a23 ("Merge tag
'drm-misc-next-fixes-2017-11-07' of
git://anongit.freedesktop.org/drm/drm-misc into drm-next")
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Eric Anholt [Wed, 8 Nov 2017 19:18:47 +0000 (11:18 -0800)]
headers: Sync up mga_drm.h from drm-next.
The kernel started using the struct from drm.h instead of the typedef.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Eric Anholt [Wed, 8 Nov 2017 19:09:54 +0000 (11:09 -0800)]
headers: Sync up some comment spelling and whitespace fixes from drm-next.
This pulls in pieces of drm-next
d65d31388a23
("Merge tag 'drm-misc-next-fixes-2017-11-07' of
git://anongit.freedesktop.org/drm/drm-misc into drm-next")
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Eric Anholt [Wed, 8 Nov 2017 19:06:55 +0000 (11:06 -0800)]
headers: Sync up some header guard changes from drm-next.
This pulls in pieces of drm-next
d65d31388a23
("Merge tag 'drm-misc-next-fixes-2017-11-07' of
git://anongit.freedesktop.org/drm/drm-misc into drm-next")
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Eric Anholt [Wed, 8 Nov 2017 19:04:31 +0000 (11:04 -0800)]
headers: Sync vc4 header from drm-next.
This updates the header with the contents from drm-next
d65d31388a23
("Merge tag 'drm-misc-next-fixes-2017-11-07' of
git://anongit.freedesktop.org/drm/drm-misc into drm-next")
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Christian König [Thu, 9 Nov 2017 09:36:05 +0000 (10:36 +0100)]
Revert "amdgpu: fix 32bit VA manager max address"
This reverts commit
944f6665de36b6a6c36263f23b7b9d1730e544fa.
Accidentially pushed an imcomplete patch.
Signed-off-by: Christian König <christian.koenig@amd.com>