* [PATCH libdrm v2 1/2] amdgpu/test: Allow BO mapping flags to be passed in tests @ 2018-09-28 14:45 Andrey Grodzovsky 2018-09-28 14:45 ` [PATCH libdrm v2 2/2] amdgpu/test: Fix deadlock tests for AI and RV v2 Andrey Grodzovsky 0 siblings, 1 reply; 6+ messages in thread From: Andrey Grodzovsky @ 2018-09-28 14:45 UTC (permalink / raw) To: dri-devel, Marek.Olsak; +Cc: amd-gfx v2: Call amdgpu_bo_va_op_raw directly in amdgpu_bo_alloc_and_map_raw Move amdgpu_bo_alloc_and_map_raw into C file to avoid including unistd.h in amdgpu_test.h Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> --- tests/amdgpu/amdgpu_test.h | 59 +++++++++----------------------------------- tests/amdgpu/basic_tests.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 48 deletions(-) diff --git a/tests/amdgpu/amdgpu_test.h b/tests/amdgpu/amdgpu_test.h index 0609a74..a3830bd 100644 --- a/tests/amdgpu/amdgpu_test.h +++ b/tests/amdgpu/amdgpu_test.h @@ -280,7 +280,7 @@ static inline int gpu_mem_free(amdgpu_bo_handle bo, static inline int amdgpu_bo_alloc_wrap(amdgpu_device_handle dev, unsigned size, - unsigned alignment, unsigned heap, uint64_t flags, + unsigned alignment, unsigned heap, uint64_t alloc_flags, amdgpu_bo_handle *bo) { struct amdgpu_bo_alloc_request request = {}; @@ -290,7 +290,7 @@ amdgpu_bo_alloc_wrap(amdgpu_device_handle dev, unsigned size, request.alloc_size = size; request.phys_alignment = alignment; request.preferred_heap = heap; - request.flags = flags; + request.flags = alloc_flags; r = amdgpu_bo_alloc(dev, &request, &buf_handle); if (r) @@ -301,57 +301,20 @@ amdgpu_bo_alloc_wrap(amdgpu_device_handle dev, unsigned size, return 0; } +int amdgpu_bo_alloc_and_map_raw(amdgpu_device_handle dev, unsigned size, + unsigned alignment, unsigned heap, uint64_t alloc_flags, + uint64_t mapping_flags, amdgpu_bo_handle *bo, void **cpu, + uint64_t *mc_address, + amdgpu_va_handle *va_handle); + static inline int amdgpu_bo_alloc_and_map(amdgpu_device_handle dev, unsigned size, - unsigned alignment, unsigned heap, uint64_t flags, + unsigned alignment, unsigned heap, uint64_t alloc_flags, amdgpu_bo_handle *bo, void **cpu, uint64_t *mc_address, amdgpu_va_handle *va_handle) { - struct amdgpu_bo_alloc_request request = {}; - amdgpu_bo_handle buf_handle; - amdgpu_va_handle handle; - uint64_t vmc_addr; - int r; - - request.alloc_size = size; - request.phys_alignment = alignment; - request.preferred_heap = heap; - request.flags = flags; - - r = amdgpu_bo_alloc(dev, &request, &buf_handle); - if (r) - return r; - - r = amdgpu_va_range_alloc(dev, - amdgpu_gpu_va_range_general, - size, alignment, 0, &vmc_addr, - &handle, 0); - if (r) - goto error_va_alloc; - - r = amdgpu_bo_va_op(buf_handle, 0, size, vmc_addr, 0, AMDGPU_VA_OP_MAP); - if (r) - goto error_va_map; - - r = amdgpu_bo_cpu_map(buf_handle, cpu); - if (r) - goto error_cpu_map; - - *bo = buf_handle; - *mc_address = vmc_addr; - *va_handle = handle; - - return 0; - -error_cpu_map: - amdgpu_bo_cpu_unmap(buf_handle); - -error_va_map: - amdgpu_bo_va_op(buf_handle, 0, size, vmc_addr, 0, AMDGPU_VA_OP_UNMAP); - -error_va_alloc: - amdgpu_bo_free(buf_handle); - return r; + return amdgpu_bo_alloc_and_map_raw(dev, size, alignment, heap, + alloc_flags, 0, bo, cpu, mc_address, va_handle); } static inline int diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c index 1adbddd..cceffc7 100644 --- a/tests/amdgpu/basic_tests.c +++ b/tests/amdgpu/basic_tests.c @@ -33,6 +33,7 @@ #include "amdgpu_test.h" #include "amdgpu_drm.h" +#include "util_math.h" static amdgpu_device_handle device_handle; static uint32_t major_version; @@ -286,6 +287,66 @@ static uint32_t shader_bin[] = { #define DATA_OFFSET 1024 +int amdgpu_bo_alloc_and_map_raw(amdgpu_device_handle dev, unsigned size, + unsigned alignment, unsigned heap, uint64_t alloc_flags, + uint64_t mapping_flags, amdgpu_bo_handle *bo, void **cpu, + uint64_t *mc_address, + amdgpu_va_handle *va_handle) +{ + struct amdgpu_bo_alloc_request request = {}; + amdgpu_bo_handle buf_handle; + amdgpu_va_handle handle; + uint64_t vmc_addr; + int r; + + request.alloc_size = size; + request.phys_alignment = alignment; + request.preferred_heap = heap; + request.flags = alloc_flags; + + r = amdgpu_bo_alloc(dev, &request, &buf_handle); + if (r) + return r; + + r = amdgpu_va_range_alloc(dev, + amdgpu_gpu_va_range_general, + size, alignment, 0, &vmc_addr, + &handle, 0); + if (r) + goto error_va_alloc; + + r = amdgpu_bo_va_op_raw(dev, buf_handle, 0, ALIGN(size, getpagesize()), vmc_addr, + AMDGPU_VM_PAGE_READABLE | + AMDGPU_VM_PAGE_WRITEABLE | + AMDGPU_VM_PAGE_EXECUTABLE | + alloc_flags, + AMDGPU_VA_OP_MAP); + if (r) + goto error_va_map; + + r = amdgpu_bo_cpu_map(buf_handle, cpu); + if (r) + goto error_cpu_map; + + *bo = buf_handle; + *mc_address = vmc_addr; + *va_handle = handle; + + return 0; + + error_cpu_map: + amdgpu_bo_cpu_unmap(buf_handle); + + error_va_map: + amdgpu_bo_va_op(buf_handle, 0, size, vmc_addr, 0, AMDGPU_VA_OP_UNMAP); + + error_va_alloc: + amdgpu_bo_free(buf_handle); + return r; +} + + + int suite_basic_tests_init(void) { struct amdgpu_gpu_info gpu_info = {0}; -- 2.7.4 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH libdrm v2 2/2] amdgpu/test: Fix deadlock tests for AI and RV v2 2018-09-28 14:45 [PATCH libdrm v2 1/2] amdgpu/test: Allow BO mapping flags to be passed in tests Andrey Grodzovsky @ 2018-09-28 14:45 ` Andrey Grodzovsky [not found] ` <1538145908-3153-2-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Andrey Grodzovsky @ 2018-09-28 14:45 UTC (permalink / raw) To: dri-devel, Marek.Olsak; +Cc: amd-gfx Seems like AI and RV requires uncashed memory mapping to be able to pickup value written to memory by CPU after the WAIT_REG_MEM command was already launched. . Enable the test for AI and RV. v2: Update commit description. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> --- tests/amdgpu/deadlock_tests.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/amdgpu/deadlock_tests.c b/tests/amdgpu/deadlock_tests.c index 304482d..292ec4e 100644 --- a/tests/amdgpu/deadlock_tests.c +++ b/tests/amdgpu/deadlock_tests.c @@ -80,6 +80,8 @@ static uint32_t minor_version; static pthread_t stress_thread; static uint32_t *ptr; +int use_uc_mtype = 0; + static void amdgpu_deadlock_helper(unsigned ip_type); static void amdgpu_deadlock_gfx(void); static void amdgpu_deadlock_compute(void); @@ -92,13 +94,14 @@ CU_BOOL suite_deadlock_tests_enable(void) &minor_version, &device_handle)) return CU_FALSE; - if (device_handle->info.family_id == AMDGPU_FAMILY_AI || - device_handle->info.family_id == AMDGPU_FAMILY_SI || - device_handle->info.family_id == AMDGPU_FAMILY_RV) { + if (device_handle->info.family_id == AMDGPU_FAMILY_SI) { printf("\n\nCurrently hangs the CP on this ASIC, deadlock suite disabled\n"); enable = CU_FALSE; } + if (device_handle->info.family_id >= AMDGPU_FAMILY_AI) + use_uc_mtype = 1; + if (amdgpu_device_deinitialize(device_handle)) return CU_FALSE; @@ -183,8 +186,8 @@ static void amdgpu_deadlock_helper(unsigned ip_type) r = amdgpu_cs_ctx_create(device_handle, &context_handle); CU_ASSERT_EQUAL(r, 0); - r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, - AMDGPU_GEM_DOMAIN_GTT, 0, + r = amdgpu_bo_alloc_and_map_raw(device_handle, 4096, 4096, + AMDGPU_GEM_DOMAIN_GTT, 0, use_uc_mtype ? AMDGPU_VM_MTYPE_UC : 0, &ib_result_handle, &ib_result_cpu, &ib_result_mc_address, &va_handle); CU_ASSERT_EQUAL(r, 0); -- 2.7.4 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1538145908-3153-2-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>]
* Re: [PATCH libdrm v2 2/2] amdgpu/test: Fix deadlock tests for AI and RV v2 [not found] ` <1538145908-3153-2-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org> @ 2018-10-02 20:47 ` Marek Olšák [not found] ` <CAAxE2A6Ldf0G+GEc=UQnS1AHfhDFKAPub=3XPT+T8_Rw=i84HA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Marek Olšák @ 2018-10-02 20:47 UTC (permalink / raw) To: Andrey Grodzovsky; +Cc: Marek Olšák, amd-gfx mailing list, dri-devel For the series: Reviewed-by: Marek Olšák <marek.olsak@amd.com> Marek On Fri, Sep 28, 2018 at 10:46 AM Andrey Grodzovsky <andrey.grodzovsky@amd.com> wrote: > > Seems like AI and RV requires uncashed memory mapping to be able > to pickup value written to memory by CPU after the WAIT_REG_MEM > command was already launched. > . > Enable the test for AI and RV. > > v2: > Update commit description. > > Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> > --- > tests/amdgpu/deadlock_tests.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/tests/amdgpu/deadlock_tests.c b/tests/amdgpu/deadlock_tests.c > index 304482d..292ec4e 100644 > --- a/tests/amdgpu/deadlock_tests.c > +++ b/tests/amdgpu/deadlock_tests.c > @@ -80,6 +80,8 @@ static uint32_t minor_version; > static pthread_t stress_thread; > static uint32_t *ptr; > > +int use_uc_mtype = 0; > + > static void amdgpu_deadlock_helper(unsigned ip_type); > static void amdgpu_deadlock_gfx(void); > static void amdgpu_deadlock_compute(void); > @@ -92,13 +94,14 @@ CU_BOOL suite_deadlock_tests_enable(void) > &minor_version, &device_handle)) > return CU_FALSE; > > - if (device_handle->info.family_id == AMDGPU_FAMILY_AI || > - device_handle->info.family_id == AMDGPU_FAMILY_SI || > - device_handle->info.family_id == AMDGPU_FAMILY_RV) { > + if (device_handle->info.family_id == AMDGPU_FAMILY_SI) { > printf("\n\nCurrently hangs the CP on this ASIC, deadlock suite disabled\n"); > enable = CU_FALSE; > } > > + if (device_handle->info.family_id >= AMDGPU_FAMILY_AI) > + use_uc_mtype = 1; > + > if (amdgpu_device_deinitialize(device_handle)) > return CU_FALSE; > > @@ -183,8 +186,8 @@ static void amdgpu_deadlock_helper(unsigned ip_type) > r = amdgpu_cs_ctx_create(device_handle, &context_handle); > CU_ASSERT_EQUAL(r, 0); > > - r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, > - AMDGPU_GEM_DOMAIN_GTT, 0, > + r = amdgpu_bo_alloc_and_map_raw(device_handle, 4096, 4096, > + AMDGPU_GEM_DOMAIN_GTT, 0, use_uc_mtype ? AMDGPU_VM_MTYPE_UC : 0, > &ib_result_handle, &ib_result_cpu, > &ib_result_mc_address, &va_handle); > CU_ASSERT_EQUAL(r, 0); > -- > 2.7.4 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAAxE2A6Ldf0G+GEc=UQnS1AHfhDFKAPub=3XPT+T8_Rw=i84HA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH libdrm v2 2/2] amdgpu/test: Fix deadlock tests for AI and RV v2 [not found] ` <CAAxE2A6Ldf0G+GEc=UQnS1AHfhDFKAPub=3XPT+T8_Rw=i84HA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2018-10-03 14:34 ` Christian König [not found] ` <eaf85975-6d5c-9099-3fc8-25d8b7dfe227-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Christian König @ 2018-10-03 14:34 UTC (permalink / raw) To: Marek Olšák, Andrey Grodzovsky Cc: Marek Olšák, dri-devel, amd-gfx mailing list Thanks for keeping working on this. Series is Reviewed-by: Christian König <christian.koenig@amd.com> as well. Do you now have commit rights? Christian. Am 02.10.2018 um 22:47 schrieb Marek Olšák: > For the series: > > Reviewed-by: Marek Olšák <marek.olsak@amd.com> > > Marek > On Fri, Sep 28, 2018 at 10:46 AM Andrey Grodzovsky > <andrey.grodzovsky@amd.com> wrote: >> Seems like AI and RV requires uncashed memory mapping to be able >> to pickup value written to memory by CPU after the WAIT_REG_MEM >> command was already launched. >> . >> Enable the test for AI and RV. >> >> v2: >> Update commit description. >> >> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> >> --- >> tests/amdgpu/deadlock_tests.c | 13 ++++++++----- >> 1 file changed, 8 insertions(+), 5 deletions(-) >> >> diff --git a/tests/amdgpu/deadlock_tests.c b/tests/amdgpu/deadlock_tests.c >> index 304482d..292ec4e 100644 >> --- a/tests/amdgpu/deadlock_tests.c >> +++ b/tests/amdgpu/deadlock_tests.c >> @@ -80,6 +80,8 @@ static uint32_t minor_version; >> static pthread_t stress_thread; >> static uint32_t *ptr; >> >> +int use_uc_mtype = 0; >> + >> static void amdgpu_deadlock_helper(unsigned ip_type); >> static void amdgpu_deadlock_gfx(void); >> static void amdgpu_deadlock_compute(void); >> @@ -92,13 +94,14 @@ CU_BOOL suite_deadlock_tests_enable(void) >> &minor_version, &device_handle)) >> return CU_FALSE; >> >> - if (device_handle->info.family_id == AMDGPU_FAMILY_AI || >> - device_handle->info.family_id == AMDGPU_FAMILY_SI || >> - device_handle->info.family_id == AMDGPU_FAMILY_RV) { >> + if (device_handle->info.family_id == AMDGPU_FAMILY_SI) { >> printf("\n\nCurrently hangs the CP on this ASIC, deadlock suite disabled\n"); >> enable = CU_FALSE; >> } >> >> + if (device_handle->info.family_id >= AMDGPU_FAMILY_AI) >> + use_uc_mtype = 1; >> + >> if (amdgpu_device_deinitialize(device_handle)) >> return CU_FALSE; >> >> @@ -183,8 +186,8 @@ static void amdgpu_deadlock_helper(unsigned ip_type) >> r = amdgpu_cs_ctx_create(device_handle, &context_handle); >> CU_ASSERT_EQUAL(r, 0); >> >> - r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, >> - AMDGPU_GEM_DOMAIN_GTT, 0, >> + r = amdgpu_bo_alloc_and_map_raw(device_handle, 4096, 4096, >> + AMDGPU_GEM_DOMAIN_GTT, 0, use_uc_mtype ? AMDGPU_VM_MTYPE_UC : 0, >> &ib_result_handle, &ib_result_cpu, >> &ib_result_mc_address, &va_handle); >> CU_ASSERT_EQUAL(r, 0); >> -- >> 2.7.4 >> >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/dri-devel > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <eaf85975-6d5c-9099-3fc8-25d8b7dfe227-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH libdrm v2 2/2] amdgpu/test: Fix deadlock tests for AI and RV v2 [not found] ` <eaf85975-6d5c-9099-3fc8-25d8b7dfe227-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2018-10-03 18:22 ` Marek Olšák 2018-10-10 14:24 ` Andrey Grodzovsky 0 siblings, 1 reply; 6+ messages in thread From: Marek Olšák @ 2018-10-03 18:22 UTC (permalink / raw) To: Christian König Cc: Andrey Grodzovsky, Marek Olšák, dri-devel, amd-gfx mailing list Yes, Andrey has commit rights. Marek On Wed, Oct 3, 2018 at 10:34 AM Christian König <ckoenig.leichtzumerken@gmail.com> wrote: > > Thanks for keeping working on this. > > Series is Reviewed-by: Christian König <christian.koenig@amd.com> as well. > > Do you now have commit rights? > > Christian. > > Am 02.10.2018 um 22:47 schrieb Marek Olšák: > > For the series: > > > > Reviewed-by: Marek Olšák <marek.olsak@amd.com> > > > > Marek > > On Fri, Sep 28, 2018 at 10:46 AM Andrey Grodzovsky > > <andrey.grodzovsky@amd.com> wrote: > >> Seems like AI and RV requires uncashed memory mapping to be able > >> to pickup value written to memory by CPU after the WAIT_REG_MEM > >> command was already launched. > >> . > >> Enable the test for AI and RV. > >> > >> v2: > >> Update commit description. > >> > >> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> > >> --- > >> tests/amdgpu/deadlock_tests.c | 13 ++++++++----- > >> 1 file changed, 8 insertions(+), 5 deletions(-) > >> > >> diff --git a/tests/amdgpu/deadlock_tests.c b/tests/amdgpu/deadlock_tests.c > >> index 304482d..292ec4e 100644 > >> --- a/tests/amdgpu/deadlock_tests.c > >> +++ b/tests/amdgpu/deadlock_tests.c > >> @@ -80,6 +80,8 @@ static uint32_t minor_version; > >> static pthread_t stress_thread; > >> static uint32_t *ptr; > >> > >> +int use_uc_mtype = 0; > >> + > >> static void amdgpu_deadlock_helper(unsigned ip_type); > >> static void amdgpu_deadlock_gfx(void); > >> static void amdgpu_deadlock_compute(void); > >> @@ -92,13 +94,14 @@ CU_BOOL suite_deadlock_tests_enable(void) > >> &minor_version, &device_handle)) > >> return CU_FALSE; > >> > >> - if (device_handle->info.family_id == AMDGPU_FAMILY_AI || > >> - device_handle->info.family_id == AMDGPU_FAMILY_SI || > >> - device_handle->info.family_id == AMDGPU_FAMILY_RV) { > >> + if (device_handle->info.family_id == AMDGPU_FAMILY_SI) { > >> printf("\n\nCurrently hangs the CP on this ASIC, deadlock suite disabled\n"); > >> enable = CU_FALSE; > >> } > >> > >> + if (device_handle->info.family_id >= AMDGPU_FAMILY_AI) > >> + use_uc_mtype = 1; > >> + > >> if (amdgpu_device_deinitialize(device_handle)) > >> return CU_FALSE; > >> > >> @@ -183,8 +186,8 @@ static void amdgpu_deadlock_helper(unsigned ip_type) > >> r = amdgpu_cs_ctx_create(device_handle, &context_handle); > >> CU_ASSERT_EQUAL(r, 0); > >> > >> - r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, > >> - AMDGPU_GEM_DOMAIN_GTT, 0, > >> + r = amdgpu_bo_alloc_and_map_raw(device_handle, 4096, 4096, > >> + AMDGPU_GEM_DOMAIN_GTT, 0, use_uc_mtype ? AMDGPU_VM_MTYPE_UC : 0, > >> &ib_result_handle, &ib_result_cpu, > >> &ib_result_mc_address, &va_handle); > >> CU_ASSERT_EQUAL(r, 0); > >> -- > >> 2.7.4 > >> > >> _______________________________________________ > >> dri-devel mailing list > >> dri-devel@lists.freedesktop.org > >> https://lists.freedesktop.org/mailman/listinfo/dri-devel > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH libdrm v2 2/2] amdgpu/test: Fix deadlock tests for AI and RV v2 2018-10-03 18:22 ` Marek Olšák @ 2018-10-10 14:24 ` Andrey Grodzovsky 0 siblings, 0 replies; 6+ messages in thread From: Andrey Grodzovsky @ 2018-10-10 14:24 UTC (permalink / raw) To: Marek Olšák, Christian König Cc: Marek Olšák, dri-devel, amd-gfx mailing list Sorry for late response, just back from vacation. Indeed I do have commit rights, I am back now and will finalize this work soon. Thanks for the reviews. Andrey On 10/03/2018 02:22 PM, Marek Olšák wrote: > Yes, Andrey has commit rights. > > Marek > > On Wed, Oct 3, 2018 at 10:34 AM Christian König > <ckoenig.leichtzumerken@gmail.com> wrote: >> Thanks for keeping working on this. >> >> Series is Reviewed-by: Christian König <christian.koenig@amd.com> as well. >> >> Do you now have commit rights? >> >> Christian. >> >> Am 02.10.2018 um 22:47 schrieb Marek Olšák: >>> For the series: >>> >>> Reviewed-by: Marek Olšák <marek.olsak@amd.com> >>> >>> Marek >>> On Fri, Sep 28, 2018 at 10:46 AM Andrey Grodzovsky >>> <andrey.grodzovsky@amd.com> wrote: >>>> Seems like AI and RV requires uncashed memory mapping to be able >>>> to pickup value written to memory by CPU after the WAIT_REG_MEM >>>> command was already launched. >>>> . >>>> Enable the test for AI and RV. >>>> >>>> v2: >>>> Update commit description. >>>> >>>> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> >>>> --- >>>> tests/amdgpu/deadlock_tests.c | 13 ++++++++----- >>>> 1 file changed, 8 insertions(+), 5 deletions(-) >>>> >>>> diff --git a/tests/amdgpu/deadlock_tests.c b/tests/amdgpu/deadlock_tests.c >>>> index 304482d..292ec4e 100644 >>>> --- a/tests/amdgpu/deadlock_tests.c >>>> +++ b/tests/amdgpu/deadlock_tests.c >>>> @@ -80,6 +80,8 @@ static uint32_t minor_version; >>>> static pthread_t stress_thread; >>>> static uint32_t *ptr; >>>> >>>> +int use_uc_mtype = 0; >>>> + >>>> static void amdgpu_deadlock_helper(unsigned ip_type); >>>> static void amdgpu_deadlock_gfx(void); >>>> static void amdgpu_deadlock_compute(void); >>>> @@ -92,13 +94,14 @@ CU_BOOL suite_deadlock_tests_enable(void) >>>> &minor_version, &device_handle)) >>>> return CU_FALSE; >>>> >>>> - if (device_handle->info.family_id == AMDGPU_FAMILY_AI || >>>> - device_handle->info.family_id == AMDGPU_FAMILY_SI || >>>> - device_handle->info.family_id == AMDGPU_FAMILY_RV) { >>>> + if (device_handle->info.family_id == AMDGPU_FAMILY_SI) { >>>> printf("\n\nCurrently hangs the CP on this ASIC, deadlock suite disabled\n"); >>>> enable = CU_FALSE; >>>> } >>>> >>>> + if (device_handle->info.family_id >= AMDGPU_FAMILY_AI) >>>> + use_uc_mtype = 1; >>>> + >>>> if (amdgpu_device_deinitialize(device_handle)) >>>> return CU_FALSE; >>>> >>>> @@ -183,8 +186,8 @@ static void amdgpu_deadlock_helper(unsigned ip_type) >>>> r = amdgpu_cs_ctx_create(device_handle, &context_handle); >>>> CU_ASSERT_EQUAL(r, 0); >>>> >>>> - r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, >>>> - AMDGPU_GEM_DOMAIN_GTT, 0, >>>> + r = amdgpu_bo_alloc_and_map_raw(device_handle, 4096, 4096, >>>> + AMDGPU_GEM_DOMAIN_GTT, 0, use_uc_mtype ? AMDGPU_VM_MTYPE_UC : 0, >>>> &ib_result_handle, &ib_result_cpu, >>>> &ib_result_mc_address, &va_handle); >>>> CU_ASSERT_EQUAL(r, 0); >>>> -- >>>> 2.7.4 >>>> >>>> _______________________________________________ >>>> dri-devel mailing list >>>> dri-devel@lists.freedesktop.org >>>> https://lists.freedesktop.org/mailman/listinfo/dri-devel >>> _______________________________________________ >>> dri-devel mailing list >>> dri-devel@lists.freedesktop.org >>> https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-10-10 14:24 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-09-28 14:45 [PATCH libdrm v2 1/2] amdgpu/test: Allow BO mapping flags to be passed in tests Andrey Grodzovsky 2018-09-28 14:45 ` [PATCH libdrm v2 2/2] amdgpu/test: Fix deadlock tests for AI and RV v2 Andrey Grodzovsky [not found] ` <1538145908-3153-2-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org> 2018-10-02 20:47 ` Marek Olšák [not found] ` <CAAxE2A6Ldf0G+GEc=UQnS1AHfhDFKAPub=3XPT+T8_Rw=i84HA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2018-10-03 14:34 ` Christian König [not found] ` <eaf85975-6d5c-9099-3fc8-25d8b7dfe227-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2018-10-03 18:22 ` Marek Olšák 2018-10-10 14:24 ` Andrey Grodzovsky
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.