From patchwork Fri May 13 16:48:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 9092551 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9A5A3BF29F for ; Fri, 13 May 2016 16:48:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B1A062022D for ; Fri, 13 May 2016 16:48:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4F32320263 for ; Fri, 13 May 2016 16:48:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7EE416E2C7; Fri, 13 May 2016 16:48:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 988AF6E2BD for ; Fri, 13 May 2016 16:48:41 +0000 (UTC) Received: by mail-io0-x242.google.com with SMTP id x35so15854991ioi.0 for ; Fri, 13 May 2016 09:48:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zbp/c5h4CkRPE0QTl/5ecmsL6l3XQI6Nky840wbbio4=; b=NJnd5ZXDEtV3+3w3tKXZgM9w1gcTJyVqDsB2otWriOuHLCQqCxLZLeY7H8Abh1EMlg Q44NAh2RPfzg6hjYHq1JajSMKBE9OXrzOP+wDu6AkJIgN373Izq6wAAwpqUp4CcqsN/I HfvVXmyi6RWqS26QlpXi2cqxqt8HYFWtCXRfx8kw0tonPAkvGD7aP3Cv9aZIla8Z2vRa ZeGKn0Dmt8LJRJqgbQKxb0Puw5Eg9411P5qN+8NQBksUED35Pc8HtxSayWaRsSO/8VXi r4+8ugq1ynFmNHBUH3ab2A3bv5nttq6AzkFSbe2drDJ/alhmLFjjwhJ7G8QEipK+TcTO i90w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zbp/c5h4CkRPE0QTl/5ecmsL6l3XQI6Nky840wbbio4=; b=RBYUfltW9rU2finNciNkofeR2oiR5lkdgPIVbhMmCVaHPs4uWLjhLTJX1tiV8oAA8A UaydSZThmb51uawSJmWvsslhODb9XFoKhSb5wGdnfvZm/faduEO5Bfv96G/lGf/kjlvH 1kjjDdDH5W9D1Skg0S31Dx2xTlWOa9s1fQ74y/u8qMF0FlCO4NOhVstPnLo1QgZah5a3 q+WoNGnMrAuSSFNZyZXLYN53E1qs1O655agLAHQfsdBd/iwD2nWCVF4lqKbL/FTxCN6o VuphHDM0J1fllqxdN67AhdYNCPZLKwhD+VhtdsR8O5RaZRYFvdfBL9dNh7IsteaafmkB pRzg== X-Gm-Message-State: AOPr4FUugqox1h5Lb5oU5buAR1VHfwuUDFV+IijWrInHDR8IWJiCeziGfhI7PMw6wr4pYg== X-Received: by 10.36.160.136 with SMTP id o130mr1451007ite.38.1463158120859; Fri, 13 May 2016 09:48:40 -0700 (PDT) Received: from cm.amd.com ([165.204.55.251]) by smtp.gmail.com with ESMTPSA id d1sm1204903igv.5.2016.05.13.09.48.39 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 May 2016 09:48:40 -0700 (PDT) From: Alex Deucher X-Google-Original-From: Alex Deucher To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/4] tests/amdgpu: expand write/copy tests to compute Date: Fri, 13 May 2016 12:48:30 -0400 Message-Id: <1463158112-28625-2-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1463158112-28625-1-git-send-email-alexander.deucher@amd.com> References: <1463158112-28625-1-git-send-email-alexander.deucher@amd.com> Cc: Alex Deucher X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Alex Deucher --- tests/amdgpu/basic_tests.c | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c index 05ab145..e512bda 100644 --- a/tests/amdgpu/basic_tests.c +++ b/tests/amdgpu/basic_tests.c @@ -445,17 +445,17 @@ static void amdgpu_command_submission_gfx_shared_ib(void) CU_ASSERT_EQUAL(r, 0); } -static void amdgpu_command_submission_cp_write_data(void) +static void amdgpu_command_submission_gfx_cp_write_data(void) { amdgpu_command_submission_write_linear_helper(AMDGPU_HW_IP_GFX); } -static void amdgpu_command_submission_cp_const_fill(void) +static void amdgpu_command_submission_gfx_cp_const_fill(void) { amdgpu_command_submission_const_fill_helper(AMDGPU_HW_IP_GFX); } -static void amdgpu_command_submission_cp_copy_data(void) +static void amdgpu_command_submission_gfx_cp_copy_data(void) { amdgpu_command_submission_copy_linear_helper(AMDGPU_HW_IP_GFX); } @@ -463,11 +463,11 @@ static void amdgpu_command_submission_cp_copy_data(void) static void amdgpu_command_submission_gfx(void) { /* write data using the CP */ - amdgpu_command_submission_cp_write_data(); + amdgpu_command_submission_gfx_cp_write_data(); /* const fill using the CP */ - amdgpu_command_submission_cp_const_fill(); + amdgpu_command_submission_gfx_cp_const_fill(); /* copy data using the CP */ - amdgpu_command_submission_cp_copy_data(); + amdgpu_command_submission_gfx_cp_copy_data(); /* separate IB buffers for multi-IB submission */ amdgpu_command_submission_gfx_separate_ibs(); /* shared IB buffer for multi-IB submission */ @@ -602,7 +602,7 @@ static void amdgpu_semaphore_test(void) CU_ASSERT_EQUAL(r, 0); } -static void amdgpu_command_submission_compute(void) +static void amdgpu_command_submission_compute_nop(void) { amdgpu_context_handle context_handle; amdgpu_bo_handle ib_result_handle; @@ -673,6 +673,33 @@ static void amdgpu_command_submission_compute(void) CU_ASSERT_EQUAL(r, 0); } +static void amdgpu_command_submission_compute_cp_write_data(void) +{ + amdgpu_command_submission_write_linear_helper(AMDGPU_HW_IP_COMPUTE); +} + +static void amdgpu_command_submission_compute_cp_const_fill(void) +{ + amdgpu_command_submission_const_fill_helper(AMDGPU_HW_IP_COMPUTE); +} + +static void amdgpu_command_submission_compute_cp_copy_data(void) +{ + amdgpu_command_submission_copy_linear_helper(AMDGPU_HW_IP_COMPUTE); +} + +static void amdgpu_command_submission_compute(void) +{ + /* write data using the CP */ + amdgpu_command_submission_compute_cp_write_data(); + /* const fill using the CP */ + amdgpu_command_submission_compute_cp_const_fill(); + /* copy data using the CP */ + amdgpu_command_submission_compute_cp_copy_data(); + /* nop test */ + amdgpu_command_submission_compute_nop(); +} + /* * caller need create/release: * pm4_src, resources, ib_info, and ibs_request