Message ID | 20210512142648.666476-16-andrey.grodzovsky@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=SYvv=KH=lists.freedesktop.org=dri-devel-bounces@kernel.org> 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=-18.7 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,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT 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 DAB83C433B4 for <dri-devel@archiver.kernel.org>; Wed, 12 May 2021 14:27:48 +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 8653E613E9 for <dri-devel@archiver.kernel.org>; Wed, 12 May 2021 14:27:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8653E613E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A791A6EC25; Wed, 12 May 2021 14:27:46 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2051.outbound.protection.outlook.com [40.107.223.51]) by gabe.freedesktop.org (Postfix) with ESMTPS id 033DA6EC21; Wed, 12 May 2021 14:27:43 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iKmbXIVIz740lvjNIQ0mLeWN2GULnqI0leMhUy8lsRkI/LG/26YZhEWHdN2ZoUIBsdS/MA1W4OqrSR4sKfuclcJZTe1NG0Dj1aLjK9QLnIFmcC8Su1+QBDLh7FWQvW2fjILOu8UjasOnMORDE9hs+thKEfLF24OV/TKxG1+foJNRycudfcjp856Rzx7Stnl+hhk1Gx4gdDMRRyGqOKDT6c006kkVHMOFJVVfc+SJops7mdBuBlAe60lcNXlmvFK8pEFvuRJDC9m/aDFBw1u0iNIEh/5jGMFSNV4oKMHviqPbsjghh00oyH7WiR+xg0lW8zzzvgc0KAQTlF9Xd0cPsg== 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:X-MS-Exchange-SenderADCheck; bh=y9T0dd+0o5MpTwVzYXgN4zXaKXsjwhA7tqNN2ODWw44=; b=fidbEuDx4TBBgumRdkQyuJ39qIL9bYt/jWC9R2WPoLxEdAHcSYlkBzWFjogHpVG9Cy6t0JemHnsQnXn9oCpqK28n2xs5Y3fAThM56eifh2PqfuQb/k3lGOf879nzVsafWr4HnSE0+GP3YssCLLcWFV0VGxM0lCWURCYLyowJiOCTvdQs8JEo7CeNWXGtbOLgEBwikrDw9c4K4d1avCJwp8ISCIMH85fT0DuwFJz/8K3hGuCo6NBD0xFcG7adZ+b1GlDa6W5d325rb5n0bNaIIM8dXw9UQqhv8IjAkjVhyWDA/pl3RmNhmeG3cVpcSbEr4o1YzrvKLfxMa2hqkML34Q== 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=y9T0dd+0o5MpTwVzYXgN4zXaKXsjwhA7tqNN2ODWw44=; b=GGGmrT9MA/Y1PBzi6advQiXfPOBzUgweUmn4Og6SbED6EiBSslkjNOJk24TFn0Dg8qOg7afWcfJv9VQsSj85ftKiFxsP8dSIGdnCfUj+SfmHYWZkUJUmiogKogztbIL/JBYUO807hBltX5U4FQnjeuyZSPE5Hw6VqFd14Q3ZuMk= Authentication-Results: lists.freedesktop.org; dkim=none (message not signed) header.d=none; lists.freedesktop.org; dmarc=none action=none header.from=amd.com; Received: from SN6PR12MB4623.namprd12.prod.outlook.com (2603:10b6:805:e9::17) by SN6PR12MB2655.namprd12.prod.outlook.com (2603:10b6:805:72::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.27; Wed, 12 May 2021 14:27:42 +0000 Received: from SN6PR12MB4623.namprd12.prod.outlook.com ([fe80::ad51:8c49:b171:856c]) by SN6PR12MB4623.namprd12.prod.outlook.com ([fe80::ad51:8c49:b171:856c%7]) with mapi id 15.20.4129.026; Wed, 12 May 2021 14:27:42 +0000 From: Andrey Grodzovsky <andrey.grodzovsky@amd.com> To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-pci@vger.kernel.org, ckoenig.leichtzumerken@gmail.com, daniel.vetter@ffwll.ch, Harry.Wentland@amd.com Subject: [PATCH v7 15/16] drm/amdgpu: Verify DMA opearations from device are done Date: Wed, 12 May 2021 10:26:47 -0400 Message-Id: <20210512142648.666476-16-andrey.grodzovsky@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210512142648.666476-1-andrey.grodzovsky@amd.com> References: <20210512142648.666476-1-andrey.grodzovsky@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Originating-IP: [2607:fea8:3edf:49b0:7576:4f76:97d8:1487] X-ClientProxiedBy: YTOPR0101CA0032.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:15::45) To SN6PR12MB4623.namprd12.prod.outlook.com (2603:10b6:805:e9::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from agrodzovsky-All-Series.hitronhub.home (2607:fea8:3edf:49b0:7576:4f76:97d8:1487) by YTOPR0101CA0032.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:15::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.30 via Frontend Transport; Wed, 12 May 2021 14:27:41 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e7fc7ee3-4694-4272-4a18-08d915521a45 X-MS-TrafficTypeDiagnostic: SN6PR12MB2655: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <SN6PR12MB26555D1675A633DC813BB726EA529@SN6PR12MB2655.namprd12.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 35aEVVycR3xugV1itAF2X1WDzwEQWf2grfqI+lMSpat1x1SJJa0NeWGgPlWyCPWIqTwiUzOyWQSEcqHLzcgmOcxZiqi9aqn7KM5lG71hpDt0ET6KWCEYVYnKu8hwgpgzfM3N6qWmPoBYhCD6q7SoTMfATg+Xq7w4JbRFMMLbeoKbB6EikH57yej6wkVIbbV3rNjJKjVjiKArMJjmE5veMO8TsBFwg43GkqKOqofvULv6gymvR/NGV0a6k0XOrZjeTHuEZG6rwv17TI1snI4P8J9IMRUWvAlLQ3pGOJ78dlyL4vaQW3qs7YXYPRN7tQLp/WJBwReWQCd3zaSqM3xaqJRqI3ZtDpWnfsTtcUrw94dRtdHuEYy09E9L6Sb9UMm7gdrTEqXkLVo/LN99MstQnnkn/BC6lCxUS8Bzoxxtd+1e6DKnpwPzfi5yVgEWmA6YwdyJEMr3ongdEmzK2R+WJzkQYHiBRHFMDd92/PGhjkQb1wrl3N/fihS91se4ngcPb1U4WfGiZbbthHP/XSiACDAQZWi47Q3ULLxWzmRQYbgJqQsSuzrU2jA10UX9zzznjhJm1/jSJF7f2TrQzRs2Q9LMESJPtYm2FIZPXaWfeJs= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR12MB4623.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(346002)(366004)(39860400002)(136003)(86362001)(316002)(186003)(16526019)(66476007)(1076003)(4744005)(6486002)(36756003)(52116002)(2906002)(5660300002)(8676002)(6636002)(478600001)(6512007)(38100700002)(54906003)(66556008)(66946007)(66574015)(4326008)(8936002)(6506007)(44832011)(15650500001)(2616005)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?cEEmD6wOze1Kgn0Nit88sO6bJrmkVl?= =?utf-8?q?wjWop82vYXpWQx/r7LgJyCZDEg/6xA0MRRTdpLIpDT7wPV0dsBCr4lwFzLX959DOu?= =?utf-8?q?r6+2IvKtGvsAHU9Y2o1DUZkc06vIYokmjh4sHUU5DPEHqj/WC+wHkVIXmD7eqb2uY?= =?utf-8?q?yxAT06+B2/ppyPGXma4bhLQwJSxfldt3/hbdZ5DDrFlNStjFFPRdHRohFInbcQvp6?= =?utf-8?q?xOf0XB2p37Dlqg6SemM6+OQCwJusrFkYvPyaxeELThyl7tIVHdRvGbeN1dCFWe891?= =?utf-8?q?AddV4gIusT/in3xkh7ZGhqPVSN+BIm1wdWqQcesvPAN4CnEbVbvSETtX5fI8TtoAO?= =?utf-8?q?6qJt9Yw5RCBsHch2I8QslrBosNiOH9uhy4srr7oVIoUF6oG4Jfbklr3FkwJBcInvo?= =?utf-8?q?XVw0AztWTCQJoFPVD6xVLTvvsOR85tLFegH7WFJUkrGE6nSXML/nNbOk3TD0zOs2o?= =?utf-8?q?z/crosJjn+ziSdhMJKAWxZZ4G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CrossTenant-Network-Message-Id: e7fc7ee3-4694-4272-4a18-08d915521a45 X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB4623.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2021 14:27:42.3854 (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: rsEIMopaMfYvp77SD6zSyECvOmb5s2/E/sryRK/pm2DIsy0hFkRp+WyHowgklbJw5i8h5WhZm5+P2SilLXQq5Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB2655 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: gregkh@linuxfoundation.org, Felix.Kuehling@amd.com, helgaas@kernel.org, Alexander.Deucher@amd.com, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com> Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
RFC Support hot device unplug in amdgpu
|
expand
|
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 83006f45b10b..5e6af9e0b7bf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -1314,7 +1314,13 @@ amdgpu_pci_remove(struct pci_dev *pdev) drm_dev_unplug(dev); amdgpu_driver_unload_kms(dev); + /* + * Flush any in flight DMA operations from device. + * Clear the Bus Master Enable bit and then wait on the PCIe Device + * StatusTransactions Pending bit. + */ pci_disable_device(pdev); + pci_wait_for_pending_transaction(pdev); } static void