Leo Liu [Sun, 21 Feb 2021 21:13:51 +0000 (16:13 -0500)]
amdgpu_drm: sync up with the latest amdgpu_drm.h based on drm-next (https://cgit.freedesktop.org/drm/drm)
What are these headers?
Adding currently missing stuff from https://cgit.freedesktop.org/drm/drm/tree/include/uapi/drm/amdgpu_drm.h based on
the latest commit there:
commit
f730f39eb981af249d57336b47cfe3925632a7fd (HEAD -> drm-next, tag: drm-next-2021-02-19, origin/drm-next, origin/HEAD)
Merge:
4f8ad4045b38 81ce8f04aa96
Author: Dave Airlie <airlied@redhat.com>
Date: Fri Feb 19 13:54:29 2021 +1000
Merge tag 'drm-intel-next-fixes-2021-02-18' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
Which headers go where?
From https://cgit.freedesktop.org/drm/drm/tree/include/uapi/drm/amdgpu_drm.h to
https://cgit.freedesktop.org/mesa/drm/tree/include/drm/amdgpu_drm.h
When and which headers to update?
If the kernel uapi drm header changes, the header here should be sync-ed.
When and how to update these files
The steps for generating this patch:
- Switch to freedesktop drm-next kernel branch (https://cgit.freedesktop.org/drm/drm);
- Install the headers via `make headers_install';
- Copy from kernel "include/uapi/drm/amdgpu_drm.h" to libdrm "include/drm/amdgpu_drm.h";
- generate the patch;
The commits from drm-next (https://cgit.freedesktop.org/drm/drm) are:
Mauro Carvalho Chehab (1)
c45dd3bda1c809eb120452597097e14a96b58c1f drm/amdgpu: fix some kernel-doc markups
Huang Rui(3)
6fbcb00c7984fa7d49af2c361453c0397cdea400 drm/amdgpu: add TOC firmware definition
1e483203965bdab466af0739c1edf7da07da241d drm/amdgpu: add uapi to define van gogh memory type
f7b2cdb23abf62bc3d33c2e0b0009a09412ff475 drm/amdgpu: add uapi to define van gogh series
Pierre-Eric Pelloux-Prayer(1)
16c642ec3fe9a144fbe1e97dc56f13a6308f1381 drm/amdgpu: new ids flag for tmz (v2)
Yong Zhao(1)
130c88931f6cbdb4513d307b4a13fcfff08a8041 drm/amdgpu: Improve the MTYPE comments
Signed-off-by: Leo Liu <leo.liu@amd.com>
Tejas Upadhyay [Thu, 18 Feb 2021 10:39:49 +0000 (10:39 +0000)]
intel: add INTEL_ADLS_IDS to the pciids list
This enables drm_intel_bufmgr on ADLS
Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tejas Upadhyay [Thu, 18 Feb 2021 10:12:28 +0000 (10:12 +0000)]
intel: sync i915_pciids.h with kernel
Align with kernel commits:
0883d63b19bb ("drm/i915/adl_s: Add ADL-S platform info and PCI ids")
04057a1afc75 ("drm/i915: Sort EHL/JSL PCI IDs")
0e8e272f1368 ("drm/i915/ehl: Remove invalid PCI ID")
605f9c290c1a ("drm/i915: Sort ICL PCI IDs")
514dc424ce4f ("drm/i915: Sort CNL PCI IDs")
32d4ec9a1681 ("drm/i915: Sort CFL PCI IDs")
df3478af1d73 ("drm/i915: Sort CML PCI IDs")
cd988984cbea ("drm/i915: Sort KBL PCI IDs")
b04d36f73771 ("drm/i915: Sort SKL PCI IDs")
9c0b2d30441b ("drm/i915: Sort HSW PCI IDs")
79033a0a7898 ("drm/i915: Ocd the HSW PCI ID hex numbers")
cfb3db8fdae2 ("drm/i915: Try to fix the SKL GT3/4 vs. GT3e/4e comments")
03e399020cd2 ("drm/i915: Add SKL GT1.5 PCI IDs")
812f044df08c ("drm/i915: Reclassify SKL 0x1923 and 0x1927 as ULT")
194909a32aed ("drm/i915: Reclassify SKL 0x192a as GT3")
82e84284ab7d ("drm/i915: Update Haswell PCI IDs")
24ea098b7c0d ("drm/i915/jsl: Split EHL/JSL platform info and PCI ids")
b50b7991b739 ("drm/i915/dg1: add more PCI ids")
d452bd091e16 ("drm/i915: break TGL pci-ids in GT 1 & 2")
f2bde2546b81 ("drm/i915: Remove dubious Valleyview PCI IDs")
0883d63b19bb ("drm/i915/adl_s: Add ADL-S platform info and PCI ids")
04057a1afc75 ("drm/i915: Sort EHL/JSL PCI IDs")
0e8e272f1368 ("drm/i915/ehl: Remove invalid PCI ID")
605f9c290c1a ("drm/i915: Sort ICL PCI IDs")
514dc424ce4f ("drm/i915: Sort CNL PCI IDs")
32d4ec9a1681 ("drm/i915: Sort CFL PCI IDs")
df3478af1d73 ("drm/i915: Sort CML PCI IDs")
cd988984cbea ("drm/i915: Sort KBL PCI IDs")
b04d36f73771 ("drm/i915: Sort SKL PCI IDs")
9c0b2d30441b ("drm/i915: Sort HSW PCI IDs")
79033a0a7898 ("drm/i915: Ocd the HSW PCI ID hex numbers")
cfb3db8fdae2 ("drm/i915: Try to fix the SKL GT3/4 vs. GT3e/4e comments")
03e399020cd2 ("drm/i915: Add SKL GT1.5 PCI IDs")
812f044df08c ("drm/i915: Reclassify SKL 0x1923 and 0x1927 as ULT")
194909a32aed ("drm/i915: Reclassify SKL 0x192a as GT3")
82e84284ab7d ("drm/i915: Update Haswell PCI IDs")
24ea098b7c0d ("drm/i915/jsl: Split EHL/JSL platform info and PCI ids")
b50b7991b739 ("drm/i915/dg1: add more PCI ids")
d452bd091e16 ("drm/i915: break TGL pci-ids in GT 1 & 2")
Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
Reviewed-by: Landwerlin, Lionel G <lionel.g.landwerlin@intel.com>
Alex Deucher [Mon, 15 Feb 2021 15:02:15 +0000 (10:02 -0500)]
amdgpu: update marketing names
From 20.45 release.
Acked-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Victor Hugo Vianna Silva [Wed, 10 Feb 2021 18:16:10 +0000 (18:16 +0000)]
Avoid some compiler errors for tests/util/pattern.c
- Remove one unused variable.
- Convert two int-s into 'unsigned int'.
Motivated by a failed build of Chromium.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Victor Hugo Vianna Silva <victor.vianna10@gmail.com>
Emil Velikov [Fri, 5 Feb 2021 00:41:13 +0000 (00:41 +0000)]
xf86drm: cap number of reported devices by drmGetDevice(2)
Do as the documentation says - cap the number of reported devices to the
requested amount - aka max_devices. Otherwise we risk out-of-bound access
for users of the API.
Issue: https://gitlab.freedesktop.org/mesa/drm/-/issues/56
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Sonny Jiang [Fri, 22 Jan 2021 01:44:03 +0000 (20:44 -0500)]
tests/amdgpu/vcn: clean abundant codes
Remove useless codes.
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
James Zhu [Wed, 29 Jul 2020 16:55:52 +0000 (12:55 -0400)]
tests/amdgpu: add vcn test support for dimgrey_cavefish
add dimgrey_cavefish chip id in vcn test
Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Tao Zhou [Tue, 23 Jun 2020 06:02:00 +0000 (14:02 +0800)]
tests/amdgpu: add vcn test support for navy_flounder
add navy_flounder chip id in vcn test
Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com>
Fabio Estevam [Wed, 30 Dec 2020 18:29:33 +0000 (15:29 -0300)]
tests/util: Add mxsfb-drm driver
Add an entry for the "mxsfb-drm" driver, so that the test utilities
work with the mxsfb driver without passing the -M argument.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Heiko Becker [Fri, 15 Jan 2021 20:11:41 +0000 (21:11 +0100)]
meson: Also search for rst2man.py
That's what upstream docutils installs by default.
Signed-off-by: Heiko Becker <heirecka@exherbo.org>
Valentin Churavy [Tue, 17 Nov 2020 19:51:04 +0000 (19:51 +0000)]
Use dep_rt in amdgpu/meson.build
The amdgpu implementation uses `clock_gettime` so it needs to check whether it needs to link
against `-librt`.
Signed-off-by: Valentin Churavy <v.churavy@gmail.com>
Simon Ser [Mon, 11 Jan 2021 16:18:20 +0000 (17:18 +0100)]
Bump version to 2.4.104
Signed-off-by: Simon Ser <contact@emersion.fr>
Antonin Décimo [Mon, 16 Nov 2020 11:26:56 +0000 (12:26 +0100)]
headers: drm: Sync with drm-next
Generated using make headers_install from the drm-next
tree - git://anongit.freedesktop.org/drm/drm
branch - drm-next
commit -
b10733527bfd864605c33ab2e9a886eec317ec39
The changes were as follows (shortlog from
14d2bd53a47a7e1cb3e03d00a6b952734cf90f3f):
core: (drm_mode.h)
Alexander A. Klimov (1):
drm: Replace HTTP links with HTTPS ones
Noralf Trønnes (1):
drm: Add SPI connector type
Oleg Vasilev (1):
drm: report dp downstream port type as a subconnector property
Simon Ser (1):
drm: document that blobs are ref'counted
Uma Shankar (3):
drm: Add HDR source metadata property
drm: Fixed doc warnings in drm uapi header
drm: Fix docbook warnings in hdr metadata helper structures
core: (drm_fourcc.h)
Adam Jackson (1):
drm/fourcc: Fix undefined left shift in DRM_FORMAT_BIG_ENDIAN macros
Bas Nieuwenhuizen (2):
drm/fourcc: Add AMD DRM modifiers.
drm/fourcc: Fix modifier field mask for AMD modifiers.
Ben Davis (2):
drm: drm_fourcc: add NV15, Q410, Q401 YUV formats
drm: drm_fourcc: Add uncompressed AFBC modifier
Brian Starkey (1):
drm: drm_fourcc: Add generic alias for 16_16_TILE modifier
Dave Airlie (1):
Merge tag 'amd-drm-next-5.11-2020-11-05' of git://people.freedesktop.org/~agd5f/linux into drm-next
Dhinakaran Pandiyan (2):
drm/framebuffer: Format modifier for Intel Gen-12 render compression
drm/framebuffer: Format modifier for Intel Gen-12 media compression
James Jones (1):
drm: Generalized NV Block Linear DRM format mod
Maarten Lankhorst (1):
Backmerge remote-tracking branch 'drm/drm-next' into drm-misc-next
Matteo Franchin (1):
drm/fourcc: Add AXBXGXRX106106106106 format
Mika Kahola (1):
uapi/drm/drm_fourcc.h: Note on platform specificity for format modifiers
Neil Armstrong (2):
drm/fourcc: Add modifier definitions for describing Amlogic Video Framebuffer Compression
drm/fourcc: fix Amlogic Video Framebuffer Compression macro
Raymond Smith (1):
drm/fourcc: Add Arm 16x16 block modifier
Simon Ser (4):
drm/fourcc: document modifier uniqueness requirements
drm: deprecate DRM_FORMAT_MOD_NONE
drm/fourcc: add table describing AMD modifiers bit layout
drm/fourcc: fix AMD modifiers PACKERS field doc
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
Simon Ser [Sat, 12 Dec 2020 11:39:36 +0000 (12:39 +0100)]
Remove outdated comments about stdint.h
We include stdint.h unconditionally in the header. We don't require
users to include it manually before xf86drmMode.h.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Simon Ser [Fri, 11 Dec 2020 21:23:00 +0000 (22:23 +0100)]
Remove definitions duplicated from drm_mode.h
I don't exactly know why these were duplicated before. Maybe libdrm
didn't always vendored drm_mode.h from the kernel? In any case, we now
do, so instead of having copy-pasted definitions, just include our
vendored version which cannot be outdated.
Contrary to what the comment says, drm.h doesn't include drm_mode.h, so
we need to add the include.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Emmanuel Vadot [Wed, 4 Nov 2020 15:13:56 +0000 (16:13 +0100)]
tests/amdgpu: Fix on FreeBSD
FreeBSD have endian.h under the sys directory.
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Luben Tuikov [Mon, 30 Nov 2020 22:07:39 +0000 (17:07 -0500)]
tests/amdgpu: Fix a typo
Fix a typo: "TZM" --> "TMZ"
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Nicolas Caramelli [Tue, 24 Nov 2020 05:35:28 +0000 (06:35 +0100)]
tests/modetest: remove bracket in dump_connectors()
Signed-off-by: Nicolas Caramelli <caramelli.devel@gmail.com>
Simon Ser [Thu, 26 Nov 2020 16:20:04 +0000 (17:20 +0100)]
xf86drmMode.h: use ANSI C99 arrays
This avoids the use of a GNU-specific extension in public headers. Also
see [1].
[1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/80#note_707458
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Simon Ser [Wed, 18 Nov 2020 09:58:59 +0000 (10:58 +0100)]
Document drmModeConnection
Signed-off-by: Simon Ser <contact@emersion.fr>
Simon Ser [Wed, 3 Jun 2020 09:58:07 +0000 (11:58 +0200)]
man: convert to reStructuredText
DocBook makes it hard to write and maintain docs. Hopefully
reStructuredText can make this less painful.
The man pages were converted from DocBook to reStructuredText via
Pandoc:
pandoc -s -f docbook -t rst -o man/drm.7.rst man/drm.xml
And then manual editing to fixup e.g. references to other man pages. To
compare the result with the DocBook version, this command was used:
rst2man man/drm-kms.7.rst | man -l -
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Lubomir Rintel [Tue, 1 Dec 2020 20:38:29 +0000 (21:38 +0100)]
tests/etnaviv_2d_test: check whether the rendering is correct
Instead of always dumping the rendered picture, check whether it matches
the expectations. This makes more sense for automated testing.
Retain the ability to dump the picture instead of checking it when a
file name is given as an argument. This also removes use of a hardcoded
file name in a world writable directory, which is an unsafe thing to
do anyway.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Lubomir Rintel [Tue, 1 Dec 2020 20:38:28 +0000 (21:38 +0100)]
tests/etnaviv_2d_test: pick the 2D core
Run the test on a core capable of 2D rendering instead of hardcoding to
core zero.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Lubomir Rintel [Tue, 1 Dec 2020 20:38:27 +0000 (21:38 +0100)]
tests/etnaviv_2d_test: explain the errors
Just so that it's obvious what failed and why.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Thong Thai [Mon, 2 Nov 2020 15:15:07 +0000 (10:15 -0500)]
tests/amdgpu/vcn: update to not use asic_id for Renoir
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Dave Airlie [Wed, 4 Nov 2020 03:19:09 +0000 (13:19 +1000)]
Bump version to 2.4.103
Signed-off-by: Dave Airlie <airlied@redhat.com>
Lucas Stach [Fri, 20 Mar 2020 17:27:59 +0000 (18:27 +0100)]
tests/util: Add imx-dcss driver
This makes the test utilities work with the i.MX DCSS driver without the
necessity of using the -M argument.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Paul Gofman [Mon, 26 Oct 2020 13:11:20 +0000 (16:11 +0300)]
xf86drm.c: Use integer logarithm.
log() is affected by FP control word and can provide inaccurate result.
Fixes Killer Instinct under Wine not being able to find AMD vulkan
device.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Tianci.Yin [Fri, 23 Oct 2020 06:56:11 +0000 (14:56 +0800)]
tests/amdgpu: disable VCN test if no VCN ring available(v2)
If KMD has no VCN support, remove the VCN test.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Tianci.Yin <tianci.yin@amd.com>
Carsten Haitzler [Fri, 16 Oct 2020 10:00:15 +0000 (11:00 +0100)]
tests: add komeda to list of modules to look for for testing
komeda is one of the supported GPUs in the kernel tree so this adds it
to libdrm modules to look for in tests.
Signed-off-by: Carsten Haitzler <carsten.haitzler@arm.com>
Alex Deucher [Wed, 27 May 2020 21:33:10 +0000 (17:33 -0400)]
amdgpu: only enable security tests on raven family
It's the only asic with support at the moment.
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Luben Tuikov [Thu, 6 Feb 2020 00:40:46 +0000 (19:40 -0500)]
tests/amdgpu: Secure bounce test (v4)
Implement secure bounce test. Steps implemented
as outlined by Christian K.
v2: Remove gpu_info; add comment describing
the purpose and steps of the test.
v3: Parameterize "secure" in amdgpu_bo_lcopy() and
amdgpu_bo_move(). Set them both to 0.
Allocate buffer Bob to be non-TMZ.
v4: Fix an off-by-one bug which was causing
the test to segfault.
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Luben Tuikov [Thu, 21 May 2020 19:32:08 +0000 (15:32 -0400)]
tests/amdgpu: Remove forward declarations
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Aaron Liu [Mon, 18 Nov 2019 08:49:47 +0000 (16:49 +0800)]
test/amdgpu: enable security suite tests
This patch enables security suite tests.
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Aaron Liu [Mon, 18 Nov 2019 08:46:11 +0000 (16:46 +0800)]
test/amdgpu: add drm version checking for security suite
Adding drm version checking for security suite.
drm version need to be at least 3.37.
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Aaron Liu [Fri, 15 Nov 2019 01:46:32 +0000 (09:46 +0800)]
tests/amdgpu: add test to submit a sdma command with secure context
This patch add test to submit a sdma command with secure context.
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Aaron Liu [Fri, 15 Nov 2019 01:42:03 +0000 (09:42 +0800)]
tests/amdgpu: add atomic dma command to verify the secure buffer (v2)
DMA's atomic behavir is unlike GFX,If the comparing data is not
equal to destination data,
For GFX, loop again till gfx timeout(system hang).
For DMA, loop again till timer expired and then send interrupt.
So testcase can't use interrupt mechanism.
We take another way to verify. When the comparing data is not
equal to destination data, overwrite the source data to the destination
buffer. Otherwise, original destination data unchanged.
So if the bo_cpu data is overwritten, the result is passed.
Steps:
1. use linear write packet to write 0xdeadbeaf to secure buffer,
2. use atmoic packet and ATOMIC_CMPSWAP_RTN_32 opcode to compare
the cmp_data(0xdeadbeaf) to the written data which has been encrypted.
v2: add the case of (dest_data != cmp_data).
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Aaron Liu [Thu, 14 Nov 2019 08:36:53 +0000 (16:36 +0800)]
tests/amdgpu: add test to submit a gfx command with secure context
This patch is to test the command submission with secure context.
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Aaron Liu [Thu, 14 Nov 2019 08:14:06 +0000 (16:14 +0800)]
tests/amdgpu: add atomic_mem cp_packet to verify the secure buffer
Secure buffer is only able to be read with trusted ip block.
So we need use GFX ip to read it back instead of CPU.
Steps:
1. use write_data packet to write 0xdeadbeaf to secure buffer,
2. use atmoic_mem packet and ATOMIC_CMPSWAP_RTN_32 opcode to compare
the cmp_data(0xdeadbeaf) to the written data which has been encrypted.
If the result is equal, then overwrite the src_data(0x12345678) to the
secure buffer and return directly. Otherwise loop again until gfx timeout
and the secure buffer data unchanged.
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Aaron Liu [Thu, 14 Nov 2019 07:54:10 +0000 (15:54 +0800)]
tests/amdgpu: expand secure param for exec_cs_helper (v2)
This patch expands secure param for amdgpu_test_exec_cs_helper_raw.
The flag is transfered to kernel with cs.
v2: squash in change from context to IB flag
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Fri, 16 Aug 2019 11:02:51 +0000 (19:02 +0800)]
tests/amdgpu: add device handle as input param for exec_cs_helper and write_linear_helper (v4)
This patch is to add add device handle as input param for exec_cs_helper
and write_linear_helper.
Because they are needed in security tests.
v2: fix typo that basic tests should be un-secure.
v3: refine the function implementation.
v4: remove amdgpu_cs_ctx_create3 calling.
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Fri, 16 Aug 2019 09:07:07 +0000 (17:07 +0800)]
tests/amdgpu: expand write linear helper for security (v3)
This patch expand write linear helper for security to submit the command
with secure context.
v2: refine the function implementation.
v3: remove amdgpu_cs_ctx_create3.
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@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>
Huang Rui [Fri, 16 Aug 2019 08:32:16 +0000 (16:32 +0800)]
tests/amdgpu: add secure buffer allocation test for invisible VRAM
This patch is to add secure buffer allocation test for invisible VRAM.
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Huang Rui <ray.huang@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>
Huang Rui [Fri, 16 Aug 2019 08:18:21 +0000 (16:18 +0800)]
tests/amdgpu: add secure buffer allocation test for system memory
This patch is to add secure buffer allocation test for system memory.
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Huang Rui <ray.huang@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>
Huang Rui [Sun, 11 Aug 2019 13:23:24 +0000 (21:23 +0800)]
tests/amdgpu: add security test suite (v2)
This patch is to add a new test suite to store security tests.
In Raven+ asics, it will support TMZ (trust memory zone), and it is
page-based protection feature.
v2: remove tests/amdgpu/Makefile.am and update to
tests/amdgpu/meson.build
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Aaron Liu <aaron.liu@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>
Alex Deucher [Thu, 21 May 2020 19:28:23 +0000 (15:28 -0400)]
amdgpu: sync up amdgpu_drm.h with latest from kernel
From drm-next:
commit
c41219fda6e04255c44d37fd2c0d898c1c46abf1
Merge:
e20bb857dea2 d96536f0fe69
Author: Dave Airlie <airlied@redhat.com>
Date: Thu May 21 10:44:32 2020 +1000
Merge tag 'drm-intel-next-fixes-2020-05-20' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
Fix for TypeC power domain toggling on resets (Cc: stable).
Two compile time warning fixes.
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200520123227.GA21104@jlahtine-desk.ger.corp.intel.com
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Le Ma [Wed, 24 Jul 2019 08:47:08 +0000 (16:47 +0800)]
tests/amdgpu: disable unsupported test cases for Arcturus
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Le Ma [Wed, 24 Jul 2019 07:42:24 +0000 (15:42 +0800)]
tests/amdgpu: move arcturus asic check function to common place
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
James Zhu [Thu, 15 Oct 2020 17:41:26 +0000 (13:41 -0400)]
tests/amdgpu/vcn: add Arcturus decode test support
Add Arcturus decode test support only
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Le Ma [Mon, 4 Mar 2019 08:56:55 +0000 (16:56 +0800)]
tests/amdgpu: disable gfx engine basic test cases for Arcturus
Since Arcturus has no gfx pipeline(CPG), cases below is not suitable:
- Command submission Test (GFX)
- Command submission Test (Multi-Fence)
- Sync dependency Test
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Le Ma [Mon, 4 Mar 2019 10:27:48 +0000 (18:27 +0800)]
tests/amdgpu: create Active function for basic test suite
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Le Ma [Thu, 27 Jun 2019 10:57:14 +0000 (18:57 +0800)]
tests/amdgpu: add function to check Asic is Arcturus
Since Arcturus has no gfx engine, add function to blacklist gfx related test.
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Mon, 5 Oct 2020 14:55:25 +0000 (10:55 -0400)]
amdgpu: add marketing names from 20.40
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tapani Pälli [Fri, 25 Sep 2020 06:19:35 +0000 (09:19 +0300)]
intel: add INTEL_DG1_IDS to the pciids list
This enables drm_intel_bufmgr on DG1 and allows us to pass dmabuf
import/export related tests with Piglit.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
sitanliu [Thu, 27 Aug 2020 17:01:28 +0000 (17:01 +0000)]
amdgpu: add device IDs for Raven, Picasso and Renoir
Adam Miszczak [Fri, 21 Aug 2020 06:15:10 +0000 (08:15 +0200)]
intel: sync i915_pciids.h with kernel
Add DG1 and clean-up VLV PCI IDs.
Align with kernel commits:
f2bde2546b81 ("drm/i915: Remove dubious Valleyview PCI IDs")
fd38cdb81105 ("drm/i915/dg1: Add DG1 PCI IDs")
Signed-off-by: Adam Miszczak <adam.miszczak@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Jeremy Cline [Thu, 13 Aug 2020 17:00:53 +0000 (13:00 -0400)]
man: Update the bug URL to gitlab.freedesktop.org
Point users to the GitLab issue tracker instead of Bugzilla, which is no
longer used.
Signed-off-by: Jeremy Cline <jcline@redhat.com>
sunil kumar dora sermsity [Fri, 21 Aug 2020 20:02:53 +0000 (20:02 +0000)]
intel: Add PCI ID support to RKL platform
Missing RKL PCI ID preventing below test cases to succeed on RKL Platform.
igt@kms_frontbuffer_tracking
igt@kms_draw-crc
igt@kms_big_fb
Signed-off-by: sunil kumar dora sermsity <sunilx.kumar.dora.sermsity@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Pavan Kumar Ramayanam [Tue, 18 Aug 2020 11:28:51 +0000 (16:58 +0530)]
amdgpu: Add Device IDs for Embedded Raven2 platforms
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Pavan Kumar Ramayanam <pavan.ramayanam@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
José Roberto de Souza [Wed, 8 Jul 2020 17:44:53 +0000 (10:44 -0700)]
intel: sync i915_pciids.h with kernel
Two new patches landed in kernel adding new PCI ids:
123f62de419f ("drm/i915/rkl: Add RKL platform info and PCI ids")
52797a8e8529 ("drm/i915/ehl: Add new PCI ids")
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Leo Liu [Thu, 14 May 2020 16:30:28 +0000 (12:30 -0400)]
tests/amdgpu: clear the extension flag
This is workaround of firmware issue, and the change has no impact
on the legacy HW.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Leo Liu [Thu, 14 May 2020 16:27:41 +0000 (12:27 -0400)]
tests/amdgpu: clear msg decode flag
It is not used for VCN from VCN1, but VCN3 use it
for other feature, so clear it, because we don't
use the feature for now
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Leo Liu [Thu, 14 May 2020 16:24:53 +0000 (12:24 -0400)]
tests/amdgpu: add VCN3.0 regs support
VCN3.0 has its own set of internal regs
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Heiko Thiery [Fri, 5 Jun 2020 21:46:52 +0000 (23:46 +0200)]
xf86drm.c: fix build failure
./xf86drm.c: In function 'drmNodeIsDRM':
../xf86drm.c:2825:7: error: "__FreeBSD__" is not defined [-Werror=undef]
#elif __FreeBSD__
^
../xf86drm.c: In function 'drmGetMinorNameForFD':
../xf86drm.c:2938:7: error: "__FreeBSD__" is not defined [-Werror=undef]
#elif __FreeBSD__
^
../xf86drm.c: In function 'drmParsePciBusInfo':
../xf86drm.c:3258:7: error: "__FreeBSD__" is not defined [-Werror=undef]
#elif __FreeBSD__
^
../xf86drm.c: In function 'drmParsePciDeviceInfo':
../xf86drm.c:3427:7: error: "__FreeBSD__" is not defined [-Werror=undef]
#elif __FreeBSD__
^
../xf86drm.c: In function 'drmGetDeviceNameFromFd2':
../xf86drm.c:4305:7: error: "__FreeBSD__" is not defined [-Werror=undef]
#elif __FreeBSD__
^
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Eric Engestrom [Thu, 28 May 2020 15:17:26 +0000 (17:17 +0200)]
core: use `O_RDONLY` instead of ambiguous `0` flag
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Alex Deucher [Thu, 21 May 2020 17:21:54 +0000 (13:21 -0400)]
amdgpu: add marketing names from 20.10
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Dave Airlie [Tue, 26 May 2020 20:32:57 +0000 (06:32 +1000)]
Bump version to 2.4.102
Signed-off-by: Dave Airlie <airlied@redhat.com>
Emil Velikov [Mon, 22 Jul 2019 16:08:23 +0000 (13:08 -0300)]
modetest: Add a new "-r" option to set a default mode
This option finds all connected connector and then sets its preferred
mode on it. If no preferred mode is available, first mode is used.
This option must be set w/o any mode or plane.
This allows for a quick test on all connected outputs.
Loosely based on the work by Ezequiel Garcia <ezequiel@collabora.com>
Changes since Ezequiel's work:
- implement atomic codepath
- set all connectors
- pick correct crtc
- don't set -r by default
- nearly identical output in atomic and non-atomic codepaths
v2:
- Use the crtc->crtc_id, instead of the plane's current crtc_id
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Wed, 15 Apr 2020 09:37:24 +0000 (10:37 +0100)]
modetest: reorder atomic path alike the non-atomic
Makes the code a tiny bit more symmetrical.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Wed, 15 Apr 2020 09:28:36 +0000 (10:28 +0100)]
modetest: don't error out of final AtomicCommit
The very final drmModeAtommicCommit tears down the existing mode/plane
setup. Following it we clean up other misc state laying around.
Chances are that it will not fail, but in the extremely unlikely case it
does, there's nothing one can do.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Wed, 15 Apr 2020 09:20:07 +0000 (10:20 +0100)]
modetest: factor out atomic pageflip test
Move the hunk of code into a function, making the overall flow easier to
follow and providing some symmetry to the non-atomic path.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Mon, 13 Apr 2020 14:33:50 +0000 (15:33 +0100)]
modetest: push pipe_resolve_connectors() to set_mode
The function is closely related to pipe_find_crtc_and_mode() so we might
as well keep them together.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Wed, 15 Apr 2020 08:57:09 +0000 (09:57 +0100)]
modetest: move pipe_resolve_connectors() further up
Move the function above set_mode, since we'll be using it from there as
of next commit.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Mon, 13 Apr 2020 15:05:52 +0000 (16:05 +0100)]
modetest: unify {,atomic_}set_mode()
Instead of duplicating the exact same code across the two functions,
fold them into one.
For some strange reason git diff may show atomic_clear_mode() as changed
The function in untouched, despite the misleading output.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Mon, 13 Apr 2020 11:09:59 +0000 (12:09 +0100)]
modetest: get the crtc_id from the pipe_arg
Makes the code shorter and easier to read.
Currently if the user has not set the crtc_id, we fetch the crtc yet do
not "bother" setting the id - do so.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Mon, 13 Apr 2020 11:31:23 +0000 (12:31 +0100)]
modetest: introduce and use get_crtc_by_id() and get_crtc_mask()
Let's make the code shorter, this avoid crashes (when drmModeGetCrtc()
fails) by using a couple of helpers. As get_resources() considers the
drmModeGetCrtc() fail non-fatal, we might as well handle it properly.
v2: Add a comment above the unreachable abort() (Eze)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Tue, 14 Apr 2020 10:31:07 +0000 (11:31 +0100)]
modetest: close the device on exit
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Mon, 13 Apr 2020 10:26:18 +0000 (11:26 +0100)]
modetest: remove drmMode{,Plane}Res
There's no point in keeping these around since we already fetch the
complete data set. Add respective count_ variables and greatly simplify
the existing code.
Extra brownie points for:
- using the inverse order in free_resources()
- don't memory leak the connector properties
- free the properties themselves, instead of only the objects
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Fri, 10 Apr 2020 22:29:58 +0000 (23:29 +0100)]
modetest: add and use bo_fb_create() helper
Flesh out the bo_create + drmModeAddFB2 dance into a helper and use it.
Currently we're duplicating that in 4 places, many of which leaking et
al.
As a bonus point this highlights that the atomic_set_plane() seems tad
buggy. That'll be fixed with separate commit.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Fri, 10 Apr 2020 17:31:18 +0000 (18:31 +0100)]
modetest: set atomic cap, _only_ when needed
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Fri, 10 Apr 2020 19:17:07 +0000 (20:17 +0100)]
modetest: move basic args check before open()
Don't bother opening the device node, if the args combination is invalid
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Fri, 10 Apr 2020 19:14:32 +0000 (20:14 +0100)]
modetest: remove cursor/page_flipping_supported stubs
The two functions have been stubs for ages. The alluded generic ioctls
never came to be, assumingly because all new drivers support those.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Emil Velikov [Fri, 10 Apr 2020 19:12:54 +0000 (20:12 +0100)]
modetest: simplify "dump all" logic
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Jose Maria Casanova Crespo [Tue, 5 May 2020 19:50:33 +0000 (21:50 +0200)]
meson: require valgrind 3.10.0 to enable it with freedreno
Freedreno uses VALGRIND_ENABLE_ADDR_ERROR_REPORTING_IN_RANGE that was
introduced in Valgrind 3.10.0
Raspbian Buster includes Valgrind 3.7.0, so when valgrind is installed
as freedreno is build by default the build becomes broken. So lets
require 3.10 to enable valgrind when freedreno is built.
v2: Keep the arguments listed in the same order (Emil Velikov)
Closes: https://gitlab.freedesktop.org/mesa/drm/-/issues/37
Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Karol Herbst [Tue, 5 May 2020 17:14:55 +0000 (19:14 +0200)]
nouveau: sync up with nouveau_abi16.h and nouveau_drm.h
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Boram Park [Sat, 1 Oct 2011 00:30:09 +0000 (09:30 +0900)]
drm mode : fix memory leak when freeing drmModePropertyPtr
Closes: https://gitlab.freedesktop.org/mesa/drm/-/issues/5
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emmanuel Vadot [Tue, 28 Apr 2020 14:33:05 +0000 (16:33 +0200)]
libdrm: drmGetDeviceNameFromFd: Always return /dev/dri/ node for FreeBSD
Since we now always returns the /dev/dri/ node for
drmGet<nodetype>DeviceNameFromFd, be consistant with the names returned
in drmGetDeviceNameFromFd.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Emmanuel Vadot [Tue, 28 Apr 2020 13:26:13 +0000 (15:26 +0200)]
libdrm: drmGetMinorNameFromFd: Fix FreeBSD variant
Fix the FreeBSD variant by getting the node type represented by fd to deduce
the target minor name.
We then return the full /dev/dri/<minorname><id> version.
Fix: #41
Fixes:
6818a50b12
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Karol Herbst [Sun, 3 May 2020 14:17:42 +0000 (16:17 +0200)]
nouveau: fix compile error with -DDEBUG on newer gcc
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Nicholas Bishop [Wed, 5 Feb 2020 01:27:33 +0000 (20:27 -0500)]
libdrm: intel: add DRM_RDWR flag in drm_intel_bo_gem_export_to_prime
This is similar to
b81d44d587d1706d5c7568e539340632a748782b: the
DRM_RDWR flag is needed for mmap to work.
Signed-off-by: Nicholas Bishop <nicholasbishop@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Nicholas Bishop [Fri, 24 Apr 2020 16:16:31 +0000 (12:16 -0400)]
intel: properly escape sed pattern for tests
The sed was incorrectly modifying e.g. "nicholasbishop" to
"nicholasbop". The updated pattern will only match `.sh` at the end of
the string.
Signed-off-by: Nicholas Bishop <nicholasbishop@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Leo Liu [Thu, 23 Apr 2020 16:05:09 +0000 (12:05 -0400)]
tests/amdgpu/vcn: add Renoir VCN2.0 decode support
Renoir is the same family as Raven, but it's with VCN2.0,
so it has to use VCN2.0 reg set
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-By: Thong Thai <thong.thai@amd.com>
Scott Anderson [Fri, 31 Jan 2020 03:18:19 +0000 (16:18 +1300)]
libdrm: Handle usb_interface devices for usb parsing
Currently the code expects that the device found at
/sys/char/$maj:$min/device for USB devices is a "usb_device". However,
at least for some devices, such as for the udl driver, they are instead
a "usb_interface".
A usb_interface is a child of the usb_device we're interested in, so we
walk up one in the /sys path to get there.
For example, with a USB device I have, trimmed to show the relevant
information:
```
$ udevadm info /dev/dri/card1
P: /devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-4/1-4:1.0/drm/card1
E: DEVTYPE=drm_minor
$ udevadm info /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-4/1-4:1.0
E: DEVTYPE=usb_interface
E: DRIVER=udl
$ udevadm info /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-4
E: DEVTYPE=usb_device
E: DRIVER=usb
E: BUSNUM=001
E: DEVNUM=009
```
Signed-off-by: Scott Anderson <scott@anderso.nz>
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>