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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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)
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>
Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
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>
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>