From patchwork Fri Nov 10 04:30:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Grodzovsky X-Patchwork-Id: 10052365 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DC7436035D for ; Fri, 10 Nov 2017 04:31:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE17728AF8 for ; Fri, 10 Nov 2017 04:31:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2B2F2B15F; Fri, 10 Nov 2017 04:31:29 +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=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 EB91C2B15B for ; Fri, 10 Nov 2017 04:31:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 33E396E9F8; Fri, 10 Nov 2017 04:31:28 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0079.outbound.protection.outlook.com [104.47.36.79]) by gabe.freedesktop.org (Postfix) with ESMTPS id 872036E9FA; Fri, 10 Nov 2017 04:31:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jPd4lblPS1XgHx8cOccVVo3G29Tnp5/TzFo5nIPsYSk=; b=ghpq9m1gjyMnxJzmF3I3iio+47sTNXyfG5bTMM3KYaJTAH95avYsMfLntLfrptl7xxrkjwlatodQGDoP6Xsq1QPqxxnF7rlTlh9i2YpkyhgGRlvVDT85bGju5Xcb3iZDT9IFdhNMBbxE3vJi1Vk9S3+ojL0JXS6S9a78ZOFJYec= Received: from MWHPR12CA0039.namprd12.prod.outlook.com (10.172.49.25) by CY4PR12MB1446.namprd12.prod.outlook.com (10.172.71.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.218.12; Fri, 10 Nov 2017 04:31:20 +0000 Received: from DM3NAM03FT018.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::208) by MWHPR12CA0039.outlook.office365.com (2603:10b6:301:2::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.218.12 via Frontend Transport; Fri, 10 Nov 2017 04:31:20 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by DM3NAM03FT018.mail.protection.outlook.com (10.152.82.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.218.12 via Frontend Transport; Fri, 10 Nov 2017 04:31:19 +0000 Received: from SATLEXDAG01.amd.com (10.181.40.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 9 Nov 2017 22:31:19 -0600 Received: from SCYBEXDAG03.amd.com (10.34.11.13) by SATLEXDAG01.amd.com (10.181.40.3) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 9 Nov 2017 23:31:18 -0500 Received: from ubuntu-1604-test.amd.com (172.27.224.252) by SCYBEXDAG03.amd.com (10.34.11.13) with Microsoft SMTP Server id 14.3.361.1; Fri, 10 Nov 2017 12:30:50 +0800 From: Andrey Grodzovsky To: , Subject: [PATCH libdrm 2/4] amdgpu: Use new suite/test disabling functionality. Date: Thu, 9 Nov 2017 23:30:01 -0500 Message-ID: <1510288203-21716-3-git-send-email-andrey.grodzovsky@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510288203-21716-1-git-send-email-andrey.grodzovsky@amd.com> References: <1510288203-21716-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)(979002)(6009001)(39860400002)(376002)(346002)(2980300002)(428002)(189002)(199003)(6666003)(68736007)(36756003)(33646002)(54906003)(106466001)(50226002)(8936002)(53416004)(110136005)(47776003)(105586002)(5003940100001)(77096006)(76176999)(356003)(50986999)(2950100002)(86362001)(101416001)(189998001)(72206003)(4326008)(97736004)(5660300001)(305945005)(316002)(8676002)(16586007)(53936002)(50466002)(81166006)(478600001)(2906002)(81156014)(48376002)(450100002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1446; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT018; 1:1G/RB1a6WbXSu1ay6W5RxIRSQLMQV/OvR+oGW3PSRH8dYE9rI88tbVrH4H7lP+Yh5HMCPdXs3X45s5+D8Rt1u5kTfMGXwtP4dm/lSDtkN/lYsdvguF7RzMaDbPUgsHk0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ae1d6f76-623c-4ff3-a0cb-08d527f3e414 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199); SRVR:CY4PR12MB1446; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1446; 3:3jMTVcFmU9drsQnMGElxBTfMEx3zIaDyeus4qdWDWiDDSuxmfY4Cs5jTi86iGJSYbf4IttY1qCxjRAKHrTrcaH8rtUh4oBBv/YUq6Z4dZuPXTgYeNjLJMjI5DKQ75h5BdwjiGmxeUuIMGv5dPakmjdnW1+/jlMKHQesdIghQnCzhUb8P7jLIVXLD79OkRytKF+xyOBcfGzGiUkVQkc5TT7pS8sDIRbR5bs+omepe7jD2cAO460E2s3Y4Bh489ULhFA3bH7r/nenAhi3Hb0AX7qcn4rXm85fM0vIedV42Q93h1RStfKdbM0wIjkyzDfjCpnGs/sCpym4Dq+WFGha1Dyy7vmWWpyv/9tOmpsRosh8=; 25:WymInRWjKNmgv67pAirlqnaAdHM1h5LGLDLo3NNRUYUNO3lg0qLWPA5pFGMfuA/LXewASxm6/iOYnw0iFmMqkDqM8wHzHP5s8h3axwzFh4eYhunJTbUWRgzOuA2xquE6NGiErjNpR9lFSZflWlIvamqC55oKDgG+2QYpvOoW+oi484x1Zuubkv1he0fTUtUG9xce/lfAjc4ffnPgrEJqWZIsUGPfoyFqMkZOLF+MGyencJI4pBFjueg1I3TCVMtciC7caCh/6ZUUHHNQo/yxY1+CDFJYc9tE1HTAQjD07VAy89CwvkBXBwSHezq1ycyJlkp2trEJxMn+VDJ8cp0/vA== X-MS-TrafficTypeDiagnostic: CY4PR12MB1446: X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1446; 31:YHNqGFTUs8pLT3rgH01paGKgTtctSETgJTU2YArZXufvA1xrQmRRcbCZHnbe/lYwpSlU+K3mJnEthUwrSI/4WVzu/M4dBl1+eeMMh/jZrBx33vnaSL+Ko+JFmEt/vfhSNKuebkyUR58ha5hg6h7nezor5rzW5Ca66e2c02EcVDownGXo3uibQV+ciqotcCuvIxq9oIh+WyEJQCftwlPMBfRWO+0bIzybeHvZVh9YFCY=; 20:3wPkq702k5dXLRS7q1NamT8e5qvDDj4yJXwB16ly0FMmdyRn/XpRF1Qv6Kx4D4ptJwf3n8JVQ0Fg1mEE+TptWdlvxt2Rq/wuP0jxeMEVbwRvg203QBhyI1YQ2sFcoUnR1eLBj7N7zwT3zueAFCpKo1huiI/fTuRmBAc1QKXg+O/JrBP8elX0z94duoyJCteo0c9TkDakRnDJZ9cV9puDvvdfmMMcmZ0R4iClTpM7ltMDJw2lZjyiZVoZJ64yacVACE7BlHyFMfplvjyJWb2sm9Gnexl2mmEy7ya2pdWH1IHV5VCkNMGXc3iT5CcoRCbH9iXz5Bgf8kvLyYzlaoe/+K5/qd8RfnNUt3bPe/UNNcPuTSR/Gtiwwh7MUXjcxKUthteQ4M25s5Hz3VeRUcRtB0IPfvMVoLttYEl5ZOuI7us+2G0naRpMlmFDC1g7Kj9PUK2oj9LKqQHa+jCLo3ePp/5sRbcUZMOtWbDhJtQMjCjXulSdlCO9jaE8lxLljHO0 X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(100000703101)(100105400095)(10201501046)(3231021)(93006095)(93003095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR12MB1446; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR12MB1446; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1446; 4:zZOYJc7IBsWG2AYXYAzagAu6qNtbKtc/Ig//rtSOdzLW5wvVBAPo3ochGUby+HiQtmwnw0jat2rn6D7S6i6yDpYgHDXOOGbQ7LZdHI/9j+riumpAt4BLIxGFSyxtmGRV+YwPMlUMudrPzBGNwYNEZIKc5ywpIxKU0NP7GFe0P49R7Yf/MFXRWm+xAxHklx0Q4UKYDoRKHk4YxM1cPbjkvk+LyA6c7HRxJyyXe8ZTzNtQKz0D99rmA4w8kgJIt8K/alJrA6r5PaX8j+N9mU3SJLPaZatlUv4rP0v+zguWhQrInBm7sY8qIh5G1FEabiVv X-Forefront-PRVS: 0487C0DB7E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1446; 23:8E6L3d5MH75sOsoBli8EhWv0S+ZIq0haaB4l5NtT+?= =?us-ascii?Q?ijQH4IqHUOZ5ak00iQOC054eZ5N9AuG4jxA+orG+6g8ya4f4T1+xEodGW7Ug?= =?us-ascii?Q?kzMVKF0LCbccOn7igxMIgVfCaako0NRQdZXQxrQFtzso4gGJc46Ab3uwPdOR?= =?us-ascii?Q?EjKdc/Q9GEmT7MnccOib17zExDnxtnFstkbRS+/kX/cdArVFS11oLLbim1aO?= =?us-ascii?Q?DA4mZKecNe0QifNFgj8aw8CBz1LQMZzZIVMF8kNNxsDkytHhbWR4HmjR2zyj?= =?us-ascii?Q?lcOIEOFe7//7RAfhxedu64R7KupFPQO+PkCgLfQWAi19oTfEx5ZDAm59nUKE?= =?us-ascii?Q?i9RRRZmeWvBQSnKuVE4zLmfQBT2I/njf25KeqcpUp0r/9/tfH5Z8yFVAzRw1?= =?us-ascii?Q?xa4ruF9ZVxc3plSgWKiYE5/tlgQMYH61bZjQSOr+HH0w+tNMO6F8iT2PxKgr?= =?us-ascii?Q?n1hsKIGen6FZGARBfhF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jcMlBMtxFPc4n7W6dzLxiy56t X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2017 04:31:19.8167 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ae1d6f76-623c-4ff3-a0cb-08d527f3e414 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=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1446 Cc: Christian.Koenig@amd.com 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Switch from disabling tests during run to using the new disable API. Signed-off-by: Andrey Grodzovsky --- tests/amdgpu/amdgpu_test.c | 14 ++++++-- tests/amdgpu/amdgpu_test.h | 15 ++++++++ tests/amdgpu/deadlock_tests.c | 8 +---- tests/amdgpu/uvd_enc_tests.c | 81 +++++++++++++++++-------------------------- tests/amdgpu/vce_tests.c | 65 +++++++++++++++++----------------- tests/amdgpu/vcn_tests.c | 74 +++++++++++++++++---------------------- 6 files changed, 123 insertions(+), 134 deletions(-) diff --git a/tests/amdgpu/amdgpu_test.c b/tests/amdgpu/amdgpu_test.c index 68ec5d3..91010dc 100644 --- a/tests/amdgpu/amdgpu_test.c +++ b/tests/amdgpu/amdgpu_test.c @@ -150,15 +150,15 @@ static Suites_Active_Status suites_active_stat[] = { }, { .pName = VCE_TESTS_STR, - .pActive = always_active, + .pActive = suite_vce_tests_enable, }, { .pName = VCN_TESTS_STR, - .pActive = always_active, + .pActive = suite_vcn_tests_enable, }, { .pName = UVD_ENC_TESTS_STR, - .pActive = always_active, + .pActive = suite_uvd_enc_tests_enable, }, { .pName = DEADLOCK_TESTS_STR, @@ -409,6 +409,14 @@ static void amdgpu_disable_suits() if (amdgpu_set_suite_active(suites_active_stat[i].pName, suites_active_stat[i].pActive())) fprintf(stderr, "suit deactivation failed - %s\n", CU_get_error_msg()); + + /* Explicitly disable specific tests due to known bugs or preferences */ + /* + * BUG: Compute ring stalls and never recovers when the address is + * written after the command already submitted + */ + if (amdgpu_set_test_active(DEADLOCK_TESTS_STR, "compute ring block test", CU_FALSE)) + fprintf(stderr, "test deactivation failed - %s\n", CU_get_error_msg()); } /* The main() function for setting up and running the tests. diff --git a/tests/amdgpu/amdgpu_test.h b/tests/amdgpu/amdgpu_test.h index 9ccc1ff..dd236ed 100644 --- a/tests/amdgpu/amdgpu_test.h +++ b/tests/amdgpu/amdgpu_test.h @@ -100,6 +100,11 @@ int suite_vce_tests_init(); int suite_vce_tests_clean(); /** + * Decide if the suite is enabled by default or not. + */ +CU_BOOL suite_vce_tests_enable(void); + +/** * Tests in vce test suite */ extern CU_TestInfo vce_tests[]; @@ -115,6 +120,11 @@ int suite_vcn_tests_init(); int suite_vcn_tests_clean(); /** + * Decide if the suite is enabled by default or not. + */ +CU_BOOL suite_vcn_tests_enable(void); + +/** + * Tests in vcn test suite + */ extern CU_TestInfo vcn_tests[]; @@ -130,6 +140,11 @@ int suite_uvd_enc_tests_init(); int suite_uvd_enc_tests_clean(); /** + * Decide if the suite is enabled by default or not. + */ +CU_BOOL suite_uvd_enc_tests_enable(void); + +/** * Tests in uvd enc test suite */ extern CU_TestInfo uvd_enc_tests[]; diff --git a/tests/amdgpu/deadlock_tests.c b/tests/amdgpu/deadlock_tests.c index e23d903..f5c4552 100644 --- a/tests/amdgpu/deadlock_tests.c +++ b/tests/amdgpu/deadlock_tests.c @@ -119,13 +119,7 @@ int suite_deadlock_tests_clean(void) CU_TestInfo deadlock_tests[] = { { "gfx ring block test", amdgpu_deadlock_gfx }, - - /* - * BUG: Compute ring stalls and never recovers when the address is - * written after the command already submitted - */ - /* { "compute ring block test", amdgpu_deadlock_compute }, */ - + { "compute ring block test", amdgpu_deadlock_compute }, CU_TEST_INFO_NULL, }; diff --git a/tests/amdgpu/uvd_enc_tests.c b/tests/amdgpu/uvd_enc_tests.c index bbda131..bed8494 100644 --- a/tests/amdgpu/uvd_enc_tests.c +++ b/tests/amdgpu/uvd_enc_tests.c @@ -79,7 +79,6 @@ static void amdgpu_cs_uvd_enc_session_init(void); static void amdgpu_cs_uvd_enc_encode(void); static void amdgpu_cs_uvd_enc_destroy(void); -static bool uvd_enc_support(void); CU_TestInfo uvd_enc_tests[] = { { "UVD ENC create", amdgpu_cs_uvd_enc_create }, @@ -89,6 +88,27 @@ CU_TestInfo uvd_enc_tests[] = { CU_TEST_INFO_NULL, }; +CU_BOOL suite_uvd_enc_tests_enable(void) +{ + int r; + struct drm_amdgpu_info_hw_ip info; + + if (amdgpu_device_initialize(drm_amdgpu[0], &major_version, + &minor_version, &device_handle)) + return CU_FALSE; + + r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_UVD_ENC, 0, &info); + + if (amdgpu_device_deinitialize(device_handle)) + return CU_FALSE; + + if (!info.available_rings) + printf("\n\nThe ASIC NOT support UVD ENC, suite disabled.\n"); + + return (r == 0 && (info.available_rings ? CU_TRUE : CU_FALSE)); +} + + int suite_uvd_enc_tests_init(void) { int r; @@ -100,11 +120,6 @@ int suite_uvd_enc_tests_init(void) family_id = device_handle->info.family_id; - if (!uvd_enc_support()) { - printf("\n\nThe ASIC NOT support UVD ENC, all sub-tests will pass\n"); - return CUE_SUCCESS; - } - r = amdgpu_cs_ctx_create(device_handle, &context_handle); if (r) return CUE_SINIT_FAILED; @@ -123,28 +138,18 @@ int suite_uvd_enc_tests_clean(void) { int r; - if (!uvd_enc_support()) { - - r = amdgpu_device_deinitialize(device_handle); - if (r) - return CUE_SCLEAN_FAILED; - - return CUE_SUCCESS; - } else { - - r = amdgpu_bo_unmap_and_free(ib_handle, ib_va_handle, - ib_mc_address, IB_SIZE); - if (r) - return CUE_SCLEAN_FAILED; + r = amdgpu_bo_unmap_and_free(ib_handle, ib_va_handle, + ib_mc_address, IB_SIZE); + if (r) + return CUE_SCLEAN_FAILED; - r = amdgpu_cs_ctx_free(context_handle); - if (r) - return CUE_SCLEAN_FAILED; + r = amdgpu_cs_ctx_free(context_handle); + if (r) + return CUE_SCLEAN_FAILED; - r = amdgpu_device_deinitialize(device_handle); - if (r) - return CUE_SCLEAN_FAILED; - } + r = amdgpu_device_deinitialize(device_handle); + if (r) + return CUE_SCLEAN_FAILED; return CUE_SUCCESS; } @@ -240,26 +245,10 @@ static void free_resource(struct amdgpu_uvd_enc_bo *uvd_enc_bo) memset(uvd_enc_bo, 0, sizeof(*uvd_enc_bo)); } -static bool uvd_enc_support(void) -{ - int r; - struct drm_amdgpu_info_hw_ip info; - - r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_UVD_ENC, 0, &info); - - if (r) - return false; - else - return (info.available_rings?true:false); -} - static void amdgpu_cs_uvd_enc_create(void) { int len, r; - if (!uvd_enc_support()) - return; - enc.width = 160; enc.height = 128; @@ -296,9 +285,6 @@ static void amdgpu_cs_uvd_enc_session_init(void) { int len, r; - if (!uvd_enc_support()) - return; - len = 0; memcpy((ib_cpu + len), uve_session_info, sizeof(uve_session_info)); len += sizeof(uve_session_info) / 4; @@ -354,8 +340,6 @@ static void amdgpu_cs_uvd_enc_encode(void) vbuf_size = ALIGN(enc.width, align) * ALIGN(enc.height, 16) * 1.5; cpb_size = vbuf_size * 10; - if (!uvd_enc_support()) - return; num_resources = 0; alloc_resource(&enc.fb, 4096, AMDGPU_GEM_DOMAIN_VRAM); @@ -489,9 +473,6 @@ static void amdgpu_cs_uvd_enc_destroy(void) struct amdgpu_uvd_enc_bo sw_ctx; int len, r; - if (!uvd_enc_support()) - return; - num_resources = 0; resources[num_resources++] = ib_handle; diff --git a/tests/amdgpu/vce_tests.c b/tests/amdgpu/vce_tests.c index cf44c13..75821bb 100644 --- a/tests/amdgpu/vce_tests.c +++ b/tests/amdgpu/vce_tests.c @@ -88,6 +88,27 @@ CU_TestInfo vce_tests[] = { CU_TEST_INFO_NULL, }; + +CU_BOOL suite_vce_tests_enable(void) +{ + if (amdgpu_device_initialize(drm_amdgpu[0], &major_version, + &minor_version, &device_handle)) + return CU_FALSE; + + family_id = device_handle->info.family_id; + + if (amdgpu_device_deinitialize(device_handle)) + return CU_FALSE; + + + if (family_id >= AMDGPU_FAMILY_RV || family_id == AMDGPU_FAMILY_SI) { + printf("\n\nThe ASIC NOT support VCE, suite disabled\n"); + return CU_FALSE; + } + + return CU_TRUE; +} + int suite_vce_tests_init(void) { int r; @@ -106,11 +127,6 @@ int suite_vce_tests_init(void) family_id = device_handle->info.family_id; vce_harvest_config = device_handle->info.vce_harvest_config; - if (family_id >= AMDGPU_FAMILY_RV || family_id == AMDGPU_FAMILY_SI) { - printf("\n\nThe ASIC NOT support VCE, all sub-tests will pass\n"); - return CUE_SUCCESS; - } - r = amdgpu_cs_ctx_create(device_handle, &context_handle); if (r) return CUE_SINIT_FAILED; @@ -131,24 +147,18 @@ int suite_vce_tests_clean(void) { int r; - if (family_id >= AMDGPU_FAMILY_RV || family_id == AMDGPU_FAMILY_SI) { - r = amdgpu_device_deinitialize(device_handle); - if (r) - return CUE_SCLEAN_FAILED; - } else { - r = amdgpu_bo_unmap_and_free(ib_handle, ib_va_handle, - ib_mc_address, IB_SIZE); - if (r) - return CUE_SCLEAN_FAILED; - - r = amdgpu_cs_ctx_free(context_handle); - if (r) - return CUE_SCLEAN_FAILED; - - r = amdgpu_device_deinitialize(device_handle); - if (r) - return CUE_SCLEAN_FAILED; - } + r = amdgpu_bo_unmap_and_free(ib_handle, ib_va_handle, + ib_mc_address, IB_SIZE); + if (r) + return CUE_SCLEAN_FAILED; + + r = amdgpu_cs_ctx_free(context_handle); + if (r) + return CUE_SCLEAN_FAILED; + + r = amdgpu_device_deinitialize(device_handle); + if (r) + return CUE_SCLEAN_FAILED; return CUE_SUCCESS; } @@ -248,9 +258,6 @@ static void amdgpu_cs_vce_create(void) unsigned align = (family_id >= AMDGPU_FAMILY_AI) ? 256 : 16; int len, r; - if (family_id >= AMDGPU_FAMILY_RV || family_id == AMDGPU_FAMILY_SI) - return; - enc.width = vce_create[6]; enc.height = vce_create[7]; @@ -444,9 +451,6 @@ static void amdgpu_cs_vce_encode(void) unsigned align = (family_id >= AMDGPU_FAMILY_AI) ? 256 : 16; int i, r; - if (family_id >= AMDGPU_FAMILY_RV || family_id == AMDGPU_FAMILY_SI) - return; - vbuf_size = ALIGN(enc.width, align) * ALIGN(enc.height, 16) * 1.5; cpb_size = vbuf_size * 10; num_resources = 0; @@ -525,9 +529,6 @@ static void amdgpu_cs_vce_destroy(void) { int len, r; - if (family_id >= AMDGPU_FAMILY_RV || family_id == AMDGPU_FAMILY_SI) - return; - num_resources = 0; alloc_resource(&enc.fb[0], 4096, AMDGPU_GEM_DOMAIN_GTT); resources[num_resources++] = enc.fb[0].handle; diff --git a/tests/amdgpu/vcn_tests.c b/tests/amdgpu/vcn_tests.c index 2b1696d..53a2d08 100644 --- a/tests/amdgpu/vcn_tests.c +++ b/tests/amdgpu/vcn_tests.c @@ -82,6 +82,27 @@ CU_TestInfo vcn_tests[] = { CU_TEST_INFO_NULL, }; +CU_BOOL suite_vcn_tests_enable(void) +{ + + if (amdgpu_device_initialize(drm_amdgpu[0], &major_version, + &minor_version, &device_handle)) + return CU_FALSE; + + family_id = device_handle->info.family_id; + + if (amdgpu_device_deinitialize(device_handle)) + return CU_FALSE; + + + if (family_id < AMDGPU_FAMILY_RV) { + printf("\n\nThe ASIC NOT support VCN, suite disabled\n"); + return CU_FALSE; + } + + return CU_TRUE; +} + int suite_vcn_tests_init(void) { int r; @@ -93,11 +114,6 @@ int suite_vcn_tests_init(void) family_id = device_handle->info.family_id; - if (family_id < AMDGPU_FAMILY_RV) { - printf("\n\nThe ASIC NOT support VCN, all sub-tests will pass\n"); - return CUE_SUCCESS; - } - r = amdgpu_cs_ctx_create(device_handle, &context_handle); if (r) return CUE_SINIT_FAILED; @@ -116,26 +132,18 @@ int suite_vcn_tests_clean(void) { int r; - if (family_id < AMDGPU_FAMILY_RV) { - r = amdgpu_device_deinitialize(device_handle); - if (r) - return CUE_SCLEAN_FAILED; - } else { - r = amdgpu_bo_unmap_and_free(ib_handle, ib_va_handle, - ib_mc_address, IB_SIZE); - if (r) - return CUE_SCLEAN_FAILED; - - r = amdgpu_cs_ctx_free(context_handle); - if (r) - return CUE_SCLEAN_FAILED; - - r = amdgpu_device_deinitialize(device_handle); - if (r) - return CUE_SCLEAN_FAILED; - } + r = amdgpu_bo_unmap_and_free(ib_handle, ib_va_handle, + ib_mc_address, IB_SIZE); + if (r) + return CUE_SCLEAN_FAILED; - return CUE_SUCCESS; + r = amdgpu_cs_ctx_free(context_handle); + if (r) + return CUE_SCLEAN_FAILED; + + r = amdgpu_device_deinitialize(device_handle); + if (r) + return CUE_SCLEAN_FAILED; } static int submit(unsigned ndw, unsigned ip) @@ -244,9 +252,6 @@ static void amdgpu_cs_vcn_dec_create(void) struct amdgpu_vcn_bo msg_buf; int len, r; - if (family_id < AMDGPU_FAMILY_RV) - return; - num_resources = 0; alloc_resource(&msg_buf, 4096, AMDGPU_GEM_DOMAIN_GTT); resources[num_resources++] = msg_buf.handle; @@ -282,9 +287,6 @@ static void amdgpu_cs_vcn_dec_decode(void) int size, len, i, r; uint8_t *dec; - if (family_id < AMDGPU_FAMILY_RV) - return; - size = 4*1024; /* msg */ size += 4*1024; /* fb */ size += 4096; /*it_scaling_table*/ @@ -355,9 +357,6 @@ static void amdgpu_cs_vcn_dec_destroy(void) struct amdgpu_vcn_bo msg_buf; int len, r; - if (family_id < AMDGPU_FAMILY_RV) - return; - num_resources = 0; alloc_resource(&msg_buf, 1024, AMDGPU_GEM_DOMAIN_GTT); resources[num_resources++] = msg_buf.handle; @@ -387,24 +386,15 @@ static void amdgpu_cs_vcn_dec_destroy(void) static void amdgpu_cs_vcn_enc_create(void) { - if (family_id < AMDGPU_FAMILY_RV) - return; - /* TODO */ } static void amdgpu_cs_vcn_enc_encode(void) { - if (family_id < AMDGPU_FAMILY_RV) - return; - /* TODO */ } static void amdgpu_cs_vcn_enc_destroy(void) { - if (family_id < AMDGPU_FAMILY_RV) - return; - /* TODO */ }