From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3571210E609 for ; Thu, 21 Sep 2023 19:56:53 +0000 (UTC) Message-ID: <01e6063e-c61b-1a01-c7a0-6feb6006aeaa@amd.com> Date: Thu, 21 Sep 2023 15:56:45 -0400 To: Kamil Konieczny , igt-dev@lists.freedesktop.org, vitaly.prosyak@amd.com, Alex Deucher , Jesse Zhang , Luben Tuikov , Christian Koenig References: <20230908025038.217934-1-vitaly.prosyak@amd.com> <20230908171809.vrylau75am6iqxn5@kamilkon-desk.igk.intel.com> Content-Language: en-US From: vitaly prosyak In-Reply-To: <20230908171809.vrylau75am6iqxn5@kamilkon-desk.igk.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Subject: Re: [igt-dev] [PATCH] lib/amdgpu: fix typo in function compare_pattern List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Hi Kamil, Sorry, I did not see your email because I reconfigured into new directories of my Thunderbird. This patch was merged as is. I would be more careful next time to validate responses. Thanks, Vitaly On 2023-09-08 13:18, Kamil Konieczny wrote: > Hi Vitaly, > > some nit about description: > [PATCH] lib/amdgpu: fix typo in function > ----------------------- ^ > looks rather like fixing a bug > > On 2023-09-07 at 22:50:38 -0400, vitaly.prosyak@amd.com wrote: >> From: Jesse Zhang >> >> In function compare_pattern check the destination buffer (bo2_cpu), >> instead of source buffer(bo_cpu). >> Add validation of the return value in the eviction test. > -- ^^^^^^^^^^^^^^ > And this is unrelated to your desription and unexpected change > in other test, imho should be separate patch. > > Regards, > Kamil > >> Cc: Luben Tuikov >> Cc: Alex Deucher >> Cc: Christian Koenig >> Signed-off-by: Jesse Zhang >> Reviewed-by: Vitaly Prosyak >> --- >> lib/amdgpu/amd_ip_blocks.c | 2 +- >> tests/amdgpu/amd_basic.c | 1 + >> 2 files changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/lib/amdgpu/amd_ip_blocks.c b/lib/amdgpu/amd_ip_blocks.c >> index be9ff38c6..7f8d4a4cd 100644 >> --- a/lib/amdgpu/amd_ip_blocks.c >> +++ b/lib/amdgpu/amd_ip_blocks.c >> @@ -296,7 +296,7 @@ x_compare_pattern(const struct amdgpu_ip_funcs *func, >> int num_compare = ring_context->write_length/div; >> >> while (i < num_compare) { >> - if (ring_context->bo_cpu[i++] != func->pattern) { >> + if (ring_context->bo2_cpu[i++] != func->pattern) { >> ret = -1; >> break; >> } >> diff --git a/tests/amdgpu/amd_basic.c b/tests/amdgpu/amd_basic.c >> index dfe11995f..e7a42a335 100644 >> --- a/tests/amdgpu/amd_basic.c >> +++ b/tests/amdgpu/amd_basic.c >> @@ -411,6 +411,7 @@ amdgpu_bo_eviction_test(amdgpu_device_handle device_handle) >> amdgpu_test_exec_cs_helper(device_handle, ip_block->type, ring_context); >> /* fulfill PM4: test DMA copy linear */ >> r = ip_block->funcs->compare_pattern(ip_block->funcs, ring_context, sdma_write_length); >> + igt_assert_eq(r, 0); >> amdgpu_bo_unmap_and_free(ring_context->bo, ring_context->va_handle, ring_context->bo_mc, >> ring_context->write_length); >> amdgpu_bo_unmap_and_free(ring_context->bo2, ring_context->va_handle2, ring_context->bo_mc2, >> -- >> 2.25.1 >>