From patchwork Mon Sep 6 01:10:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Pan, Xinhui" X-Patchwork-Id: 12476195 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83989C433F5 for ; Mon, 6 Sep 2021 01:10:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3ABDB60EB7 for ; Mon, 6 Sep 2021 01:10:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3ABDB60EB7 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6710189A94; Mon, 6 Sep 2021 01:10:05 +0000 (UTC) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2068.outbound.protection.outlook.com [40.107.92.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9F83F89A94; Mon, 6 Sep 2021 01:10:04 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Djnp6t//jBvYMk4nQ6vTKhklbyjDONCe1CYWxXYmrll4iFMlboAPVdbjHUJEfGNf8cfsUO+6+FElnsRlOLJThvrbFXq+Q0vS+slTkadh181tmnTQ3GjoZpNlZ9sPKzs6tOD6RfCna16VD1lkYXYNj//skjceKUoxKXN9jIrp65raoyBd6btwA+56nDWLuxrTbgBhd24VgWrhfELgbUHaF+TOrGosAv4tJb2W2o4LxVxYliK0iJaJNguJwLkMt0fimkWmIU8TKZ1i6FjxXuo9GvbE/CAC0JcagubZCTy/cwX04wWeitbzvdErdGbYJhoyedQBI32ujlafshzTLU75aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=tSvjM3KmLRNzTz3Q5SQSbl7L7iBc1sLA2gNC69OlIZU=; b=hkvFMfLw/rdvSgad2kCLN7I4Q/lep4ey1pHfYSfe76jMUxX7qgYV8U00icOV3RmIZlB3DakYWtomaRuDicvRmmRH8bko3Rt4IvhnpXlwaX+nnEJxuWWw3T5pLSMlYqvMWg20SOue+mc73RjbSOshdl7LuxQ0ZN2ZZRviPrbCIQqRaBWD9JpciXenJWyLXC51kIeZ06NXdtRr7zSdf1amHmaTwaFMBnP0OsPXCETZRswPRaHWDMoQpd1Wv6FmSibCt5NxJpBflqOeq4PYJJJAxD6ODYncauAB7D75zkWwkvy71Mtf5znMtGTmT1PKj8ATdCEUtbJzV4kJSAUCGMr/TA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tSvjM3KmLRNzTz3Q5SQSbl7L7iBc1sLA2gNC69OlIZU=; b=j6n1wVqcD4B02DK8oPdhAZlgrbPORSnRhYzs1LoNSnJmbXGOwWrhbbHnb1yY7iwCykoF8fiVlb2ogCDzyGalmv72FYOEH4klqAgNL3JLxtlk3ngxQD9cu4I0S5XRyeqWk8YuPiewPHLmIfRlf52+g9bv4y/Nz7VBXY+TitAsbNo= Received: from DM4PR12MB5165.namprd12.prod.outlook.com (2603:10b6:5:394::9) by DM4PR12MB5101.namprd12.prod.outlook.com (2603:10b6:5:390::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19; Mon, 6 Sep 2021 01:10:02 +0000 Received: from DM4PR12MB5165.namprd12.prod.outlook.com ([fe80::79d6:3902:9bcd:37ca]) by DM4PR12MB5165.namprd12.prod.outlook.com ([fe80::79d6:3902:9bcd:37ca%9]) with mapi id 15.20.4478.025; Mon, 6 Sep 2021 01:10:02 +0000 From: "Pan, Xinhui" To: "amd-gfx@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" CC: "Koenig, Christian" , "Deucher, Alexander" , "chenli@uniontech.com" Subject: [PATCH v2 2/2] drm/amdpgu: Use VRAM domain in UVD IB test Thread-Topic: [PATCH v2 2/2] drm/amdpgu: Use VRAM domain in UVD IB test Thread-Index: AQHXorvQyBdrKYEtM0WaAd5AOAc+zw== Date: Mon, 6 Sep 2021 01:10:02 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_88914ebd-7e6c-4e12-a031-a9906be2db14_Enabled=True; MSIP_Label_88914ebd-7e6c-4e12-a031-a9906be2db14_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_88914ebd-7e6c-4e12-a031-a9906be2db14_SetDate=2021-09-06T01:10:02.228Z; MSIP_Label_88914ebd-7e6c-4e12-a031-a9906be2db14_Name=AMD Official Use Only; MSIP_Label_88914ebd-7e6c-4e12-a031-a9906be2db14_ContentBits=0; MSIP_Label_88914ebd-7e6c-4e12-a031-a9906be2db14_Method=Standard; suggested_attachment_session_id: 3d4d5e2c-cdce-5492-819f-d55a6f6b1743 authentication-results: lists.freedesktop.org; dkim=none (message not signed) header.d=none; lists.freedesktop.org; dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d8888978-5552-4648-f53c-08d970d30e28 x-ms-traffictypediagnostic: DM4PR12MB5101: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:127; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: qhsH8NlPI7T8jgs9zlT/VHHrZKQE1FzVBYEUQ29GjZhWbA1XzISym00P/ZVjpqfZUfaORYc30uNrrVgPK6BF1/KPcZfoo4jCBiVQj9CiZf2HvejVWdcyCKXSSTwAbB2gbIdmo6hjbcijeziT0Woat1dWlUf8ArK31eN+HUxcR2D93FjKK0r0QtpW0dKXBxd6NEp3R9EdhSchZ5Df+NvcXc4wy8GRaYhgxtXiXv+Lfdcqf7xLgL2yHlKkauGCOIp3hSe1ZU40fXb6aljb3Z58VZSGa7qn1rN1nBiCfcFccJkTB68/VIwVStpRS1iOOCaKj2MMkSmLo5ECSqbrsARSnBEUtP5Ok4B7FGXlQrAjOQKrj110WmQ9iUXvTxvedSoBXSVo8tf+HhvOd0JrNjMdXX/br3kRxcFbxjjzAS3f91cjMmADMMzvN+SOvy4jqpgymbVlFG0Omc8bhCZWlyQ218T/CWeXktjaPcLWN02PbYUbMxd/dI/RkCfW+soBg1Fu0pX8HM7BnZe8hXDhHiV4Wg0TkafBe7H3IKxVkCF5UiuXXs0fSQJw4dk4S1J4+nsau+xE3JZon6HaByAQ2gOyGS2XLCKy4YlsISD1C4JWNsASKWrVM4P/BqZzN15DoFQIElCCYboWrRU0vRgpeUvULd8lVe8sUYKXxxAO5l9LDdcCmfytbS+qiVP499fHxZUch1scbH1g+B8aOnyEZoUAzg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5165.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(136003)(376002)(39860400002)(346002)(8936002)(8676002)(91956017)(71200400001)(5660300002)(76116006)(54906003)(38100700002)(55016002)(110136005)(52536014)(26005)(66556008)(64756008)(66476007)(33656002)(66446008)(86362001)(9686003)(122000001)(66946007)(6506007)(186003)(316002)(7696005)(4326008)(38070700005)(2906002)(478600001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?eucgb2312_cn?b?U1pyWHNTUTQxeFVPb3FaK1p2?= =?eucgb2312_cn?b?aUJpNER2VlZWUzRLWVV0RG0wc0N2VnB2bUtvYWR2UEFka0dUQkNMTXlONC9xNnI0?= =?eucgb2312_cn?b?eDhuMFczVWgyM1gvUnd5ck4wNjl0eVFUN3FjRmFDZnd6YUZPY1hiTVIrbzhLTXJC?= =?eucgb2312_cn?b?aDRBa0V0QVg2Y21RQVBFNmMvSzZUVVI5ckZEbHVaMXJ3Y2Rmc1NQVlM4ajB2K01P?= =?eucgb2312_cn?b?M25YOTE2TmZYZE5DNDcxakwvdTVHQUpYcXVvZVpzbGxMSlovdFNUNjc4QitKdFJ0?= =?eucgb2312_cn?b?U1lZeFJZWlFjejNPWUdtRkhOeGJPd1dTV2FoTkw4MkRNNlYxeEI3azA3dW1FVWlI?= =?eucgb2312_cn?b?T2tOQ1ZJUEplS0JpdHN2eVdkOXhGVlRPMzdDZmE3ZmtQck5ObHMzQ0hVN0xsSHEy?= =?eucgb2312_cn?b?WnJlMGVSc1grdDhYbHJlTUFPMVhneWRjOGZNbzN0cmw1WEVtTFRSUmMyT0Y1ejRF?= =?eucgb2312_cn?b?MUQxMnJSN09FdWNaZjlWTjF5ZkxRKzBLc3pMT2VJTXNyRkFTSWVxd3ZhWjFndGNq?= =?euc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ucgb2312_cn?b?d0J0ek9CSlhvOU9HN2t6REZJcTc0Q1VuQVRZZEg4U2pTdWQxVVNjdHN4WDZGMENh?= =?eucgb2312_cn?b?bEkzOUJEcENJM3o3ZFgySjBaNVJVbE5DSDliSUFKaDR0UlpqNDRjNER6VHN1SW1O?= =?eucgb2312_cn?b?dVhHbStkcXJBOWh4a3pvU0pQem5UTmhrbVJ5dWswR3I0U0Y2Sk5KUHFPbllyOVhh?= =?eucgb2312_cn?b?cjAwVlhTa2xKbnhKbVprOFA5dnc3dWNvSW0vbWR3NzU2bmtlbmZzazVud09vWjBP?= =?eucgb2312_cn?b?dlg3cnkwZ0FIZ201cmRyYVpMcCtBZ2U1QmdoRXY3blpvdW5tZHpmQWtPczQ2WGRB?= =?eucgb2312_cn?b?cXZRdEVzYUF2Y1grUVl1WlJDZHFsMzB3VUQ2RVVQbis5NjBxcmlzWmFERzM4dGJw?= =?eucgb2312_cn?b?ZVFFTk9JRGxXZUdmT2pZWTNTQ2dSRmpOSXBMeC80?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5165.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8888978-5552-4648-f53c-08d970d30e28 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Sep 2021 01:10:02.6566 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: yCU1QswneBcbTgu+rk6AHgFzNk33Ncpl91FZJ1ePhMg/GERzp2rDCzru6xMQc87N X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5101 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 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" [AMD Official Use Only] Like vce/vcn does, visible VRAM is OK for ib test. While commit a11d9ff3ebe0 ("drm/amdgpu: use GTT for uvd_get_create/destory_msg") says VRAM is not mapped correctly in his platform which is likely an arm64. So lets change back to use VRAM on x86_64 platform. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.25.1 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index d451c359606a..e4b75f33ccc8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c @@ -1178,7 +1178,11 @@ int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle, int r, i; r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE, +#ifdef CONFIG_X86_64 + AMDGPU_GEM_DOMAIN_VRAM, +#else AMDGPU_GEM_DOMAIN_GTT, +#endif &bo, NULL, (void **)&msg); if (r) return r; @@ -1210,7 +1214,11 @@ int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle, int r, i; r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE, +#ifdef CONFIG_X86_64 + AMDGPU_GEM_DOMAIN_VRAM, +#else AMDGPU_GEM_DOMAIN_GTT, +#endif &bo, NULL, (void **)&msg); if (r) return r;