From patchwork Thu Sep 27 19:05:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Grodzovsky X-Patchwork-Id: 10618477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DAE4B112B for ; Thu, 27 Sep 2018 19:06:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3A4A2BA62 for ; Thu, 27 Sep 2018 19:06:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B75502BA78; Thu, 27 Sep 2018 19:06:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6D9672BA62 for ; Thu, 27 Sep 2018 19:06:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C0F36E5E3; Thu, 27 Sep 2018 19:06:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0050.outbound.protection.outlook.com [104.47.38.50]) by gabe.freedesktop.org (Postfix) with ESMTPS id 29D5D6E5E3; Thu, 27 Sep 2018 19:06:01 +0000 (UTC) Received: from SN1PR12CA0080.namprd12.prod.outlook.com (2603:10b6:802:21::15) by BY1PR12MB0421.namprd12.prod.outlook.com (2a01:111:e400:51b0::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Thu, 27 Sep 2018 19:05:59 +0000 Received: from CO1NAM03FT013.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::200) by SN1PR12CA0080.outlook.office365.com (2603:10b6:802:21::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1185.20 via Frontend Transport; Thu, 27 Sep 2018 19:05:59 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by CO1NAM03FT013.mail.protection.outlook.com (10.152.80.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.1185.13 via Frontend Transport; Thu, 27 Sep 2018 19:05:58 +0000 Received: from ubuntu-1604-test.amd.com (10.34.1.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.389.1; Thu, 27 Sep 2018 14:05:57 -0500 From: Andrey Grodzovsky To: Subject: [PATCH libdrm 3/3] amdgpu/test: Fix deadlock tests for AI and RV. Date: Thu, 27 Sep 2018 15:05:09 -0400 Message-ID: <1538075109-3759-3-git-send-email-andrey.grodzovsky@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538075109-3759-1-git-send-email-andrey.grodzovsky@amd.com> References: <1538075109-3759-1-git-send-email-andrey.grodzovsky@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(136003)(346002)(39860400002)(396003)(2980300002)(428003)(189003)(199004)(48376002)(36756003)(50226002)(47776003)(34290500001)(6916009)(4326008)(6666003)(8936002)(86362001)(81156014)(7696005)(450100002)(81166006)(8676002)(51416003)(53936002)(76176011)(14444005)(2906002)(54906003)(16586007)(104016004)(316002)(97736004)(77096007)(50466002)(356003)(426003)(446003)(305945005)(68736007)(44832011)(186003)(336012)(53416004)(106466001)(5660300001)(486006)(11346002)(105586002)(26005)(72206003)(478600001)(476003)(126002)(2616005)(2351001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR12MB0421; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT013; 1:AecFn4M+cdwWZT23rtRMK11OenpXgq4Yn++auh/RKzGvqBiPEfFyo5MttFinDzlHlMRdSgG4Ma4H5cpa4ilwEd6HL9u/WqVPJ9+wYHN+ha4v3dIhszpnjZTRP8HQTUnw X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ac71f9f8-a949-4040-c397-08d624ac42b9 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060); SRVR:BY1PR12MB0421; X-Microsoft-Exchange-Diagnostics: 1; BY1PR12MB0421; 3:ecsTERHQ5VSLSOFuu07IwFQP90/XIyl5OxfP2vDzF1rBZebNeGy93Qm4zlK2tdautA+LnFEJtlthxd1ekAoK1BC3nq4QzQsM8dilhZZOURgDaiBXpK6tM50b+WNlRgNtz5muO4ZYM7AL5o1B5jiwubgWR63Q/ps9XQiA1eioDK7CgCdNRPfyckB3k/SCBzIu0DP3zOh9KhNgoLy0DE6yh3O4B+H1sd/NIfK+wVTc9ThC0WoCp8OUYZFN/sBNSF+H6RUclTnjNIHwJ/kkxECZQzQWt/GPq0VUrJl8AJg3V14SqsPcvn1RGfg9sM42SrGHmsR8HQoezqGThUnwHuuy+XXfYYgzhvUX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28DX9P3xmG7IqtNXYinM5ORY+UiU6VxegwpMA3bRM5r2I2GEH7fRCvcBSJRPXOVeBDWrpv6v/q5nLkc6/9aoanQ5hcftSWaYozHYIRZgK X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93003095)(3002001)(10201501046)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:BY1PR12MB0421; BCL:0; PCL:0; RULEID:; SRVR:BY1PR12MB0421; X-Microsoft-Exchange-Diagnostics: 1; BY1PR12MB0421; 4:NQpzsiq7KKgbUBD0FA0rTnSgRhgBThwRrX0KZ1sqU5HUXIgzDbDkKP8/Ojyu5VXZxSNx88+8wva9e34wk8g4E5zq8zw0iCtprmKq59nILnV0U+cMl4vnRSqQCfZIp/DqjErJKbjaCz4Jw4DQdsAQH6stoBV5BUdNwMazbpWRSghIXp546PMVZK+TdOBPJc6umeJ2Q5kHFRKpdmQH2yeA2A1cerP6VbRIOp8fBVLxJtxTTiGbt9SxUACXfoJZbFKbj6rAZYRSVrU0KuqdXLTAtCuwLqfYuoKQTU8P+6KJCcSrVD63+VCtMsOLXQFakWdk X-Forefront-PRVS: 0808323E97 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR12MB0421; 23:Zf7FEBnCI3/6UkjVFjoLfHlPeBuA57TB+banusE99?= vIAKHyg5xFLqtU51ty+1BtTjwS4vE3yuU5coVe5OMbOL5FhFFgH0KMXTtxmZXTImwpXayNapagxLOAFDVBP+8bw9qivVGUNdmp1R6iY9fOeR3I2/dHSBiw9Vr/41cImvc386OSaWwzhqtgTTruRztXG6O+slTFIKctuPqFjCVOHULiggQ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bVbU1G+6stxOWFsg/CbjKe8ha7M1HvAdwgrCjyyVEXxnbNd3NQHMdIBn3DPQe2vRKe6yUlLKcsett4kw/rkaIcrWhFVsL208qmqj3ko+D6o8WwERZ0K6/WE8SNWBB09Yg/FJK1H8R8RUj02MhTtOBbDFCQOLnnQryZ1y/yzyhf96anVBJjuMpLEBVhNZzBtO1xJ4oOJyUGUc8hL4Q9rzW/31Svl2X SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR12MB0421; 20:BK7b0CRYqa3Fn9PCNBHkmxRxYZWdlEmr6SX1uJugbvC9L0z1mZ6PqpNyz0w7kgaX5tPKVbSgorusfPCVdHT+cQ5AVOHXMyY1VlcAFxwGI6Pk3/ZM1z8wsTM5KTYm1hOvdnT8u7Qfzc3ewCl1lU4Sp7Vxp7TuAqilv/OHEL0LUn5Rf7MwPcFajfXW9p6xSWfe0BPssnwRXYTMH/Xf29cy515A+XqQLUZSoSuMlxhE31cpaF8CNRcBRydOUpWSlblI X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2018 19:05:58.9605 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ac71f9f8-a949-4040-c397-08d624ac42b9 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR12MB0421 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek.Olsak@amd.com, amd-gfx@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Seems like AI and RV requires uncashed memory mapping to be able to pickup value written to memory by CPU. Enable the test for AI and RV. Signed-off-by: Andrey Grodzovsky --- 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);