Adding some tests to acompany the recently added hot-unplug feature. For now the test suite is disabled until the feature propagates from drm-misc-next to drm-next.
Andrey Grodzovsky (7): tests/amdgpu: Fix valgrind warning xf86drm: Add function to retrieve char device path test/amdgpu: Add helper functions for hot unplug test/amdgpu/hotunplug: Add test suite for GPU unplug test/amdgpu/hotunplug: Add basic test tests/amdgpu/hotunplug: Add unplug with cs test. tests/amdgpu/hotunplug: Add hotunplug with exported bo test
tests/amdgpu/amdgpu_test.c | 42 +++- tests/amdgpu/amdgpu_test.h | 26 +++ tests/amdgpu/basic_tests.c | 5 +- tests/amdgpu/hotunplug_tests.c | 357 +++++++++++++++++++++++++++++++++ tests/amdgpu/meson.build | 1 + xf86drm.c | 23 +++ xf86drm.h | 1 + 7 files changed, 450 insertions(+), 5 deletions(-) create mode 100644 tests/amdgpu/hotunplug_tests.c
Struct access after free
Signed-off-by: Andrey Grodzovsky andrey.grodzovsky@amd.com --- tests/amdgpu/basic_tests.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c index 8e7c4916..8b7fd0f6 100644 --- a/tests/amdgpu/basic_tests.c +++ b/tests/amdgpu/basic_tests.c @@ -626,13 +626,14 @@ CU_BOOL suite_basic_tests_enable(void) &minor_version, &device_handle)) return CU_FALSE;
- if (amdgpu_device_deinitialize(device_handle)) - return CU_FALSE;
family_id = device_handle->info.family_id; chip_id = device_handle->info.chip_external_rev; chip_rev = device_handle->info.chip_rev;
+ if (amdgpu_device_deinitialize(device_handle)) + return CU_FALSE; + /* disable gfx engine basic test cases for some asics have no CPG */ if (asic_is_gfx_pipe_removed(family_id, chip_id, chip_rev)) { if (amdgpu_set_test_active("Basic Tests",
Used to access device controls
Signed-off-by: Andrey Grodzovsky andrey.grodzovsky@amd.com --- xf86drm.c | 23 +++++++++++++++++++++++ xf86drm.h | 1 + 2 files changed, 24 insertions(+)
diff --git a/xf86drm.c b/xf86drm.c index edfeb347..a5ecd323 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -4361,6 +4361,29 @@ drm_public char *drmGetDeviceNameFromFd2(int fd) #endif }
+drm_public char *drmGetCharDeviceFromFd(int fd) +{ +#ifdef __linux__ + struct stat sbuf; + char path[PATH_MAX + 1]; + unsigned int maj, min; + + if (fstat(fd, &sbuf)) + return NULL; + + maj = major(sbuf.st_rdev); + min = minor(sbuf.st_rdev); + + if (!drmNodeIsDRM(maj, min) || !S_ISCHR(sbuf.st_mode)) + return NULL; + + snprintf(path, sizeof(path), "/sys/dev/char/%d:%d", maj, min); + return strdup(path); +#else + return NULL; +#endif +} + drm_public int drmSyncobjCreate(int fd, uint32_t flags, uint32_t *handle) { struct drm_syncobj_create args; diff --git a/xf86drm.h b/xf86drm.h index 9fc06ab8..c172dbc1 100644 --- a/xf86drm.h +++ b/xf86drm.h @@ -812,6 +812,7 @@ extern char *drmGetDeviceNameFromFd(int fd); */ extern char *drmGetDeviceNameFromFd2(int fd); extern int drmGetNodeTypeFromFd(int fd); +extern char *drmGetCharDeviceFromFd(int fd);
/* Convert between GEM handles and DMA-BUF file descriptors. *
Do we really need to make this a public API?
It calls drmNodeIsDRM which is private function itself so - if i implement it in amdgpu part I still need to expose drmNodeIsDRM. Note that this function is basically a subset of drmGetDeviceNameFromFd2
Andrey
On 2021-06-02 5:16 a.m., Simon Ser wrote:
Do we really need to make this a public API?
Expose close device and add open device wich preserves test index.
Signed-off-by: Andrey Grodzovsky andrey.grodzovsky@amd.com --- tests/amdgpu/amdgpu_test.c | 31 ++++++++++++++++++++++++++++--- tests/amdgpu/amdgpu_test.h | 3 +++ 2 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/tests/amdgpu/amdgpu_test.c b/tests/amdgpu/amdgpu_test.c index 60f3a508..2864eaff 100644 --- a/tests/amdgpu/amdgpu_test.c +++ b/tests/amdgpu/amdgpu_test.c @@ -339,12 +339,13 @@ static int amdgpu_open_devices(int open_render_node)
/* Close AMD devices. */ -static void amdgpu_close_devices() +void amdgpu_close_devices() { int i; for (i = 0; i < MAX_CARDS_SUPPORTED; i++) - if (drm_amdgpu[i] >=0) + if (drm_amdgpu[i] >=0) { close(drm_amdgpu[i]); + } }
/* Print AMD devices information */ @@ -520,6 +521,31 @@ static void amdgpu_disable_suites() fprintf(stderr, "test deactivation failed - %s\n", CU_get_error_msg()); }
+int test_device_index; + +int amdgpu_open_device_on_test_index(int render_node) +{ + int i; + + if (amdgpu_open_devices(open_render_node) <= 0) { + perror("Cannot open AMDGPU device"); + return -1; + } + + if (test_device_index >= 0) { + /* Most tests run on device of drm_amdgpu[0]. + * Swap the chosen device to drm_amdgpu[0]. + */ + i = drm_amdgpu[0]; + drm_amdgpu[0] = drm_amdgpu[test_device_index]; + drm_amdgpu[test_device_index] = i; + } + + return 0; + + +} + /* The main() function for setting up and running the tests. * Returns a CUE_SUCCESS on successful running, another * CUnit error code on failure. @@ -535,7 +561,6 @@ int main(int argc, char **argv) int display_devices = 0;/* By default not to display devices' info */ CU_pSuite pSuite = NULL; CU_pTest pTest = NULL; - int test_device_index; int display_list = 0; int force_run = 0;
diff --git a/tests/amdgpu/amdgpu_test.h b/tests/amdgpu/amdgpu_test.h index 4970d0dd..107134a5 100644 --- a/tests/amdgpu/amdgpu_test.h +++ b/tests/amdgpu/amdgpu_test.h @@ -476,4 +476,7 @@ void amdgpu_test_exec_cs_helper_raw(amdgpu_device_handle device_handle, struct amdgpu_cs_request *ibs_request, bool secure);
+void amdgpu_close_devices(); +int amdgpu_open_device_on_test_index(int render_node); + #endif /* #ifdef _AMDGPU_TEST_H_ */
Add just the test suite skeleton.
Signed-off-by: Andrey Grodzovsky andrey.grodzovsky@amd.com --- tests/amdgpu/amdgpu_test.c | 11 ++++ tests/amdgpu/amdgpu_test.h | 23 +++++++ tests/amdgpu/hotunplug_tests.c | 116 +++++++++++++++++++++++++++++++++ tests/amdgpu/meson.build | 1 + 4 files changed, 151 insertions(+) create mode 100644 tests/amdgpu/hotunplug_tests.c
diff --git a/tests/amdgpu/amdgpu_test.c b/tests/amdgpu/amdgpu_test.c index 2864eaff..a10a031a 100644 --- a/tests/amdgpu/amdgpu_test.c +++ b/tests/amdgpu/amdgpu_test.c @@ -59,6 +59,7 @@ #define RAS_TESTS_STR "RAS Tests" #define SYNCOBJ_TIMELINE_TESTS_STR "SYNCOBJ TIMELINE Tests" #define SECURITY_TESTS_STR "Security Tests" +#define HOTUNPLUG_TESTS_STR "Hotunplug Tests"
/** * Open handles for amdgpu devices @@ -137,6 +138,12 @@ static CU_SuiteInfo suites[] = { .pCleanupFunc = suite_security_tests_clean, .pTests = security_tests, }, + { + .pName = HOTUNPLUG_TESTS_STR, + .pInitFunc = suite_hotunplug_tests_init, + .pCleanupFunc = suite_hotunplug_tests_clean, + .pTests = hotunplug_tests, + },
CU_SUITE_INFO_NULL, }; @@ -198,6 +205,10 @@ static Suites_Active_Status suites_active_stat[] = { .pName = SECURITY_TESTS_STR, .pActive = suite_security_tests_enable, }, + { + .pName = HOTUNPLUG_TESTS_STR, + .pActive = suite_hotunplug_tests_enable, + }, };
diff --git a/tests/amdgpu/amdgpu_test.h b/tests/amdgpu/amdgpu_test.h index 107134a5..e2e35fec 100644 --- a/tests/amdgpu/amdgpu_test.h +++ b/tests/amdgpu/amdgpu_test.h @@ -273,6 +273,29 @@ amdgpu_command_submission_write_linear_helper_with_secure(amdgpu_device_handle unsigned ip_type, bool secure);
+ + +/** + * Initialize hotunplug test suite + */ +int suite_hotunplug_tests_init(); + +/** + * Deinitialize hotunplug test suite + */ +int suite_hotunplug_tests_clean(); + +/** + * Decide if the suite is enabled by default or not. + */ +CU_BOOL suite_hotunplug_tests_enable(void); + +/** + * Tests in uvd enc test suite + */ +extern CU_TestInfo hotunplug_tests[]; + + /** * Helper functions */ diff --git a/tests/amdgpu/hotunplug_tests.c b/tests/amdgpu/hotunplug_tests.c new file mode 100644 index 00000000..9d11dae4 --- /dev/null +++ b/tests/amdgpu/hotunplug_tests.c @@ -0,0 +1,116 @@ +/* + * Copyright 2021 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#if HAVE_ALLOCA_H +# include <alloca.h> +#endif + +#include "CUnit/Basic.h" + +#include "amdgpu_test.h" +#include "amdgpu_drm.h" +#include "amdgpu_internal.h" + +#include <pthread.h> + + +static amdgpu_device_handle device_handle; +static uint32_t major_version; +static uint32_t minor_version; + +static uint32_t family_id; +static uint32_t chip_rev; +static uint32_t chip_id; + +CU_BOOL suite_hotunplug_tests_enable(void) +{ + CU_BOOL enable = CU_TRUE; + + if (amdgpu_device_initialize(drm_amdgpu[0], &major_version, + &minor_version, &device_handle)) + return CU_FALSE; + + family_id = device_handle->info.family_id; + chip_id = device_handle->info.chip_external_rev; + chip_rev = device_handle->info.chip_rev; + + /* + * Only enable for ASICs supporting GPU reset and for which it's enabled + * by default (currently GFX8/9 dGPUS) + */ + if (family_id != AMDGPU_FAMILY_VI && + family_id != AMDGPU_FAMILY_AI && + family_id != AMDGPU_FAMILY_CI) { + printf("\n\nGPU reset is not enabled for the ASIC, hotunplug suite disabled\n"); + enable = CU_FALSE; + } + + if (amdgpu_device_deinitialize(device_handle)) + return CU_FALSE; + + return enable; +} + +int suite_hotunplug_tests_init(void) +{ + int r; + + r = amdgpu_device_initialize(drm_amdgpu[0], &major_version, + &minor_version, &device_handle); + + if (r) { + if ((r == -EACCES) && (errno == EACCES)) + printf("\n\nError:%s. " + "Hint:Try to run this test program as root.", + strerror(errno)); + return CUE_SINIT_FAILED; + } + + return CUE_SUCCESS; +} + +int suite_hotunplug_tests_clean(void) +{ + int r = amdgpu_device_deinitialize(device_handle); + + if (r == 0) + return CUE_SUCCESS; + else + return CUE_SCLEAN_FAILED; +} + + +static void amdgpu_hotunplug_gfx(void) +{ + printf("Hello!\n"); +} + +CU_TestInfo hotunplug_tests[] = { + { "gfx ring block test (set amdgpu.lockup_timeout=50)", amdgpu_hotunplug_gfx }, + CU_TEST_INFO_NULL, +}; + + diff --git a/tests/amdgpu/meson.build b/tests/amdgpu/meson.build index eb16a50c..e6e30812 100644 --- a/tests/amdgpu/meson.build +++ b/tests/amdgpu/meson.build @@ -25,6 +25,7 @@ if dep_cunit.found() 'amdgpu_test.c', 'basic_tests.c', 'bo_tests.c', 'cs_tests.c', 'vce_tests.c', 'uvd_enc_tests.c', 'vcn_tests.c', 'deadlock_tests.c', 'vm_tests.c', 'ras_tests.c', 'syncobj_tests.c', 'security_tests.c', + 'hotunplug_tests.c' ), dependencies : [dep_cunit, dep_threads, dep_atomic_ops], include_directories : [inc_root, inc_drm, include_directories('../../amdgpu')],
Add plug/unplug device and open/close device file infrastrucutre. Add basic test - unplug device while device file still open. Close device file afterwards and replug the device.
Signed-off-by: Andrey Grodzovsky andrey.grodzovsky@amd.com --- tests/amdgpu/hotunplug_tests.c | 135 +++++++++++++++++++++++++-------- 1 file changed, 105 insertions(+), 30 deletions(-)
diff --git a/tests/amdgpu/hotunplug_tests.c b/tests/amdgpu/hotunplug_tests.c index 9d11dae4..c2bc1cf2 100644 --- a/tests/amdgpu/hotunplug_tests.c +++ b/tests/amdgpu/hotunplug_tests.c @@ -21,9 +21,11 @@ * */
-#include <stdio.h> #include <stdlib.h> #include <unistd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> #if HAVE_ALLOCA_H # include <alloca.h> #endif @@ -33,40 +35,40 @@ #include "amdgpu_test.h" #include "amdgpu_drm.h" #include "amdgpu_internal.h" - +#include "xf86drm.h" #include <pthread.h>
static amdgpu_device_handle device_handle; static uint32_t major_version; static uint32_t minor_version; - -static uint32_t family_id; -static uint32_t chip_rev; -static uint32_t chip_id; +static char *sysfs_remove = NULL;
CU_BOOL suite_hotunplug_tests_enable(void) { CU_BOOL enable = CU_TRUE; + drmDevicePtr device; + + if (drmGetDevice2(drm_amdgpu[0], DRM_DEVICE_GET_PCI_REVISION, &device)) { + printf("\n\nGPU Failed to get DRM device PCI info!\n"); + return CU_FALSE; + } + + if (device->bustype != DRM_BUS_PCI) { + printf("\n\nGPU device is not on PCI bus!\n"); + amdgpu_device_deinitialize(device_handle); + return CU_FALSE; + } + + /* Disable until the hot-unplug support in kernel gets into drm-next */ + if (major_version < 0xff) + enable = false;
if (amdgpu_device_initialize(drm_amdgpu[0], &major_version, &minor_version, &device_handle)) return CU_FALSE;
- family_id = device_handle->info.family_id; - chip_id = device_handle->info.chip_external_rev; - chip_rev = device_handle->info.chip_rev; - - /* - * Only enable for ASICs supporting GPU reset and for which it's enabled - * by default (currently GFX8/9 dGPUS) - */ - if (family_id != AMDGPU_FAMILY_VI && - family_id != AMDGPU_FAMILY_AI && - family_id != AMDGPU_FAMILY_CI) { - printf("\n\nGPU reset is not enabled for the ASIC, hotunplug suite disabled\n"); - enable = CU_FALSE; - } + /* TODO Once DRM version for unplug feature ready compare here agains it*/
if (amdgpu_device_deinitialize(device_handle)) return CU_FALSE; @@ -75,8 +77,46 @@ CU_BOOL suite_hotunplug_tests_enable(void) }
int suite_hotunplug_tests_init(void) +{ + /* We need to open/close device at each test manually */ + amdgpu_close_devices(); + + return CUE_SUCCESS; +} + +int suite_hotunplug_tests_clean(void) +{ + + + return CUE_SUCCESS; +} + +static int amdgpu_hotunplug_trigger(const char *pathname) +{ + int fd, len; + + fd = open(pathname, O_WRONLY); + if (fd < 0) + return -errno; + + len = write(fd, "1", 1); + close(fd); + + return len; +} + +static int amdgpu_hotunplug_setup_test() { int r; + char *tmp_str; + + if (amdgpu_open_device_on_test_index(open_render_node) <= 0) { + printf("\n\n Failed to reopen device file!\n"); + return CUE_SINIT_FAILED; + + + + }
r = amdgpu_device_initialize(drm_amdgpu[0], &major_version, &minor_version, &device_handle); @@ -89,27 +129,62 @@ int suite_hotunplug_tests_init(void) return CUE_SINIT_FAILED; }
- return CUE_SUCCESS; + tmp_str = drmGetCharDeviceFromFd(drm_amdgpu[0]); + if (!tmp_str){ + printf("\n\n Device path not found!\n"); + return CUE_SINIT_FAILED; + } + + sysfs_remove = realloc(tmp_str, strlen(tmp_str) * 2); + strcat(sysfs_remove, "/device/remove"); + + return 0; + }
-int suite_hotunplug_tests_clean(void) +static int amdgpu_hotunplug_teardown_test() { - int r = amdgpu_device_deinitialize(device_handle); - - if (r == 0) - return CUE_SUCCESS; - else + if (amdgpu_device_deinitialize(device_handle)) return CUE_SCLEAN_FAILED; + + amdgpu_close_devices(); + + if (sysfs_remove) + free(sysfs_remove); + + return 0; +} + +static inline int amdgpu_hotunplug_remove() +{ + return amdgpu_hotunplug_trigger(sysfs_remove); +} + +static inline int amdgpu_hotunplug_rescan() +{ + return amdgpu_hotunplug_trigger("/sys/bus/pci/rescan"); }
-static void amdgpu_hotunplug_gfx(void) +static void amdgpu_hotunplug_simple(void) { - printf("Hello!\n"); + int r; + + r = amdgpu_hotunplug_setup_test(); + CU_ASSERT_EQUAL(r , 0); + + r = amdgpu_hotunplug_remove(); + CU_ASSERT_EQUAL(r > 0, 1); + + r = amdgpu_hotunplug_teardown_test(); + CU_ASSERT_EQUAL(r , 0); + + r = amdgpu_hotunplug_rescan(); + CU_ASSERT_EQUAL(r > 0, 1); }
CU_TestInfo hotunplug_tests[] = { - { "gfx ring block test (set amdgpu.lockup_timeout=50)", amdgpu_hotunplug_gfx }, + { "Unplug card and rescan the bus to plug it back", amdgpu_hotunplug_simple }, CU_TEST_INFO_NULL, };
Same as simple test but while doing cs
Signed-off-by: Andrey Grodzovsky andrey.grodzovsky@amd.com --- tests/amdgpu/hotunplug_tests.c | 128 ++++++++++++++++++++++++++++++++- 1 file changed, 126 insertions(+), 2 deletions(-)
diff --git a/tests/amdgpu/hotunplug_tests.c b/tests/amdgpu/hotunplug_tests.c index c2bc1cf2..6e133a07 100644 --- a/tests/amdgpu/hotunplug_tests.c +++ b/tests/amdgpu/hotunplug_tests.c @@ -38,11 +38,13 @@ #include "xf86drm.h" #include <pthread.h>
+#define GFX_COMPUTE_NOP 0xffff1000
static amdgpu_device_handle device_handle; static uint32_t major_version; static uint32_t minor_version; static char *sysfs_remove = NULL; +static bool do_cs;
CU_BOOL suite_hotunplug_tests_enable(void) { @@ -110,7 +112,7 @@ static int amdgpu_hotunplug_setup_test() int r; char *tmp_str;
- if (amdgpu_open_device_on_test_index(open_render_node) <= 0) { + if (amdgpu_open_device_on_test_index(open_render_node) < 0) { printf("\n\n Failed to reopen device file!\n"); return CUE_SINIT_FAILED;
@@ -165,17 +167,128 @@ static inline int amdgpu_hotunplug_rescan() return amdgpu_hotunplug_trigger("/sys/bus/pci/rescan"); }
+static int amdgpu_cs_sync(amdgpu_context_handle context, + unsigned int ip_type, + int ring, + unsigned int seqno) +{ + struct amdgpu_cs_fence fence = { + .context = context, + .ip_type = ip_type, + .ring = ring, + .fence = seqno, + }; + uint32_t expired; + + return amdgpu_cs_query_fence_status(&fence, + AMDGPU_TIMEOUT_INFINITE, + 0, &expired); +}
-static void amdgpu_hotunplug_simple(void) +static void *amdgpu_nop_cs() +{ + amdgpu_bo_handle ib_result_handle; + void *ib_result_cpu; + uint64_t ib_result_mc_address; + uint32_t *ptr; + int i, r; + amdgpu_bo_list_handle bo_list; + amdgpu_va_handle va_handle; + amdgpu_context_handle context; + struct amdgpu_cs_request ibs_request; + struct amdgpu_cs_ib_info ib_info; + + r = amdgpu_cs_ctx_create(device_handle, &context); + CU_ASSERT_EQUAL(r, 0); + + r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, + AMDGPU_GEM_DOMAIN_GTT, 0, + &ib_result_handle, &ib_result_cpu, + &ib_result_mc_address, &va_handle); + CU_ASSERT_EQUAL(r, 0); + + ptr = ib_result_cpu; + for (i = 0; i < 16; ++i) + ptr[i] = GFX_COMPUTE_NOP; + + r = amdgpu_bo_list_create(device_handle, 1, &ib_result_handle, NULL, &bo_list); + CU_ASSERT_EQUAL(r, 0); + + 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; + + while (do_cs) + amdgpu_cs_submit(context, 0, &ibs_request, 1); + + r = amdgpu_cs_sync(context, AMDGPU_HW_IP_GFX, 0, ibs_request.seq_no); + CU_ASSERT_EQUAL((r == 0 || r == -ECANCELED), 1); + + amdgpu_bo_list_destroy(bo_list); + amdgpu_bo_unmap_and_free(ib_result_handle, va_handle, + ib_result_mc_address, 4096); + + amdgpu_cs_ctx_free(context); + + return (void *)0; +} + +static pthread_t* amdgpu_create_cs_thread() +{ + int r; + pthread_t *thread = malloc(sizeof(*thread)); + if (!thread) + return NULL; + + do_cs = true; + + r = pthread_create(thread, NULL, amdgpu_nop_cs, NULL); + CU_ASSERT_EQUAL(r, 0); + + /* Give thread enough time to start*/ + usleep(100000); + return thread; +} + +static void amdgpu_destroy_cs_thread(pthread_t *thread) +{ + void *status; + + do_cs = false; + + pthread_join(*thread, &status); + CU_ASSERT_EQUAL(status, 0); + + free(thread); +} + + +static void amdgpu_hotunplug_test(bool with_cs) { int r; + pthread_t *thread = NULL;
r = amdgpu_hotunplug_setup_test(); CU_ASSERT_EQUAL(r , 0);
+ if (with_cs) { + thread = amdgpu_create_cs_thread(); + CU_ASSERT_NOT_EQUAL(thread, NULL); + } + r = amdgpu_hotunplug_remove(); CU_ASSERT_EQUAL(r > 0, 1);
+ if (with_cs) + amdgpu_destroy_cs_thread(thread); + r = amdgpu_hotunplug_teardown_test(); CU_ASSERT_EQUAL(r , 0);
@@ -183,8 +296,19 @@ static void amdgpu_hotunplug_simple(void) CU_ASSERT_EQUAL(r > 0, 1); }
+static void amdgpu_hotunplug_simple(void) +{ + amdgpu_hotunplug_test(false); +} + +static void amdgpu_hotunplug_with_cs(void) +{ + amdgpu_hotunplug_test(true); +} + CU_TestInfo hotunplug_tests[] = { { "Unplug card and rescan the bus to plug it back", amdgpu_hotunplug_simple }, + { "Same as first test but with command submission", amdgpu_hotunplug_with_cs }, CU_TEST_INFO_NULL, };
Disconnect device while BO is exported.
Signed-off-by: Andrey Grodzovsky andrey.grodzovsky@amd.com --- tests/amdgpu/hotunplug_tests.c | 46 ++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-)
diff --git a/tests/amdgpu/hotunplug_tests.c b/tests/amdgpu/hotunplug_tests.c index 6e133a07..01ac6c62 100644 --- a/tests/amdgpu/hotunplug_tests.c +++ b/tests/amdgpu/hotunplug_tests.c @@ -306,10 +306,52 @@ static void amdgpu_hotunplug_with_cs(void) amdgpu_hotunplug_test(true); }
+static void amdgpu_hotunplug_with_exported_bo(void) +{ + int r; + uint32_t dma_buf_fd; + unsigned int *ptr; + amdgpu_bo_handle bo_handle; + + struct amdgpu_bo_alloc_request request = { + .alloc_size = 4096, + .phys_alignment = 4096, + .preferred_heap = AMDGPU_GEM_DOMAIN_GTT, + .flags = 0, + }; + + r = amdgpu_hotunplug_setup_test(); + CU_ASSERT_EQUAL(r , 0); + + amdgpu_bo_alloc(device_handle, &request, &bo_handle); + CU_ASSERT_EQUAL(r, 0); + + r = amdgpu_bo_export(bo_handle, amdgpu_bo_handle_type_dma_buf_fd, &dma_buf_fd); + CU_ASSERT_EQUAL(r, 0); + + ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, dma_buf_fd, 0); + CU_ASSERT_NOT_EQUAL(ptr, MAP_FAILED); + + r = amdgpu_hotunplug_remove(); + CU_ASSERT_EQUAL(r > 0, 1); + + amdgpu_bo_free(bo_handle); + + r = amdgpu_hotunplug_teardown_test(); + CU_ASSERT_EQUAL(r , 0); + + *ptr = 0xdeafbeef; + + munmap(ptr, 4096); + close (dma_buf_fd); + + r = amdgpu_hotunplug_rescan(); + CU_ASSERT_EQUAL(r > 0, 1); +} + CU_TestInfo hotunplug_tests[] = { { "Unplug card and rescan the bus to plug it back", amdgpu_hotunplug_simple }, { "Same as first test but with command submission", amdgpu_hotunplug_with_cs }, + { "Unplug with exported bo", amdgpu_hotunplug_with_exported_bo }, CU_TEST_INFO_NULL, }; - -
On Tue, Jun 1, 2021 at 10:17 PM Andrey Grodzovsky andrey.grodzovsky@amd.com wrote:
Adding some tests to acompany the recently added hot-unplug feature. For now the test suite is disabled until the feature propagates from drm-misc-next to drm-next.
Andrey Grodzovsky (7): tests/amdgpu: Fix valgrind warning xf86drm: Add function to retrieve char device path test/amdgpu: Add helper functions for hot unplug test/amdgpu/hotunplug: Add test suite for GPU unplug test/amdgpu/hotunplug: Add basic test tests/amdgpu/hotunplug: Add unplug with cs test. tests/amdgpu/hotunplug: Add hotunplug with exported bo test
Given how nasty hotunplug is I really think collaborating on igt tests on this would be best for everyone ... do we have to keep doing parallel tests here for amdgpu? -Daniel
tests/amdgpu/amdgpu_test.c | 42 +++- tests/amdgpu/amdgpu_test.h | 26 +++ tests/amdgpu/basic_tests.c | 5 +- tests/amdgpu/hotunplug_tests.c | 357 +++++++++++++++++++++++++++++++++ tests/amdgpu/meson.build | 1 + xf86drm.c | 23 +++ xf86drm.h | 1 + 7 files changed, 450 insertions(+), 5 deletions(-) create mode 100644 tests/amdgpu/hotunplug_tests.c
-- 2.25.1
On 2021-06-02 3:59 a.m., Daniel Vetter wrote:
On Tue, Jun 1, 2021 at 10:17 PM Andrey Grodzovsky andrey.grodzovsky@amd.com wrote:
Adding some tests to acompany the recently added hot-unplug feature. For now the test suite is disabled until the feature propagates from drm-misc-next to drm-next.
Andrey Grodzovsky (7): tests/amdgpu: Fix valgrind warning xf86drm: Add function to retrieve char device path test/amdgpu: Add helper functions for hot unplug test/amdgpu/hotunplug: Add test suite for GPU unplug test/amdgpu/hotunplug: Add basic test tests/amdgpu/hotunplug: Add unplug with cs test. tests/amdgpu/hotunplug: Add hotunplug with exported bo test
Given how nasty hotunplug is I really think collaborating on igt tests on this would be best for everyone ... do we have to keep doing parallel tests here for amdgpu? -Daniel
AFAIK as far as AMD goes a lot of developers use libdrm for regression testing while developing their features and also QA as i can see from some internal ticket specifically opened for failing to pass libdrm tests. From my bitter experience with GPU reset - features which are not part of a common use case such as device loading, mode setting or commands submissions tend to very quickly break as people develop features but never test them in those uncommon use cases - this is why I feel it will be very helpful to include those tests in libdrm.
Also given that this is libdrm amdgpu code it fits naturally into libdrm.
Regarding IGT - as you may remember I have them there too - https://gitlab.freedesktop.org/agrodzov/igt-gpu-tools/-/commits/master I hit some compile breakage on debian platform there which i need to resolve before i will submit for review there too.
Andrey
tests/amdgpu/amdgpu_test.c | 42 +++- tests/amdgpu/amdgpu_test.h | 26 +++ tests/amdgpu/basic_tests.c | 5 +- tests/amdgpu/hotunplug_tests.c | 357 +++++++++++++++++++++++++++++++++ tests/amdgpu/meson.build | 1 + xf86drm.c | 23 +++ xf86drm.h | 1 + 7 files changed, 450 insertions(+), 5 deletions(-) create mode 100644 tests/amdgpu/hotunplug_tests.c
-- 2.25.1
Ping
Andrey
On 2021-06-02 10:20 a.m., Andrey Grodzovsky wrote:
On 2021-06-02 3:59 a.m., Daniel Vetter wrote:
On Tue, Jun 1, 2021 at 10:17 PM Andrey Grodzovsky andrey.grodzovsky@amd.com wrote:
Adding some tests to acompany the recently added hot-unplug feature. For now the test suite is disabled until the feature propagates from drm-misc-next to drm-next.
Andrey Grodzovsky (7): tests/amdgpu: Fix valgrind warning xf86drm: Add function to retrieve char device path test/amdgpu: Add helper functions for hot unplug test/amdgpu/hotunplug: Add test suite for GPU unplug test/amdgpu/hotunplug: Add basic test tests/amdgpu/hotunplug: Add unplug with cs test. tests/amdgpu/hotunplug: Add hotunplug with exported bo test
Given how nasty hotunplug is I really think collaborating on igt tests on this would be best for everyone ... do we have to keep doing parallel tests here for amdgpu? -Daniel
AFAIK as far as AMD goes a lot of developers use libdrm for regression testing while developing their features and also QA as i can see from some internal ticket specifically opened for failing to pass libdrm tests. From my bitter experience with GPU reset - features which are not part of a common use case such as device loading, mode setting or commands submissions tend to very quickly break as people develop features but never test them in those uncommon use cases - this is why I feel it will be very helpful to include those tests in libdrm.
Also given that this is libdrm amdgpu code it fits naturally into libdrm.
Regarding IGT - as you may remember I have them there too - https://gitlab.freedesktop.org/agrodzov/igt-gpu-tools/-/commits/master I hit some compile breakage on debian platform there which i need to resolve before i will submit for review there too.
Andrey
tests/amdgpu/amdgpu_test.c | 42 +++- tests/amdgpu/amdgpu_test.h | 26 +++ tests/amdgpu/basic_tests.c | 5 +- tests/amdgpu/hotunplug_tests.c | 357 +++++++++++++++++++++++++++++++++ tests/amdgpu/meson.build | 1 + xf86drm.c | 23 +++ xf86drm.h | 1 + 7 files changed, 450 insertions(+), 5 deletions(-) create mode 100644 tests/amdgpu/hotunplug_tests.c
-- 2.25.1
On Thu, Jun 03, 2021 at 10:22:37AM -0400, Andrey Grodzovsky wrote:
Ping
Andrey
On 2021-06-02 10:20 a.m., Andrey Grodzovsky wrote:
On 2021-06-02 3:59 a.m., Daniel Vetter wrote:
On Tue, Jun 1, 2021 at 10:17 PM Andrey Grodzovsky andrey.grodzovsky@amd.com wrote:
Adding some tests to acompany the recently added hot-unplug feature. For now the test suite is disabled until the feature propagates from drm-misc-next to drm-next.
Andrey Grodzovsky (7): tests/amdgpu: Fix valgrind warning xf86drm: Add function to retrieve char device path test/amdgpu: Add helper functions for hot unplug test/amdgpu/hotunplug: Add test suite for GPU unplug test/amdgpu/hotunplug: Add basic test tests/amdgpu/hotunplug: Add unplug with cs test. tests/amdgpu/hotunplug: Add hotunplug with exported bo test
Given how nasty hotunplug is I really think collaborating on igt tests on this would be best for everyone ... do we have to keep doing parallel tests here for amdgpu? -Daniel
AFAIK as far as AMD goes a lot of developers use libdrm for regression testing while developing their features and also QA as i can see from some internal ticket specifically opened for failing to pass libdrm tests. From my bitter experience with GPU reset - features which are not part of a common use case such as device loading, mode setting or commands submissions tend to very quickly break as people develop features but never test them in those uncommon use cases - this is why I feel it will be very helpful to include those tests in libdrm.
Also given that this is libdrm amdgpu code it fits naturally into libdrm.
Regarding IGT - as you may remember I have them there too - https://gitlab.freedesktop.org/agrodzov/igt-gpu-tools/-/commits/master I hit some compile breakage on debian platform there which i need to resolve before i will submit for review there too.
Why can't amd run the igt tests? Afaiui on the display side this is happening already, at least sometimes.
And yes regression tests matter, it just feels silly that we need to have them 2x for amdgpu. For old stuff the old repo is all fine, but for new feature it looks a bit silly. -Daniel
Andrey
tests/amdgpu/amdgpu_test.c | 42 +++- tests/amdgpu/amdgpu_test.h | 26 +++ tests/amdgpu/basic_tests.c | 5 +- tests/amdgpu/hotunplug_tests.c | 357 +++++++++++++++++++++++++++++++++ tests/amdgpu/meson.build | 1 + xf86drm.c | 23 +++ xf86drm.h | 1 + 7 files changed, 450 insertions(+), 5 deletions(-) create mode 100644 tests/amdgpu/hotunplug_tests.c
-- 2.25.1
On Thu, Jun 3, 2021 at 5:11 PM Daniel Vetter daniel@ffwll.ch wrote:
On Thu, Jun 03, 2021 at 10:22:37AM -0400, Andrey Grodzovsky wrote:
Ping
Andrey
On 2021-06-02 10:20 a.m., Andrey Grodzovsky wrote:
On 2021-06-02 3:59 a.m., Daniel Vetter wrote:
On Tue, Jun 1, 2021 at 10:17 PM Andrey Grodzovsky andrey.grodzovsky@amd.com wrote:
Adding some tests to acompany the recently added hot-unplug feature. For now the test suite is disabled until the feature propagates from drm-misc-next to drm-next.
Andrey Grodzovsky (7): tests/amdgpu: Fix valgrind warning xf86drm: Add function to retrieve char device path test/amdgpu: Add helper functions for hot unplug test/amdgpu/hotunplug: Add test suite for GPU unplug test/amdgpu/hotunplug: Add basic test tests/amdgpu/hotunplug: Add unplug with cs test. tests/amdgpu/hotunplug: Add hotunplug with exported bo test
Given how nasty hotunplug is I really think collaborating on igt tests on this would be best for everyone ... do we have to keep doing parallel tests here for amdgpu? -Daniel
AFAIK as far as AMD goes a lot of developers use libdrm for regression testing while developing their features and also QA as i can see from some internal ticket specifically opened for failing to pass libdrm tests. From my bitter experience with GPU reset - features which are not part of a common use case such as device loading, mode setting or commands submissions tend to very quickly break as people develop features but never test them in those uncommon use cases - this is why I feel it will be very helpful to include those tests in libdrm.
Also given that this is libdrm amdgpu code it fits naturally into libdrm.
Regarding IGT - as you may remember I have them there too - https://gitlab.freedesktop.org/agrodzov/igt-gpu-tools/-/commits/master I hit some compile breakage on debian platform there which i need to resolve before i will submit for review there too.
Why can't amd run the igt tests? Afaiui on the display side this is happening already, at least sometimes.
And yes regression tests matter, it just feels silly that we need to have them 2x for amdgpu. For old stuff the old repo is all fine, but for new feature it looks a bit silly.
Different teams, different CI infrastructures... It ends up being easier to port tests between frameworks than to switch frameworks in some cases.
Alex
-Daniel
Andrey
tests/amdgpu/amdgpu_test.c | 42 +++- tests/amdgpu/amdgpu_test.h | 26 +++ tests/amdgpu/basic_tests.c | 5 +- tests/amdgpu/hotunplug_tests.c | 357 +++++++++++++++++++++++++++++++++ tests/amdgpu/meson.build | 1 + xf86drm.c | 23 +++ xf86drm.h | 1 + 7 files changed, 450 insertions(+), 5 deletions(-) create mode 100644 tests/amdgpu/hotunplug_tests.c
-- 2.25.1
-- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Please open a gitlab MR for these.
Alex
On Tue, Jun 1, 2021 at 4:17 PM Andrey Grodzovsky andrey.grodzovsky@amd.com wrote:
Adding some tests to acompany the recently added hot-unplug feature. For now the test suite is disabled until the feature propagates from drm-misc-next to drm-next.
Andrey Grodzovsky (7): tests/amdgpu: Fix valgrind warning xf86drm: Add function to retrieve char device path test/amdgpu: Add helper functions for hot unplug test/amdgpu/hotunplug: Add test suite for GPU unplug test/amdgpu/hotunplug: Add basic test tests/amdgpu/hotunplug: Add unplug with cs test. tests/amdgpu/hotunplug: Add hotunplug with exported bo test
tests/amdgpu/amdgpu_test.c | 42 +++- tests/amdgpu/amdgpu_test.h | 26 +++ tests/amdgpu/basic_tests.c | 5 +- tests/amdgpu/hotunplug_tests.c | 357 +++++++++++++++++++++++++++++++++ tests/amdgpu/meson.build | 1 + xf86drm.c | 23 +++ xf86drm.h | 1 + 7 files changed, 450 insertions(+), 5 deletions(-) create mode 100644 tests/amdgpu/hotunplug_tests.c
-- 2.25.1
amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Is libdrm on gitlab ? I wasn't aware of this. I assumed code reviews still go through dri-devel.
Andrey
________________________________ From: Alex Deucher alexdeucher@gmail.com Sent: 03 June 2021 17:20 To: Grodzovsky, Andrey Andrey.Grodzovsky@amd.com Cc: Maling list - DRI developers dri-devel@lists.freedesktop.org; amd-gfx list amd-gfx@lists.freedesktop.org; Deucher, Alexander Alexander.Deucher@amd.com; Christian König ckoenig.leichtzumerken@gmail.com Subject: Re: [PATCH 0/7] libdrm tests for hot-unplug feature
Please open a gitlab MR for these.
Alex
On Tue, Jun 1, 2021 at 4:17 PM Andrey Grodzovsky andrey.grodzovsky@amd.com wrote:
Adding some tests to acompany the recently added hot-unplug feature. For now the test suite is disabled until the feature propagates from drm-misc-next to drm-next.
Andrey Grodzovsky (7): tests/amdgpu: Fix valgrind warning xf86drm: Add function to retrieve char device path test/amdgpu: Add helper functions for hot unplug test/amdgpu/hotunplug: Add test suite for GPU unplug test/amdgpu/hotunplug: Add basic test tests/amdgpu/hotunplug: Add unplug with cs test. tests/amdgpu/hotunplug: Add hotunplug with exported bo test
tests/amdgpu/amdgpu_test.c | 42 +++- tests/amdgpu/amdgpu_test.h | 26 +++ tests/amdgpu/basic_tests.c | 5 +- tests/amdgpu/hotunplug_tests.c | 357 +++++++++++++++++++++++++++++++++ tests/amdgpu/meson.build | 1 + xf86drm.c | 23 +++ xf86drm.h | 1 + 7 files changed, 450 insertions(+), 5 deletions(-) create mode 100644 tests/amdgpu/hotunplug_tests.c
-- 2.25.1
amd-gfx mailing list amd-gfx@lists.freedesktop.org https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.free...
Code review happens on gitlab now for libdrm.
Alex
On Thu, Jun 3, 2021 at 6:02 PM Grodzovsky, Andrey Andrey.Grodzovsky@amd.com wrote:
Is libdrm on gitlab ? I wasn't aware of this. I assumed code reviews still go through dri-devel.
Andrey
From: Alex Deucher alexdeucher@gmail.com Sent: 03 June 2021 17:20 To: Grodzovsky, Andrey Andrey.Grodzovsky@amd.com Cc: Maling list - DRI developers dri-devel@lists.freedesktop.org; amd-gfx list amd-gfx@lists.freedesktop.org; Deucher, Alexander Alexander.Deucher@amd.com; Christian König ckoenig.leichtzumerken@gmail.com Subject: Re: [PATCH 0/7] libdrm tests for hot-unplug feature
Please open a gitlab MR for these.
Alex
On Tue, Jun 1, 2021 at 4:17 PM Andrey Grodzovsky andrey.grodzovsky@amd.com wrote:
Adding some tests to acompany the recently added hot-unplug feature. For now the test suite is disabled until the feature propagates from drm-misc-next to drm-next.
Andrey Grodzovsky (7): tests/amdgpu: Fix valgrind warning xf86drm: Add function to retrieve char device path test/amdgpu: Add helper functions for hot unplug test/amdgpu/hotunplug: Add test suite for GPU unplug test/amdgpu/hotunplug: Add basic test tests/amdgpu/hotunplug: Add unplug with cs test. tests/amdgpu/hotunplug: Add hotunplug with exported bo test
tests/amdgpu/amdgpu_test.c | 42 +++- tests/amdgpu/amdgpu_test.h | 26 +++ tests/amdgpu/basic_tests.c | 5 +- tests/amdgpu/hotunplug_tests.c | 357 +++++++++++++++++++++++++++++++++ tests/amdgpu/meson.build | 1 + xf86drm.c | 23 +++ xf86drm.h | 1 + 7 files changed, 450 insertions(+), 5 deletions(-) create mode 100644 tests/amdgpu/hotunplug_tests.c
-- 2.25.1
amd-gfx mailing list amd-gfx@lists.freedesktop.org https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.free...
Hey, MR created at https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/172, please help review.
Andrey
On 2021-06-03 10:26 p.m., Alex Deucher wrote:
Code review happens on gitlab now for libdrm.
Alex
On Thu, Jun 3, 2021 at 6:02 PM Grodzovsky, Andrey Andrey.Grodzovsky@amd.com wrote:
Is libdrm on gitlab ? I wasn't aware of this. I assumed code reviews still go through dri-devel.
Andrey
From: Alex Deucher alexdeucher@gmail.com Sent: 03 June 2021 17:20 To: Grodzovsky, Andrey Andrey.Grodzovsky@amd.com Cc: Maling list - DRI developers dri-devel@lists.freedesktop.org; amd-gfx list amd-gfx@lists.freedesktop.org; Deucher, Alexander Alexander.Deucher@amd.com; Christian König ckoenig.leichtzumerken@gmail.com Subject: Re: [PATCH 0/7] libdrm tests for hot-unplug feature
Please open a gitlab MR for these.
Alex
On Tue, Jun 1, 2021 at 4:17 PM Andrey Grodzovsky andrey.grodzovsky@amd.com wrote:
Adding some tests to acompany the recently added hot-unplug feature. For now the test suite is disabled until the feature propagates from drm-misc-next to drm-next.
Andrey Grodzovsky (7): tests/amdgpu: Fix valgrind warning xf86drm: Add function to retrieve char device path test/amdgpu: Add helper functions for hot unplug test/amdgpu/hotunplug: Add test suite for GPU unplug test/amdgpu/hotunplug: Add basic test tests/amdgpu/hotunplug: Add unplug with cs test. tests/amdgpu/hotunplug: Add hotunplug with exported bo test
tests/amdgpu/amdgpu_test.c | 42 +++- tests/amdgpu/amdgpu_test.h | 26 +++ tests/amdgpu/basic_tests.c | 5 +- tests/amdgpu/hotunplug_tests.c | 357 +++++++++++++++++++++++++++++++++ tests/amdgpu/meson.build | 1 + xf86drm.c | 23 +++ xf86drm.h | 1 + 7 files changed, 450 insertions(+), 5 deletions(-) create mode 100644 tests/amdgpu/hotunplug_tests.c
-- 2.25.1
amd-gfx mailing list amd-gfx@lists.freedesktop.org https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.free...
On Fri, 4 Jun 2021 at 07:20, Alex Deucher alexdeucher@gmail.com wrote:
Please open a gitlab MR for these.
I'd really prefer these tests all get migrated out of here into igt. I don't think libdrm_amdgpu really should have tests that test the kernel level infrastructure.
I know some people at AMD had issues in the past with igt because the i might have stood for intel back in time, but at this point I think we should be moving past that.
Dave.
On Thu, Jun 3, 2021 at 9:37 PM Dave Airlie airlied@gmail.com wrote:
On Fri, 4 Jun 2021 at 07:20, Alex Deucher alexdeucher@gmail.com wrote:
Please open a gitlab MR for these.
I'd really prefer these tests all get migrated out of here into igt. I don't think libdrm_amdgpu really should have tests that test the kernel level infrastructure.
We are providing equivalent patches for IGT as well. There are some teams and customers that would prefer to stick with libdrm_amdgpu.
I know some people at AMD had issues in the past with igt because the i might have stood for intel back in time, but at this point I think we should be moving past that.
I don't think that was ever an issue. It's more that some teams built a bunch of infrastructure that used libdrm tests and haven't had the resources to switch to IGT yet.
Alex
On 2021-06-03 10:53 p.m., Alex Deucher wrote:
On Thu, Jun 3, 2021 at 9:37 PM Dave Airlie airlied@gmail.com wrote:
On Fri, 4 Jun 2021 at 07:20, Alex Deucher alexdeucher@gmail.com wrote:
Please open a gitlab MR for these.
I'd really prefer these tests all get migrated out of here into igt. I don't think libdrm_amdgpu really should have tests that test the kernel level infrastructure.
I am also a bit confused now what's the policy about libdrm - is it being slowly deprecated ? What tests should go to IGT and what to libdrm ? The kernel feature itself is strictly amdgpu specific and not generic DRM level feature - why then it's not a good fit for amdgpu tester ?
We are providing equivalent patches for IGT as well. There are some teams and customers that would prefer to stick with libdrm_amdgpu.
Here are the patches in my cloned gitlab repo - https://gitlab.freedesktop.org/agrodzov/igt-gpu-tools/-/commits/master and I sent today for review to igt-dev@lists.freedesktop.org too.
Andrey
I know some people at AMD had issues in the past with igt because the i might have stood for intel back in time, but at this point I think we should be moving past that.
I don't think that was ever an issue. It's more that some teams built a bunch of infrastructure that used libdrm tests and haven't had the resources to switch to IGT yet.
Alex
dri-devel@lists.freedesktop.org