Hello community, here is the log from the commit of package libdrm for openSUSE:Factory checked in at 2019-01-26 22:18:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libdrm (Old) and /work/SRC/openSUSE:Factory/.libdrm.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libdrm" Sat Jan 26 22:18:30 2019 rev:142 rq:667855 version:2.4.97 Changes: -------- --- /work/SRC/openSUSE:Factory/libdrm/libdrm.changes 2019-01-11 14:01:01.944069200 +0100 +++ /work/SRC/openSUSE:Factory/.libdrm.new.28833/libdrm.changes 2019-01-26 22:18:33.163043458 +0100 @@ -1,0 +2,27 @@ +Tue Jan 22 19:17:58 UTC 2019 - sndir...@suse.com + +- Update to version 2.4.97 + * amdgpu: update to latest marketing names from 18.50 + * amdgpu/test: Add illegal register and memory access test v2 + * amdgpu/test: Disable deadlock tests for all non gfx8/9 ASICs. + * amdgpu/test: Enable deadlock test for CI family (gfx7) + * amdgpu: add VM test to exercise max/min address space + * doc: Rename README&CONTRIBUTING to .rst + * Avoid hardcoded strlens in drmParseSubsystemType(). + * drm: Attempt to parse SPI devices as platform bus devices. + * xf86drmHash: remove unused loop variable + * meson: fix typo in compiler flag + * tests: skip drmdevice test if the machine doesn't have any drm device + * freedreno: remove always-defined #ifdef + * xf86atomic: #undef internal define + * README: reflow the project description to improve readability + * xf86drm: implement drmParseSubsystemType for DragonFly + * libdrm: Use DRM_IOCTL_GET_PCIINFO on DragonFly + * tests/amdgpu/vcn: fix the nop command in IBs + * gitignore: sort file + * gitignore: add _build + * amdgpu: update amdgpu_drm.h + * amdgpu: add a faster BO list API + * android: Fix 32-bit app crashing in 64-bit Android + +------------------------------------------------------------------- Old: ---- libdrm-2.4.96.tar.bz2 New: ---- libdrm-2.4.97.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdrm.spec ++++++ --- /var/tmp/diff_new_pack.8euhi6/_old 2019-01-26 22:18:33.583043117 +0100 +++ /var/tmp/diff_new_pack.8euhi6/_new 2019-01-26 22:18:33.587043113 +0100 @@ -1,7 +1,7 @@ # # spec file for package libdrm # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,12 +12,12 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: libdrm -Version: 2.4.96 +Version: 2.4.97 Release: 0 Summary: Userspace Interface for Kernel DRM Services License: MIT ++++++ libdrm-2.4.96.tar.bz2 -> libdrm-2.4.97.tar.bz2 ++++++ ++++ 5405 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/README new/libdrm-2.4.97/README --- old/libdrm-2.4.96/README 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/README 1970-01-01 01:00:00.000000000 +0100 @@ -1,59 +0,0 @@ -libdrm - userspace library for drm - -This is libdrm, a userspace library for accessing the DRM, direct -rendering manager, on Linux, BSD and other operating systems that -support the ioctl interface. The library provides wrapper functions -for the ioctls to avoid exposing the kernel interface directly, and -for chipsets with drm memory manager, support for tracking relocations -and buffers. libdrm is a low-level library, typically used by -graphics drivers such as the Mesa DRI drivers, the X drivers, libva -and similar projects. New functionality in the kernel DRM drivers -typically requires a new libdrm, but a new libdrm will always work -with an older kernel. - - -Compiling ---------- - -libdrm has two build systems, a legacy autotools build system, and a newer -meson build system. The meson build system is much faster, and offers a -slightly different interface, but otherwise provides an equivalent feature set. - -To use it: - - meson builddir/ - -By default this will install into /usr/local, you can change your prefix -with --prefix=/usr (or `meson configure builddir/ -Dprefix=/usr` after -the initial meson setup). - -Then use ninja to build and install: - - ninja -C builddir/ install - -If you are installing into a system location you will need to run install -separately, and as root. - - -Alternatively you can invoke autotools configure: - - ./configure - -By default, libdrm will install into the /usr/local/ prefix. If you -want to install this DRM to replace your system copy, pass ---prefix=/usr and --exec-prefix=/ to configure. If you are building -libdrm from a git checkout, you first need to run the autogen.sh -script. You can pass any options to autogen.sh that you would other -wise pass to configure, or you can just re-run configure with the -options you need once autogen.sh finishes. - -Next step is to build libdrm: - - make - -and once make finishes successfully, install the package using - - make install - -If you are installing into a system location, you will need to be root -to perform the install step. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/amdgpu/amdgpu-symbol-check new/libdrm-2.4.97/amdgpu/amdgpu-symbol-check --- old/libdrm-2.4.96/amdgpu/amdgpu-symbol-check 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/amdgpu/amdgpu-symbol-check 2019-01-22 17:32:41.000000000 +0100 @@ -19,6 +19,8 @@ amdgpu_bo_free amdgpu_bo_import amdgpu_bo_inc_ref +amdgpu_bo_list_create_raw +amdgpu_bo_list_destroy_raw amdgpu_bo_list_create amdgpu_bo_list_destroy amdgpu_bo_list_update @@ -47,6 +49,7 @@ amdgpu_cs_signal_semaphore amdgpu_cs_submit amdgpu_cs_submit_raw +amdgpu_cs_submit_raw2 amdgpu_cs_syncobj_export_sync_file amdgpu_cs_syncobj_import_sync_file amdgpu_cs_syncobj_reset diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/amdgpu/amdgpu.h new/libdrm-2.4.97/amdgpu/amdgpu.h --- old/libdrm-2.4.96/amdgpu/amdgpu.h 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/amdgpu/amdgpu.h 2019-01-22 17:32:41.000000000 +0100 @@ -42,6 +42,7 @@ #endif struct drm_amdgpu_info_hw_ip; +struct drm_amdgpu_bo_list_entry; /*--------------------------------------------------------------------------*/ /* --------------------------- Defines ------------------------------------ */ @@ -779,6 +780,37 @@ * * \param dev - \c [in] Device handle. * See #amdgpu_device_initialize() + * \param number_of_buffers - \c [in] Number of BOs in the list + * \param buffers - \c [in] List of BO handles + * \param result - \c [out] Created BO list handle + * + * \return 0 on success\n + * <0 - Negative POSIX Error code + * + * \sa amdgpu_bo_list_destroy_raw(), amdgpu_cs_submit_raw2() +*/ +int amdgpu_bo_list_create_raw(amdgpu_device_handle dev, + uint32_t number_of_buffers, + struct drm_amdgpu_bo_list_entry *buffers, + uint32_t *result); + +/** + * Destroys a BO list handle. + * + * \param bo_list - \c [in] BO list handle. + * + * \return 0 on success\n + * <0 - Negative POSIX Error code + * + * \sa amdgpu_bo_list_create_raw(), amdgpu_cs_submit_raw2() +*/ +int amdgpu_bo_list_destroy_raw(amdgpu_device_handle dev, uint32_t bo_list); + +/** + * Creates a BO list handle for command submission. + * + * \param dev - \c [in] Device handle. + * See #amdgpu_device_initialize() * \param number_of_resources - \c [in] Number of BOs in the list * \param resources - \c [in] List of BO handles * \param resource_prios - \c [in] Optional priority for each handle @@ -1587,6 +1619,28 @@ struct drm_amdgpu_cs_chunk *chunks, uint64_t *seq_no); +/** + * Submit raw command submission to the kernel with a raw BO list handle. + * + * \param dev - \c [in] device handle + * \param context - \c [in] context handle for context id + * \param bo_list_handle - \c [in] raw bo list handle (0 for none) + * \param num_chunks - \c [in] number of CS chunks to submit + * \param chunks - \c [in] array of CS chunks + * \param seq_no - \c [out] output sequence number for submission. + * + * \return 0 on success\n + * <0 - Negative POSIX Error code + * + * \sa amdgpu_bo_list_create_raw(), amdgpu_bo_list_destroy_raw() + */ +int amdgpu_cs_submit_raw2(amdgpu_device_handle dev, + amdgpu_context_handle context, + uint32_t bo_list_handle, + int num_chunks, + struct drm_amdgpu_cs_chunk *chunks, + uint64_t *seq_no); + void amdgpu_cs_chunk_fence_to_dep(struct amdgpu_cs_fence *fence, struct drm_amdgpu_cs_chunk_dep *dep); void amdgpu_cs_chunk_fence_info_to_data(struct amdgpu_cs_fence_info *fence_info, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/amdgpu/amdgpu_bo.c new/libdrm-2.4.97/amdgpu/amdgpu_bo.c --- old/libdrm-2.4.96/amdgpu/amdgpu_bo.c 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/amdgpu/amdgpu_bo.c 2019-01-22 17:32:41.000000000 +0100 @@ -618,6 +618,40 @@ return r; } +drm_public int amdgpu_bo_list_create_raw(amdgpu_device_handle dev, + uint32_t number_of_buffers, + struct drm_amdgpu_bo_list_entry *buffers, + uint32_t *result) +{ + union drm_amdgpu_bo_list args; + int r; + + memset(&args, 0, sizeof(args)); + args.in.operation = AMDGPU_BO_LIST_OP_CREATE; + args.in.bo_number = number_of_buffers; + args.in.bo_info_size = sizeof(struct drm_amdgpu_bo_list_entry); + args.in.bo_info_ptr = (uint64_t)(uintptr_t)buffers; + + r = drmCommandWriteRead(dev->fd, DRM_AMDGPU_BO_LIST, + &args, sizeof(args)); + if (!r) + *result = args.out.list_handle; + return r; +} + +drm_public int amdgpu_bo_list_destroy_raw(amdgpu_device_handle dev, + uint32_t bo_list) +{ + union drm_amdgpu_bo_list args; + + memset(&args, 0, sizeof(args)); + args.in.operation = AMDGPU_BO_LIST_OP_DESTROY; + args.in.list_handle = bo_list; + + return drmCommandWriteRead(dev->fd, DRM_AMDGPU_BO_LIST, + &args, sizeof(args)); +} + drm_public int amdgpu_bo_list_create(amdgpu_device_handle dev, uint32_t number_of_resources, amdgpu_bo_handle *resources, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/amdgpu/amdgpu_cs.c new/libdrm-2.4.97/amdgpu/amdgpu_cs.c --- old/libdrm-2.4.96/amdgpu/amdgpu_cs.c 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/amdgpu/amdgpu_cs.c 2019-01-22 17:32:41.000000000 +0100 @@ -731,6 +731,31 @@ return 0; } +drm_public int amdgpu_cs_submit_raw2(amdgpu_device_handle dev, + amdgpu_context_handle context, + uint32_t bo_list_handle, + int num_chunks, + struct drm_amdgpu_cs_chunk *chunks, + uint64_t *seq_no) +{ + union drm_amdgpu_cs cs = {0}; + uint64_t *chunk_array; + int i, r; + + chunk_array = alloca(sizeof(uint64_t) * num_chunks); + for (i = 0; i < num_chunks; i++) + chunk_array[i] = (uint64_t)(uintptr_t)&chunks[i]; + cs.in.chunks = (uint64_t)(uintptr_t)chunk_array; + cs.in.ctx_id = context->id; + cs.in.bo_list_handle = bo_list_handle; + cs.in.num_chunks = num_chunks; + r = drmCommandWriteRead(dev->fd, DRM_AMDGPU_CS, + &cs, sizeof(cs)); + if (!r && seq_no) + *seq_no = cs.out.handle; + return r; +} + drm_public void amdgpu_cs_chunk_fence_info_to_data(struct amdgpu_cs_fence_info *fence_info, struct drm_amdgpu_cs_chunk_data *data) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/build-aux/compile new/libdrm-2.4.97/build-aux/compile --- old/libdrm-2.4.96/build-aux/compile 2018-10-16 16:49:15.000000000 +0200 +++ new/libdrm-2.4.97/build-aux/compile 2019-01-22 17:32:46.000000000 +0100 @@ -1,9 +1,9 @@ -#!/bin/sh +#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2016-01-11.22; # UTC +scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey <tro...@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -255,8 +255,7 @@ echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ - icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -343,6 +342,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" +# time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/build-aux/missing new/libdrm-2.4.97/build-aux/missing --- old/libdrm-2.4.96/build-aux/missing 2018-10-16 16:49:15.000000000 +0200 +++ new/libdrm-2.4.97/build-aux/missing 2019-01-22 17:32:46.000000000 +0100 @@ -1,9 +1,9 @@ -#!/bin/sh +#! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2016-01-11.22; # UTC +scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -210,6 +210,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" +# time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/build-aux/test-driver new/libdrm-2.4.97/build-aux/test-driver --- old/libdrm-2.4.96/build-aux/test-driver 2018-10-16 16:49:16.000000000 +0200 +++ new/libdrm-2.4.97/build-aux/test-driver 2019-01-22 17:32:47.000000000 +0100 @@ -1,9 +1,9 @@ -#!/bin/sh +#! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2016-01-11.22; # UTC +scriptversion=2013-07-13.22; # UTC -# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -143,6 +143,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" +# time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/configure.ac new/libdrm-2.4.97/configure.ac --- old/libdrm-2.4.96/configure.ac 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/configure.ac 2019-01-22 17:32:41.000000000 +0100 @@ -20,7 +20,7 @@ AC_PREREQ([2.63]) AC_INIT([libdrm], - [2.4.96], + [2.4.97], [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI], [libdrm]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/data/amdgpu.ids new/libdrm-2.4.97/data/amdgpu.ids --- old/libdrm-2.4.96/data/amdgpu.ids 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/data/amdgpu.ids 2019-01-22 17:32:41.000000000 +0100 @@ -63,9 +63,12 @@ 67DF, C7, AMD Radeon (TM) RX 480 Graphics 67DF, CF, AMD Radeon (TM) RX 470 Graphics 67DF, D7, Radeon(TM) RX 470 Graphics +67DF, E0, Radeon RX 470 Series +67DF, E1, Radeon RX 590 Series 67DF, E3, Radeon RX Series 67DF, E7, Radeon RX 580 Series 67DF, EF, Radeon RX 570 Series +67DF, F7, Radeon RX P30PH 67C2, 01, AMD Radeon (TM) Pro V7350x2 67C2, 02, AMD Radeon (TM) Pro V7300X 67C4, 00, AMD Radeon (TM) Pro WX 7100 Graphics @@ -85,6 +88,7 @@ 67EF, C5, AMD Radeon (TM) RX 460 Graphics 67EF, C7, AMD Radeon (TM) RX Graphics 67EF, CF, AMD Radeon (TM) RX 460 Graphics +67EF, E2, RX 560X 67EF, E0, Radeon RX 560 Series 67EF, E1, Radeon RX Series 67EF, E3, Radeon RX Series @@ -127,21 +131,23 @@ 683D, 0, AMD Radeon HD 7700 Series 683F, 0, AMD Radeon HD 7700 Series 6860, 00, Radeon Instinct MI25 -6860, 01, Radeon Pro V320 +6860, 01, Radeon Instinct MI25 6860, 02, Radeon Instinct MI25 6860, 03, Radeon Pro V340 6860, 04, Radeon Instinct MI25x2 -6861, 00, Radeon(TM) Pro WX9100 +6861, 00, Radeon Pro WX 9100 6862, 00, Radeon Pro SSG 6863, 00, Radeon Vega Frontier Edition 6864, 03, Radeon Pro V340 6864, 04, Instinct MI25x2 -6868, 00, Radeon(TM) Pro WX8100 -686C, 00, GLXT (Radeon Instinct MI25) MxGPU VFID -686C, 01, GLXT (Radeon Pro V320) MxGPU -686C, 02, GLXT (Radeon Instinct MI25) MxGPU -686C, 03, GLXT (Radeon Pro V340) MxGPU -686C, 04, GLXT (Radeon Instinct MI25x2) MxGPU +6868, 00, Radeon (TM) PRO WX 8200 +686C, 00, Radeon Instinct MI25 MxGPU +686C, 01, Radeon Instinct MI25 MxGPU +686C, 02, Radeon Instinct MI25 MxGPU +686C, 03, Radeon Pro V340 MxGPU +686C, 04, Radeon Instinct MI25x2 MxGPU +686C, 05, Radeon Pro V340L MxGPU +686C, 06, Radeon Instinct MI25 MxGPU 687F, C0, Radeon RX Vega 687F, C1, Radeon RX Vega 687F, C3, Radeon RX Vega @@ -165,12 +171,15 @@ 6980, 00, Radeon Pro WX3100 6985, 00, AMD Radeon Pro WX3100 6987, 80, AMD Embedded Radeon E9171 +6987, C0, Radeon 550X Series +6987, C3, Radeon 540X Series 6995, 00, AMD Radeon Pro WX2100 6997, 00, Radeon Pro WX2100 699F, 81, AMD Embedded Radeon E9170 Series 699F, C0, Radeon 500 Series +699F, C1, Radeon 540 Series 699F, C3, Radeon 500 Series -699F, C7, Radeon RX 550 Series +699F, C7, Radeon 550 Series 7300, C1, AMD FirePro (TM) S9300 x2 7300, C8, AMD Radeon (TM) R9 Fury Series 7300, C9, Radeon (TM) Pro Duo @@ -185,3 +194,4 @@ 9874, 87, AMD Radeon R5 Graphics 9874, 85, AMD Radeon R6 Graphics 9874, 84, AMD Radeon R7 Graphics +6FDF, EF, AMD Radeon RX 580 2048SP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/freedreno/freedreno_ringbuffer.h new/libdrm-2.4.97/freedreno/freedreno_ringbuffer.h --- old/libdrm-2.4.96/freedreno/freedreno_ringbuffer.h 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/freedreno/freedreno_ringbuffer.h 2019-01-22 17:32:41.000000000 +0100 @@ -29,6 +29,7 @@ #ifndef FREEDRENO_RINGBUFFER_H_ #define FREEDRENO_RINGBUFFER_H_ +#include <xf86atomic.h> #include <freedreno_drmif.h> /* the ringbuffer object is not opaque so that OUT_RING() type stuff @@ -83,9 +84,7 @@ * be inlined for performance reasons. */ union { -#ifdef HAS_ATOMIC_OPS atomic_t refcnt; -#endif uint64_t __pad; }; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/include/drm/amdgpu_drm.h new/libdrm-2.4.97/include/drm/amdgpu_drm.h --- old/libdrm-2.4.96/include/drm/amdgpu_drm.h 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/include/drm/amdgpu_drm.h 2019-01-22 17:32:41.000000000 +0100 @@ -326,6 +326,12 @@ /* GFX9 and later: */ #define AMDGPU_TILING_SWIZZLE_MODE_SHIFT 0 #define AMDGPU_TILING_SWIZZLE_MODE_MASK 0x1f +#define AMDGPU_TILING_DCC_OFFSET_256B_SHIFT 5 +#define AMDGPU_TILING_DCC_OFFSET_256B_MASK 0xFFFFFF +#define AMDGPU_TILING_DCC_PITCH_MAX_SHIFT 29 +#define AMDGPU_TILING_DCC_PITCH_MAX_MASK 0x3FFF +#define AMDGPU_TILING_DCC_INDEPENDENT_64B_SHIFT 43 +#define AMDGPU_TILING_DCC_INDEPENDENT_64B_MASK 0x1 /* Set/Get helpers for tiling flags. */ #define AMDGPU_TILING_SET(field, value) \ @@ -665,6 +671,8 @@ #define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_GPM_MEM 0x10 /* Subquery id: Query GFX RLC SRLS firmware version */ #define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_SRM_MEM 0x11 + /* Subquery id: Query DMCU firmware version */ + #define AMDGPU_INFO_FW_DMCU 0x12 /* number of bytes moved for TTM migration */ #define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f /* the used VRAM size */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/m4/libtool.m4 new/libdrm-2.4.97/m4/libtool.m4 --- old/libdrm-2.4.96/m4/libtool.m4 2018-10-16 16:49:10.000000000 +0200 +++ new/libdrm-2.4.97/m4/libtool.m4 2019-01-22 17:32:44.000000000 +0100 @@ -1,6 +1,6 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2017 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -1042,8 +1042,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1493,9 +1493,22 @@ m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +# Use ARFLAGS variable as AR's operation code to sync the variable naming with +# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have +# higher priority because thats what people were doing historically (setting +# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS +# variable obsoleted/removed. + +test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} +lt_ar_flags=$AR_FLAGS +_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) + +# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override +# by AR_FLAGS because that was never working and AR_FLAGS is about to die. +_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], + [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no @@ -2207,26 +2220,35 @@ striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) +if test -z "$STRIP"; then + AC_MSG_RESULT([no]) else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then + if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + case $host_os in + darwin*) + # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) - else + ;; + freebsd*) + if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then + old_striplib="$STRIP --strip-debug" + striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac + ;; + esac + fi fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) @@ -2867,9 +2889,6 @@ # before this can be enabled. hardcode_into_libs=yes - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -2878,7 +2897,7 @@ # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -4922,7 +4941,7 @@ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) @@ -5159,6 +5178,7 @@ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; interix[[3-9]]*) @@ -5376,7 +5396,7 @@ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -5864,6 +5884,7 @@ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; osf3*) @@ -6733,6 +6754,7 @@ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' ;; dgux*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/m4/ltoptions.m4 new/libdrm-2.4.97/m4/ltoptions.m4 --- old/libdrm-2.4.96/m4/ltoptions.m4 2018-10-16 16:49:10.000000000 +0200 +++ new/libdrm-2.4.97/m4/ltoptions.m4 2019-01-22 17:32:44.000000000 +0100 @@ -1,6 +1,6 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software +# Copyright (C) 2004-2005, 2007-2009, 2011-2017 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/m4/ltsugar.m4 new/libdrm-2.4.97/m4/ltsugar.m4 --- old/libdrm-2.4.96/m4/ltsugar.m4 2018-10-16 16:49:10.000000000 +0200 +++ new/libdrm-2.4.97/m4/ltsugar.m4 2019-01-22 17:32:44.000000000 +0100 @@ -1,6 +1,6 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Copyright (C) 2004-2005, 2007-2008, 2011-2017 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/m4/ltversion.m4 new/libdrm-2.4.97/m4/ltversion.m4 --- old/libdrm-2.4.96/m4/ltversion.m4 2018-10-16 16:49:10.000000000 +0200 +++ new/libdrm-2.4.97/m4/ltversion.m4 2019-01-22 17:32:44.000000000 +0100 @@ -1,6 +1,6 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2017 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -9,15 +9,15 @@ # @configure_input@ -# serial 4179 ltversion.m4 +# serial 4219 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.6]) -m4_define([LT_PACKAGE_REVISION], [2.4.6]) +m4_define([LT_PACKAGE_VERSION], [2.4.6.40-6ca5]) +m4_define([LT_PACKAGE_REVISION], [2.4.6.40]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.6' -macro_revision='2.4.6' +[macro_version='2.4.6.40-6ca5' +macro_revision='2.4.6.40' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/m4/lt~obsolete.m4 new/libdrm-2.4.97/m4/lt~obsolete.m4 --- old/libdrm-2.4.96/m4/lt~obsolete.m4 2018-10-16 16:49:10.000000000 +0200 +++ new/libdrm-2.4.97/m4/lt~obsolete.m4 2019-01-22 17:32:44.000000000 +0100 @@ -1,6 +1,6 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software +# Copyright (C) 2004-2005, 2007, 2009, 2011-2017 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/meson.build new/libdrm-2.4.97/meson.build --- old/libdrm-2.4.96/meson.build 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/meson.build 2019-01-22 17:32:41.000000000 +0100 @@ -21,7 +21,7 @@ project( 'libdrm', ['c'], - version : '2.4.96', + version : '2.4.97', license : 'MIT', meson_version : '>= 0.43', default_options : ['buildtype=debugoptimized', 'c_std=gnu99'], @@ -192,7 +192,7 @@ warn_c_args = [] foreach a : ['-Wall', '-Wextra', '-Wsign-compare', '-Werror=undef', - '-Werror-implicit-function-declaration', '-Wpointer-arith', + '-Werror=implicit-function-declaration', '-Wpointer-arith', '-Wwrite-strings', '-Wstrict-prototypes', '-Wmissing-prototypes', '-Wmissing-declarations', '-Wnested-externs', '-Wpacked', '-Wswitch-enum', '-Wmissing-format-attribute', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/tests/amdgpu/amdgpu_test.c new/libdrm-2.4.97/tests/amdgpu/amdgpu_test.c --- old/libdrm-2.4.96/tests/amdgpu/amdgpu_test.c 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/tests/amdgpu/amdgpu_test.c 2019-01-22 17:32:41.000000000 +0100 @@ -422,7 +422,8 @@ * BUG: Compute ring stalls and never recovers when the address is * written after the command already submitted */ - if (amdgpu_set_test_active(DEADLOCK_TESTS_STR, "compute ring block test", CU_FALSE)) + if (amdgpu_set_test_active(DEADLOCK_TESTS_STR, + "compute ring block test (set amdgpu.lockup_timeout=50)", CU_FALSE)) fprintf(stderr, "test deactivation failed - %s\n", CU_get_error_msg()); if (amdgpu_set_test_active(BO_TESTS_STR, "Metadata", CU_FALSE)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/tests/amdgpu/deadlock_tests.c new/libdrm-2.4.97/tests/amdgpu/deadlock_tests.c --- old/libdrm-2.4.96/tests/amdgpu/deadlock_tests.c 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/tests/amdgpu/deadlock_tests.c 2019-01-22 17:32:41.000000000 +0100 @@ -73,6 +73,29 @@ * 1 - pfp */ +#define PACKET3_WRITE_DATA 0x37 +#define WRITE_DATA_DST_SEL(x) ((x) << 8) + /* 0 - register + * 1 - memory (sync - via GRBM) + * 2 - gl2 + * 3 - gds + * 4 - reserved + * 5 - memory (async - direct) + */ +#define WR_ONE_ADDR (1 << 16) +#define WR_CONFIRM (1 << 20) +#define WRITE_DATA_CACHE_POLICY(x) ((x) << 25) + /* 0 - LRU + * 1 - Stream + */ +#define WRITE_DATA_ENGINE_SEL(x) ((x) << 30) + /* 0 - me + * 1 - pfp + * 2 - ce + */ + +#define mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR 0x54f + static amdgpu_device_handle device_handle; static uint32_t major_version; static uint32_t minor_version; @@ -85,6 +108,8 @@ static void amdgpu_deadlock_helper(unsigned ip_type); static void amdgpu_deadlock_gfx(void); static void amdgpu_deadlock_compute(void); +static void amdgpu_illegal_reg_access(); +static void amdgpu_illegal_mem_access(); CU_BOOL suite_deadlock_tests_enable(void) { @@ -94,8 +119,14 @@ &minor_version, &device_handle)) return CU_FALSE; - if (device_handle->info.family_id == AMDGPU_FAMILY_SI) { - printf("\n\nCurrently hangs the CP on this ASIC, deadlock suite disabled\n"); + /* + * Only enable for ASICs supporting GPU reset and for which it's enabled + * by default (currently GFX8/9 dGPUS) + */ + if (device_handle->info.family_id != AMDGPU_FAMILY_VI && + device_handle->info.family_id != AMDGPU_FAMILY_AI && + device_handle->info.family_id != AMDGPU_FAMILY_CI) { + printf("\n\nGPU reset is not enabled for the ASIC, deadlock suite disabled\n"); enable = CU_FALSE; } @@ -138,8 +169,10 @@ CU_TestInfo deadlock_tests[] = { - { "gfx ring block test", amdgpu_deadlock_gfx }, - { "compute ring block test", amdgpu_deadlock_compute }, + { "gfx ring block test (set amdgpu.lockup_timeout=50)", amdgpu_deadlock_gfx }, + { "compute ring block test (set amdgpu.lockup_timeout=50)", amdgpu_deadlock_compute }, + { "illegal reg access test", amdgpu_illegal_reg_access }, + { "illegal mem access test (set amdgpu.vm_fault_stop=2)", amdgpu_illegal_mem_access }, CU_TEST_INFO_NULL, }; @@ -257,3 +290,90 @@ r = amdgpu_cs_ctx_free(context_handle); CU_ASSERT_EQUAL(r, 0); } + +static void bad_access_helper(int reg_access) +{ + amdgpu_context_handle context_handle; + amdgpu_bo_handle ib_result_handle; + void *ib_result_cpu; + uint64_t ib_result_mc_address; + struct amdgpu_cs_request ibs_request; + struct amdgpu_cs_ib_info ib_info; + struct amdgpu_cs_fence fence_status; + uint32_t expired; + int i, r; + amdgpu_bo_list_handle bo_list; + amdgpu_va_handle va_handle; + + r = amdgpu_cs_ctx_create(device_handle, &context_handle); + CU_ASSERT_EQUAL(r, 0); + + r = amdgpu_bo_alloc_and_map_raw(device_handle, 4096, 4096, + AMDGPU_GEM_DOMAIN_GTT, 0, 0, + &ib_result_handle, &ib_result_cpu, + &ib_result_mc_address, &va_handle); + CU_ASSERT_EQUAL(r, 0); + + r = amdgpu_get_bo_list(device_handle, ib_result_handle, NULL, + &bo_list); + CU_ASSERT_EQUAL(r, 0); + + ptr = ib_result_cpu; + i = 0; + + ptr[i++] = PACKET3(PACKET3_WRITE_DATA, 3); + ptr[i++] = (reg_access ? WRITE_DATA_DST_SEL(0) : WRITE_DATA_DST_SEL(5))| WR_CONFIRM; + ptr[i++] = reg_access ? mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR : 0xdeadbee0; + ptr[i++] = 0; + ptr[i++] = 0xdeadbeef; + + for (; i < 16; ++i) + ptr[i] = 0xffff1000; + + memset(&ib_info, 0, sizeof(struct amdgpu_cs_ib_info)); + ib_info.ib_mc_address = ib_result_mc_address; + ib_info.size = 16; + + memset(&ibs_request, 0, sizeof(struct amdgpu_cs_request)); + ibs_request.ip_type = AMDGPU_HW_IP_GFX; + ibs_request.ring = 0; + ibs_request.number_of_ibs = 1; + ibs_request.ibs = &ib_info; + ibs_request.resources = bo_list; + ibs_request.fence_info.handle = NULL; + + r = amdgpu_cs_submit(context_handle, 0,&ibs_request, 1); + CU_ASSERT_EQUAL((r == 0 || r == -ECANCELED), 1); + + + memset(&fence_status, 0, sizeof(struct amdgpu_cs_fence)); + fence_status.context = context_handle; + fence_status.ip_type = AMDGPU_HW_IP_GFX; + fence_status.ip_instance = 0; + fence_status.ring = 0; + fence_status.fence = ibs_request.seq_no; + + r = amdgpu_cs_query_fence_status(&fence_status, + AMDGPU_TIMEOUT_INFINITE,0, &expired); + CU_ASSERT_EQUAL((r == 0 || r == -ECANCELED), 1); + + r = amdgpu_bo_list_destroy(bo_list); + CU_ASSERT_EQUAL(r, 0); + + r = amdgpu_bo_unmap_and_free(ib_result_handle, va_handle, + ib_result_mc_address, 4096); + CU_ASSERT_EQUAL(r, 0); + + r = amdgpu_cs_ctx_free(context_handle); + CU_ASSERT_EQUAL(r, 0); +} + +static void amdgpu_illegal_reg_access() +{ + bad_access_helper(1); +} + +static void amdgpu_illegal_mem_access() +{ + bad_access_helper(0); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/tests/amdgpu/vcn_tests.c new/libdrm-2.4.97/tests/amdgpu/vcn_tests.c --- old/libdrm-2.4.96/tests/amdgpu/vcn_tests.c 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/tests/amdgpu/vcn_tests.c 2019-01-22 17:32:41.000000000 +0100 @@ -268,8 +268,10 @@ ib_cpu[len++] = msg_buf.addr >> 32; ib_cpu[len++] = 0x81C3; ib_cpu[len++] = 0; - for (; len % 16; ++len) - ib_cpu[len] = 0x81ff; + for (; len % 16; ) { + ib_cpu[len++] = 0x81ff; + ib_cpu[len++] = 0; + } r = submit(len, AMDGPU_HW_IP_VCN_DEC); CU_ASSERT_EQUAL(r, 0); @@ -336,8 +338,10 @@ ib_cpu[len++] = 0x81C6; ib_cpu[len++] = 0x1; - for (; len % 16; ++len) - ib_cpu[len] = 0x80000000; + for (; len % 16; ) { + ib_cpu[len++] = 0x81ff; + ib_cpu[len++] = 0; + } r = submit(len, AMDGPU_HW_IP_VCN_DEC); CU_ASSERT_EQUAL(r, 0); @@ -373,8 +377,10 @@ ib_cpu[len++] = msg_buf.addr >> 32; ib_cpu[len++] = 0x81C3; ib_cpu[len++] = 0; - for (; len % 16; ++len) - ib_cpu[len] = 0x80000000; + for (; len % 16; ) { + ib_cpu[len++] = 0x81ff; + ib_cpu[len++] = 0; + } r = submit(len, AMDGPU_HW_IP_VCN_DEC); CU_ASSERT_EQUAL(r, 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/tests/amdgpu/vm_tests.c new/libdrm-2.4.97/tests/amdgpu/vm_tests.c --- old/libdrm-2.4.96/tests/amdgpu/vm_tests.c 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/tests/amdgpu/vm_tests.c 2019-01-22 17:32:41.000000000 +0100 @@ -33,6 +33,7 @@ static void amdgpu_vmid_reserve_test(void); static void amdgpu_vm_unaligned_map(void); +static void amdgpu_vm_mapping_test(void); CU_BOOL suite_vm_tests_enable(void) { @@ -85,6 +86,7 @@ CU_TestInfo vm_tests[] = { { "resere vmid test", amdgpu_vmid_reserve_test }, { "unaligned map", amdgpu_vm_unaligned_map }, + { "vm mapping test", amdgpu_vm_mapping_test }, CU_TEST_INFO_NULL, }; @@ -208,5 +210,46 @@ error_va_alloc: amdgpu_bo_free(buf_handle); +} + +static void amdgpu_vm_mapping_test(void) +{ + struct amdgpu_bo_alloc_request req = {0}; + struct drm_amdgpu_info_device dev_info; + const uint64_t size = 4096; + amdgpu_bo_handle buf; + uint64_t addr; + int r; + + req.alloc_size = size; + req.phys_alignment = 0; + req.preferred_heap = AMDGPU_GEM_DOMAIN_GTT; + req.flags = 0; + + r = amdgpu_bo_alloc(device_handle, &req, &buf); + CU_ASSERT_EQUAL(r, 0); + + r = amdgpu_query_info(device_handle, AMDGPU_INFO_DEV_INFO, + sizeof(dev_info), &dev_info); + CU_ASSERT_EQUAL(r, 0); + + addr = dev_info.virtual_address_offset; + r = amdgpu_bo_va_op(buf, 0, size, addr, 0, AMDGPU_VA_OP_MAP); + CU_ASSERT_EQUAL(r, 0); + + addr = dev_info.virtual_address_max - size; + r = amdgpu_bo_va_op(buf, 0, size, addr, 0, AMDGPU_VA_OP_MAP); + CU_ASSERT_EQUAL(r, 0); + + if (dev_info.high_va_offset) { + addr = dev_info.high_va_offset; + r = amdgpu_bo_va_op(buf, 0, size, addr, 0, AMDGPU_VA_OP_MAP); + CU_ASSERT_EQUAL(r, 0); + + addr = dev_info.high_va_max - size; + r = amdgpu_bo_va_op(buf, 0, size, addr, 0, AMDGPU_VA_OP_MAP); + CU_ASSERT_EQUAL(r, 0); + } + amdgpu_bo_free(buf); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/tests/drmdevice.c new/libdrm-2.4.97/tests/drmdevice.c --- old/libdrm-2.4.96/tests/drmdevice.c 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/tests/drmdevice.c 2019-01-22 17:32:41.000000000 +0100 @@ -115,8 +115,9 @@ max_devices = drmGetDevices2(0, NULL, 0); if (max_devices <= 0) { - printf("drmGetDevices2() has returned %d\n", max_devices); - return -1; + printf("drmGetDevices2() has not found any devices (errno=%d)\n", + -max_devices); + return 77; } printf("--- Devices reported %d ---\n", max_devices); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/xf86atomic.h new/libdrm-2.4.97/xf86atomic.h --- old/libdrm-2.4.96/xf86atomic.h 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/xf86atomic.h 2019-01-22 17:32:41.000000000 +0100 @@ -101,6 +101,8 @@ #error libdrm requires atomic operations, please define them for your CPU/compiler. #endif +#undef HAS_ATOMIC_OPS + static inline int atomic_add_unless(atomic_t *v, int add, int unless) { int c, old; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/xf86drm.c new/libdrm-2.4.97/xf86drm.c --- old/libdrm-2.4.96/xf86drm.c 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/xf86drm.c 2019-01-22 17:32:41.000000000 +0100 @@ -59,6 +59,8 @@ #endif #include <math.h> +#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) + /* Not all systems have MAP_FAILED defined */ #ifndef MAP_FAILED #define MAP_FAILED ((void *)-1) @@ -99,7 +101,7 @@ #define DRM_MAJOR 226 /* Linux */ #endif -#ifdef __OpenBSD__ +#if defined(__OpenBSD__) || defined(__DragonFly__) struct drm_pciinfo { uint16_t domain; uint8_t bus; @@ -2984,6 +2986,17 @@ char path[PATH_MAX + 1]; char link[PATH_MAX + 1] = ""; char *name; + struct { + const char *name; + int bus_type; + } bus_types[] = { + { "/pci", DRM_BUS_PCI }, + { "/usb", DRM_BUS_USB }, + { "/platform", DRM_BUS_PLATFORM }, + { "/spi", DRM_BUS_PLATFORM }, + { "/host1x", DRM_BUS_HOST1X }, + { "/virtio", DRM_BUS_VIRTIO }, + }; snprintf(path, PATH_MAX, "/sys/dev/char/%d:%d/device/subsystem", maj, min); @@ -2995,23 +3008,13 @@ if (!name) return -EINVAL; - if (strncmp(name, "/pci", 4) == 0) - return DRM_BUS_PCI; - - if (strncmp(name, "/usb", 4) == 0) - return DRM_BUS_USB; - - if (strncmp(name, "/platform", 9) == 0) - return DRM_BUS_PLATFORM; - - if (strncmp(name, "/host1x", 7) == 0) - return DRM_BUS_HOST1X; - - if (strncmp(name, "/virtio", 7) == 0) - return DRM_BUS_VIRTIO; + for (unsigned i = 0; i < ARRAY_SIZE(bus_types); i++) { + if (strncmp(name, bus_types[i].name, strlen(bus_types[i].name)) == 0) + return bus_types[i].bus_type; + } return -EINVAL; -#elif defined(__OpenBSD__) +#elif defined(__OpenBSD__) || defined(__DragonFly__) return DRM_BUS_PCI; #else #warning "Missing implementation of drmParseSubsystemType" @@ -3060,7 +3063,7 @@ info->func = func; return 0; -#elif defined(__OpenBSD__) +#elif defined(__OpenBSD__) || defined(__DragonFly__) struct drm_pciinfo pinfo; int fd, type; @@ -3149,7 +3152,6 @@ drmPciDeviceInfoPtr device, bool ignore_revision) { -#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) static const char *attrs[] = { "revision", /* Older kernels are missing the file, so check for it first */ "vendor", @@ -3227,7 +3229,7 @@ return parse_config_sysfs_file(maj, min, device); return 0; -#elif defined(__OpenBSD__) +#elif defined(__OpenBSD__) || defined(__DragonFly__) struct drm_pciinfo pinfo; int fd, type; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdrm-2.4.96/xf86drmHash.c new/libdrm-2.4.97/xf86drmHash.c --- old/libdrm-2.4.96/xf86drmHash.c 2018-10-16 16:49:03.000000000 +0200 +++ new/libdrm-2.4.97/xf86drmHash.c 2019-01-22 17:32:41.000000000 +0100 @@ -105,7 +105,6 @@ drm_public void *drmHashCreate(void) { HashTablePtr table; - int i; table = drmMalloc(sizeof(*table)); if (!table) return NULL;