From patchwork Mon Sep 6 01:08:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Pan, Xinhui" X-Patchwork-Id: 12476193 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=unavailable 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 99B42C433EF for ; Mon, 6 Sep 2021 01:08:41 +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 3A1736101C for ; Mon, 6 Sep 2021 01:08:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3A1736101C 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 79F8089A92; Mon, 6 Sep 2021 01:08:40 +0000 (UTC) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2055.outbound.protection.outlook.com [40.107.243.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id B0CE189944; Mon, 6 Sep 2021 01:08:38 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WLHFx3NFlds0KsCVR9wDqSstGvtz3ykqhbkLsxcwCWsDzZr2jnUOy1bvONnSk0gFXGHmVdgDCbHEWMN7gCsd5uMndSPa9fLZGWdSzeuwfaj9wZRYjchmHS9+wqJcPGIoJR9uojSZY+hRFgX1uL14J4OX2YfOROLQ6h2/KwG7Ty5frr1zG3lvkoKJ66JPS5sLsNEUKkSlWw8KRlEC3XbOxzECfkYF4MwW5jv4zr3erQHq958ySB9N4vB+ccqaMPG/NpfLBCCl7vsOfKu4aIbElQIuDtjvdTUZcNZ6NTpIPW8brjJ3HAc3H+snmW6XBQyyKgyFWuKjjHnrmCcKenxDrg== 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=Zf8R8OOTepd6/fVZS3uaEM9a/+cztjIJ14WaoOv6ncg=; b=N2A9N8qIcgnFoYGsSPRf/hSPG5c+wvCXtQJls+TPOA22ucrZiGt4tAQ6dSAGLh5SIz7iTO0kCh1uEAANXJe2IXSfPCVvhN5oCUOj56arebftx/nFlhSntgCxo3KzLySA/d1g1hf3jNuPPQVu8L4tKycYeDVHJVOnZIc/JRDIHbMnXyhIdqgGs5tONGVvedtTAc5YLNU4Ri5zRj4tRtgQ3uaF0ScuOugE11A9sXORqLKtnmOgTFdC9H7goethV2vENmI04L7HiEvf7ozHXLzWc9zFZApSDuxIu0zNEUXNAoQXWtTg6QMXD3Qv9XaNphPQGZOBBLz35h8YzxT3e4mNxw== 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=Zf8R8OOTepd6/fVZS3uaEM9a/+cztjIJ14WaoOv6ncg=; b=Tw5JX9NuU03MTVqjF9KMgSI55jRAYaTw7UqswZ8eH8CV48Hm440WWnYAHf5+dWhCgszeik6jYH2o5CK20MHm91x/e9L+4m6KPtqh2APaqmdzYivwRNbpGZDdSeEr9RbVjr+obcK8vRKDxf/6+nuqr9a/edv44jFAdkdsqrrossc= 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:08:36 +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:08:36 +0000 From: "Pan, Xinhui" To: "amd-gfx@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" CC: "Koenig, Christian" , "Deucher, Alexander" Subject: [PATCH v2 1/2] drm/ttm: Fix a deadlock if the target BO is not idle during swap Thread-Topic: [PATCH v2 1/2] drm/ttm: Fix a deadlock if the target BO is not idle during swap Thread-Index: AQHXoruneNx0ebjVfkuCSfTXZI/x3w== Date: Mon, 6 Sep 2021 01:08:36 +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:08:36.221Z; 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: 7b9a144b-874c-0558-ce58-2c57815891ad 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: 40f7a02d-de75-46a7-1252-08d970d2daea x-ms-traffictypediagnostic: DM4PR12MB5101: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LiDfLqgWFChE+hlHwd27XKJZfKp1CSYGzQH2WECM9MAWmhiCqB3PFWk3PM2iyxGnOgBQUHJ9iIg6QXwyp6YKy65ykTl1gXuCIITfY1092WBLjqx7qp++L6z0E5Gzn6RtR0Y93ErYsPwC+BcRPH8ic9MsEBZsRQGQHNv3TQ9kw4XN6RW13FuaL3dXdBlH6bJQi+o48lqxd5JQJv/8H7cJ4PDBhIseR6QMgEIqAMssejMVD/vcn61b7VafoAZohVsm8zYmmidwT/wJ/ZaVrINWGIG8v+ph1cPKWX9cYXykeo2cGnRoDey6ZLAZwFzrI8blbiD36QR8wR0RcYgBJ6l5Yi2M25tvkcFE2zjRewfnMcZ2gkFdkpkAckwg8eMDMPZ9khDrJr0p9iM5A2kaN+4iUFQTynmqnE6eVYEZARomzpXPy7ywkhjWQHYLPrgzcdfDocCDs9m1mkH+jlG2pDKwL3JAL6C9uOjXNaXgL3eGmFSeAPdo6N0PNXfHIyFTPXHprBNkssfvSANwshSbb5xPAEhh4iaGNrX3W0obhyt9URX7Db72h71X//wGqxYhFK1U43Vk1beExDcZa0B82JIt0It+ct/vt9xdKhSv9C0cRu/IFRFZODkBm8Xqi5Qgw3XC02l6jjYWx+GiUJgKBDedmYqkiplnkufjiaoCJtYHNbVVG46cOXzIsuGGVYR46hAqWJ1EqPBXtiKYO4Ml+/d6SA== 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)(450100002)(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)(66574015)(83380400001)(478600001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?mGOu0/MnJxCt5wxEMOh+6mW?= =?iso-8859-1?q?18FFfSPtcPKE3E/8BTrX3ET6V63HIESLykfyeUndq2XTcawrF5ZP4ZRVJBQl?= =?iso-8859-1?q?vioaYvs1kQGsK84tiN1V485Vlf/pYjLX5tT2uXi55aBILZ+sQa50X6xiQGSu?= =?iso-8859-1?q?ZoU3+0Kkt4X8rnQvqV5e0GRQCulNGhdZYMJ1ADt2tdnxF35HTkVWaXan/FC8?= =?iso-8859-1?q?QKCzSCwPnkyP/P7HvJU3C7LgroMZ6F6TAKL5bt0Ws8wrRvKAMEcv/klUfb9A?= =?iso-8859-1?q?S+XEo/gl+ZPbbHbIr1518zMNlx/wDKrnQoo0yYbs2qWAAfZzV3wZeE+Ns0u0?= =?iso-8859-1?q?I87VIinYQ2EtBp8guFU5FPXpCt5+A3SF9fxPHFQiwOfhGp7qWTxKehOUiWTh?= =?iso-8859-1?q?H0CroRqDTgb6iwKT7TB+7j1sb4ghn4wVMx82C4oE8LAXaICUcPMw1/42jvsE?= =?iso-8859-1?q?8OhePSg0mBSM9PMxIfVWG4WFg29UqM9kuNLU1OT03e5VgKB1YOiamH9VIEhc?= =?iso-8859-1?q?zgBlBJhCnb9siB02YcYnEotoqC0qtQBWqJiQG+MpMuaZ8ghpS1oDyKjLGPx1?= =?iso-8859-1?q?+I3dYifZQC/+gmZF+VN5Ol9XUArEDsRIE2f8HUFycAZNCoNFcxfHAw8X/210?= =?iso-8859-1?q?eOmOxlDgbtO2/pdzVjIxPGNHM1jxA1qDrV/JfUT4fCdDQlQBUi6HIsmphDWm?= =?iso-8859-1?q?6QyscMRQw+snwd73en3rXr13V/KsLAcz5QbLT3CCmSXUYqJD4+5QAJRQ8VeZ?= =?iso-8859-1?q?eWMz/rVuYII8DKWBYrpVcooqqqE261qxi+ljnts7cKAF1mgRSqPOtETBwZN7?= =?iso-8859-1?q?THL9CK/ODkGfrJbyZaixrZPOPyOJWBovglxiBIdwGJiAvTyULr6h2dJbyDzV?= =?iso-8859-1?q?GCkaaUPR08sDglrrYMy1v5F7NYw6ehdtwSN998LQw8RxVky/Oru9CvRcKHKA?= =?iso-8859-1?q?qWTP793dltKEAsDdh43BE0ERX2gFRh99+CtsD1hml3WiT5A6r8WI/tdMmI7g?= =?iso-8859-1?q?EawJu3iCHf9Oo/t3k2QNPoQQOpd4/qbTDnQkNz875AVcC7UJmDm5ZLnwcOHq?= =?iso-8859-1?q?yEJqRlBJqCyJsD0914CeyEEZ19OfEF18M71g1aZ5o3GJD2slr3Qz/x8Xf1ra?= =?iso-8859-1?q?gIACtnmb/RJAAzvaX8mhoAWxpEu3K5EEOYEwE1+x9ne1o1bhUwFiAxC2Xh3g?= =?iso-8859-1?q?K6YZcAglNgDRuliZ31nQaH3odaF1j8uf1PVgMohQeqO8tAx2UYUj85ECbOft?= =?iso-8859-1?q?tPFSGUWT9u7AN0VK1bfOBezSoy6/KZNFamXJyFJKESFH8HUoxVlDxItyJLF+?= =?iso-8859-1?q?CZE2K8dHMPo04fCbsc/r+d6JHupZIx1el09ecyTtljpEmYjXA/1u40sBseKo?= =?iso-8859-1?q?R?= 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: 40f7a02d-de75-46a7-1252-08d970d2daea X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Sep 2021 01:08:36.6647 (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: Eb0xDhDjOxQuLQGYKloOGz+FCrZFsztyN2D9nr61ffsuhSqiW2A5Mc/xTXsMQAw1 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] The ret value might be -EBUSY, caller will think lru lock is still locked but actually NOT. So return -ENOSPC instead. Otherwise we hit list corruption. ttm_bo_cleanup_refs might fail too if BO is not idle. If we return 0, caller(ttm_tt_populate -> ttm_global_swapout ->ttm_device_swapout) will be stuck as we actually did not free any BO memory. This usually happens when the fence is not signaled for a long time. Signed-off-by: xinhui pan Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 1fedd0eb67ba..f1367107925b 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1159,9 +1159,9 @@ int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx, } if (bo->deleted) { - ttm_bo_cleanup_refs(bo, false, false, locked); + ret = ttm_bo_cleanup_refs(bo, false, false, locked); ttm_bo_put(bo); - return 0; + return ret == -EBUSY ? -ENOSPC : ret; } ttm_bo_move_to_pinned(bo); @@ -1215,7 +1215,7 @@ int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx, if (locked) dma_resv_unlock(bo->base.resv); ttm_bo_put(bo); - return ret; + return ret == -EBUSY ? -ENOSPC : ret; } void ttm_bo_tt_destroy(struct ttm_buffer_object *bo) 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?= =?eucgb2312_cn?b?OHA5aUFSa25jOVRlUzJoUFZXMkFXZU1LVVhBbS9JQXkwKzRSTm5wVlpjQ2VTNjc0?= =?eucgb2312_cn?b?RUc4Vm4yRTRDb2kxbU52QTNadWdTMUpSR1RrQ3JtQ1pTOVVTNE56SkkyWUZENEov?= =?eucgb2312_cn?b?aXRoWW5OYWdQbXhWUzhIbkJGOEJJZitMREVCS29yQjNDK0JwMzJlQTVsd2VBbnVp?= =?eucgb2312_cn?b?Vkg3a0w3S056NE1OM0ZQbkN0OXcrWkFKRWFNU2JqY2JLUCthUEhSSWxKYXNybWpL?= =?eucgb2312_cn?b?SnpIcUJDdFJHMEJJU2ZSTWZHYVc3WFR2bUNUbHYzWmJxSGJ0WWVYaTZIYUtqTlY0?= =?eucgb2312_cn?b?L0IwTEd5TW1EdjRPbndiR016S1U5eGptakJnUjByQ0FrUkE0NWF5SzgxN0xaRTFm?= =?eucgb2312_cn?b?Unp1VHQ1Y1ZQcUJPdHU0OWZ6OVplbmhoSXhBRS9jNHk4UGJrbVpPQlRCeDRqSWlM?= =?eucgb2312_cn?b?RVYxZVFqa0NVeGNOazM5aVR0S2RBa0JTc2M2TzJyVjZpa2QzZkZOZmxYWERLYk9C?= =?eucgb2312_cn?b?UEFkcnFkaGQwSXh5WTVVQXl2UVNTZEtsMWNZZ3ExUDAwblp6QXZ3UjdPeFVzd3I1?= =?eucgb2312_cn?b?eUVmU1cxeXJJZlI1Szl3eXBvbmgzZ2x4bW5icTE3OU5TT1NsRURsUzU0blZuYmNR?= =?eucgb2312_cn?b?cWRZdkRCdExRYnRrQ3pubDBLRXhVVnBndUkvWEVZYktZWkhid21Mc2dRSkh0OUkv?= =?eucgb2312_cn?b?dDZKMTBxTVJOY3M0R0JGUVNRWTJSYnRPSUNIL3NlaUhXaUhwdmVVOFRhZ1d1Q2J2?= =?eucgb2312_cn?b?eVBCWkcwRzVWZmcvVWlNUGt0MmloVWpvRks4VDgrTFpldHVJUFVMSlhZOXc3akpQ?= =?eucgb2312_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;