Message ID | 20210415012337.1755-27-Felix.Kuehling@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=a5Rl=JM=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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,URIBL_BLOCKED, 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 5CF69C43461 for <dri-devel@archiver.kernel.org>; Thu, 15 Apr 2021 01:25:13 +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 2733361155 for <dri-devel@archiver.kernel.org>; Thu, 15 Apr 2021 01:25:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2733361155 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 3502B6E9BF; Thu, 15 Apr 2021 01:24:27 +0000 (UTC) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2088.outbound.protection.outlook.com [40.107.93.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 98B726E9AF; Thu, 15 Apr 2021 01:24:08 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HLH5oxkpt7lDNy+xRnBUbFTZzE1rpQq5FTecW9YSPhxb6nQYusncL31Zi75Sf4cTCP2SGIP+AEkerUSwGTy51Ksp3q3RRDdl+LmoasFwlSIpLToQcm/QHg9SVNzkcrkxtqJ/Il2kAdSF8ekUll7XvNe3byCaYKyIQIMo4bKxDnL4pgMfktA/wRLvHAeu06RXOrzilYHyiUkaBZYyUK5JFx/LKZab1jdJZ7HBrKrcKCWCsQuwiayQBlkvWt89GCG/kfYVYJt8ZlQO/GDBNUVtjPQ/xphYJ/bNIVvEvlYM5Ep0p+i4GqNKHFaNldbjmqMf98tArtseFNu2FBK4jHmWdw== 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=uxoTWaG+E8CqwGyWXn1CMW3AAEwxV3ZJtfBRmM3ttVw=; b=C9gLq5cVRlq5F26RNMxpkOXukLb8nGKh8fDXC63S0Jl/QqWsijB1mvEeULmuaPhMdOzBHBSzJX+kzEtrdYg6UJt53dEUgJPkWnBvnM1MixANgWs9U3pgpePyD3vNsHMBW+lZ9TlVA1Dpc+LxMKPVALJYrTT+P43pp0YRXO3DBE6D0JvRdNm2A+fDfHZiao/2O3V5hfXPPZ5Su90eevvJ7a0UZL4QoO3x0K7oS745pnkdbRabownbVVKf2VRcm6g17OAPrMbX3mP9uwkvRG3PLlLMdpi6hCtDsfap/60dsX9tHq0JgWyzmRBEt/6U4c1GKbTJb+yZu+as2bcSHBhCXw== 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=uxoTWaG+E8CqwGyWXn1CMW3AAEwxV3ZJtfBRmM3ttVw=; b=Bp/FSg11aLIm9rkrtTK5NeF+TYf4jsjUxs/CRToBl+DoQ4C9QHtsxTTalovvtEL7fBr1N2RKn6yjYvnw5erfTr9FgO43KSrdKuJRP5eCS2h0XkTc/B0ppmbAjQg7i3qP4LBsja+tLF5NkV+L/KWQIKwZWc6AsNn7A4sDoKXDgwI= 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 BL0PR12MB4948.namprd12.prod.outlook.com (2603:10b6:208:1cc::20) by MN2PR12MB4208.namprd12.prod.outlook.com (2603:10b6:208:1d0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 01:24:07 +0000 Received: from BL0PR12MB4948.namprd12.prod.outlook.com ([fe80::70f5:99ed:65a1:c033]) by BL0PR12MB4948.namprd12.prod.outlook.com ([fe80::70f5:99ed:65a1:c033%7]) with mapi id 15.20.3933.040; Thu, 15 Apr 2021 01:24:07 +0000 From: Felix Kuehling <Felix.Kuehling@amd.com> To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 26/34] drm/amdgpu: add param bit flag to create SVM BOs Date: Wed, 14 Apr 2021 21:23:29 -0400 Message-Id: <20210415012337.1755-27-Felix.Kuehling@amd.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210415012337.1755-1-Felix.Kuehling@amd.com> References: <20210415012337.1755-1-Felix.Kuehling@amd.com> X-Originating-IP: [165.204.55.251] X-ClientProxiedBy: YTOPR0101CA0035.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:15::48) To BL0PR12MB4948.namprd12.prod.outlook.com (2603:10b6:208:1cc::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from Harpoon.amd.com (165.204.55.251) by YTOPR0101CA0035.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:15::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.21 via Frontend Transport; Thu, 15 Apr 2021 01:24:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9dfac781-b138-419c-ed6c-08d8ffad29f6 X-MS-TrafficTypeDiagnostic: MN2PR12MB4208: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <MN2PR12MB4208001005D0D7506627134F924D9@MN2PR12MB4208.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: Zytc/uiRMxq3dGyr4QULyxiChMELJc1jigaSTA+0QO1kgQWz0GWtG1wJ6WL6vClRLxeoctmUaUubulczYbP+6n1HxXLQS6kQ/mUo/rR2cOATIPnw2zWXDbAOF47x2vHjS+8U1xJK6Tdt2J5+kBZC2rvUniMaDKwP8GB9e0JTeG82YdeS8bxSsCAvIlhsLuuCeczYq+xhe9wtAPqv/G5aLP8QP8GlABH/SwQscBKFl2ry5WfWxBFoQZpyassHerW17pSfj1f7PHOylyxDWMbhjUp0LXWezi8pdGFv0JAYQEPKaDWq5ilGHGdEsiooFA9jRHPNvwWxZLirpb7QWUk3I+NrGIPzr2C0V0re5+w+VEYsr4f0X5zrSNrUhfsmCvcIWZzQlCW/dKU9cwYB+xz/PSzf9GRZZ0xhtroYFmhCuR0y33SuMMsIlqkaCvI/nVFpL8yQqXuX0rYwi/XxK1yLoqrYRjF3t20Ofg6UbC1jJri1+tavggfuNou2P0Efuc8tXrjmTe+4RMEomGLRCle+gVDFBIlCrTOn+a/8Jn5STtEs/qvybhicR39Dyhdkn64Xnarch/QhpME47mA5Fr0wwZ+YqAYocb0OW2GZwpVO1jucwspdioveK72+XFbZtSfWOF0oy9RmaYANsFB2ZxKcJr4Vm5jdPjT0Q0uLtXp5/i0= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR12MB4948.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(376002)(136003)(396003)(346002)(2906002)(8936002)(83380400001)(66556008)(8676002)(66946007)(38100700002)(186003)(86362001)(6666004)(2616005)(956004)(38350700002)(5660300002)(66476007)(7696005)(6486002)(52116002)(16526019)(36756003)(450100002)(478600001)(4326008)(1076003)(316002)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: i8EgqBiWfg/A/O/SA+g8dcN7HadB4Tok+LytNQZusxt1nLWo1eWkaX9X9YQxX980An7i/SSI2Zn+ftsbXIN1+ZO1fuDPifkpILUSZtV11XFD0quz6BAfgjtHqUWP/5F1ZabNx+7fspyZ5M0kgWyttXr7sCkZS4XFVkK7f5jQh//JD3IBOMY4mRgWtpthdNgrHAIcChtccw0ai9kpEFjlkCY5t36jGEvcmIV1HIWk+esSptqru08WbRsjg6A3xc26KaPPFBCojQ0bWf08ilDxJuUmdchbU9h47XzIiNvwKgGwUtVgtZjwP0QGIGUjKScSnRqFZnq1EicvLv7EV1OtPRpc8SQATIlkhkMsAAlQAo1eca6RFkGyNGHpMRcCOiZeCrDHL4yQY0b9z/7CzPjHQzrOPI3x6mXYISD4aocXolznZFDJT+2e08llCmh9plYtg4bCV4BOqyhP8NbkrCkUncq75Jv4pwGazBwq2cs75sNeTD9bpOAzBqob+dwovbE6YBAHPFfjGj/Zz/3uvA/tPXjxgmLsc8Pr8wH55l/iJvzsxX6hdDm6GdYPImYLOkjC6hT1BDGCmN9xNMGWrFLHNOeFybYIKMDcnMqeouxs60HcAKEQt5eH+tPOFeV82EYHeLZKKR30DHpMbXimk2DqniruAuHf/zC20SlYXPqn9IXPtdgDEBcRNlnpaHqikmJvKlcpC9iuUYJUPQakDj2V8NVZ67oEhPcJWeaaKwN7lm2R2KRK/x9X6W/lB0aS8oiYGpyryrAukk4gKSm8rvwtiRsq4KG7OaipU70seEOtiHNTUsRu2Q61ytwuKd2ZR1QSg8lEDgwuULpVxg4Olp+vOQ7lGpmXyAyIRfBVmflzJydRfJiOVn4PohZq0qUu3+WB/vJt5gJSf0Br2vKaFkFE7xn7TTkxgYCPFDc0sEUwvmrXfhEhkV5nktRdkYkh3/t+ZyDb7rg6TY9Snf8qmk2Ng8ZytwT5xjhFrJRh56aRXKpsmMq7DP/rXfn+mZvBi2B1oZySMMJ1LsLaET3L+1hZ+gwzzUd5/SpL/K+a7pdtYWCrNa03eRqHMvQpna0fHgE2HfJ+ho0xAUQAAG7g9b7s36kJPbjO3+mJU2gH9Kn3UCyGLkssMx831E7lQ11OLz5zN/JGrlXVA9VJQtuvriHuDON6A3B7wsO2L6DjtHVsNVm8Z98gZnHCtct7OEvULt03Y0ezuo9JQxqHE2m8z/UZLON/f/EWZCgVq+4qwASEPjx9WSR6q7DT7glJU+lrEUmZpaJ63nLx1AcpV9HXWqbf5i/36X1KdLh21Zsj15ounBi5p+wJ1qm8A7svW5WColwL X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9dfac781-b138-419c-ed6c-08d8ffad29f6 X-MS-Exchange-CrossTenant-AuthSource: BL0PR12MB4948.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2021 01:24:07.2842 (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: iH1lc5CvDd4J/T2EkVvMz13uahU9Zn1LgiZ0VPhTimNrT194Htd4x/y/JiF4cs2HSmSLN9CA+4WXU/Nc8XNpPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4208 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: Alex Sierra <alex.sierra@amd.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
Add HMM-based SVM memory manager to KFD v5
|
expand
|
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index eef17986d6fa..065735f40331 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c @@ -33,9 +33,6 @@ #include <uapi/linux/kfd_ioctl.h> #include "amdgpu_xgmi.h" -/* BO flag to indicate a KFD userptr BO */ -#define AMDGPU_AMDKFD_USERPTR_BO (1ULL << 63) - /* Userptr restore delay, just long enough to allow consecutive VM * changes to accumulate */ @@ -217,7 +214,7 @@ void amdgpu_amdkfd_unreserve_memory_limit(struct amdgpu_bo *bo) u32 domain = bo->preferred_domains; bool sg = (bo->preferred_domains == AMDGPU_GEM_DOMAIN_CPU); - if (bo->flags & AMDGPU_AMDKFD_USERPTR_BO) { + if (bo->flags & AMDGPU_AMDKFD_CREATE_USERPTR_BO) { domain = AMDGPU_GEM_DOMAIN_CPU; sg = false; } @@ -1275,7 +1272,7 @@ int amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu( bo->kfd_bo = *mem; (*mem)->bo = bo; if (user_addr) - bo->flags |= AMDGPU_AMDKFD_USERPTR_BO; + bo->flags |= AMDGPU_AMDKFD_CREATE_USERPTR_BO; (*mem)->va = va; (*mem)->domain = domain; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h index 2d1fefbe1e99..973c88bdf37b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h @@ -37,6 +37,10 @@ #define AMDGPU_BO_INVALID_OFFSET LONG_MAX #define AMDGPU_BO_MAX_PLACEMENTS 3 +/* BO flag to indicate a KFD userptr BO */ +#define AMDGPU_AMDKFD_CREATE_USERPTR_BO (1ULL << 63) +#define AMDGPU_AMDKFD_CREATE_SVM_BO (1ULL << 62) + #define to_amdgpu_bo_user(abo) container_of((abo), struct amdgpu_bo_user, bo) struct amdgpu_bo_param {