Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9935606A322 for ; Fri, 4 Dec 2026 10:55:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=huPiSXEZ Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5E861112EAB; Fri, 4 Dec 2026 10:55:06 +0000 (UTC) Received: from CO1PR03CU002.outbound.protection.outlook.com (mail-westus2azon11010039.outbound.protection.outlook.com [52.101.46.39]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0D9B6112EAB for ; Fri, 4 Dec 2026 10:54:59 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=a/vgXOajZ9xySzPvbbPkMjMq8PPiX4JxrqBdCVozliMme6UnmrqRD/c2h8H1wKhgOOJ3QRLJte/WK4oIIVPyNk0kSunVQuLzS6mGnbCkJiKECrDgQR+uS+VaPwPxNqgaEgm8hz43DB4xuYuzbvMs8nKoHUW1JLfdTk+NhWCJOrVbwqY+B5dU5EZkOwO78AVbyI9vYE8GNltFzSaXjE2EUkE5YKDVoy3T7aWyBkr8KfnJe5sex1nUJmgYKKAeA+G/158WA4p4o6ALZUAqIiYTuQVZiJmQJcRgrn1Xj36oxSkXcGXZLoDyHV/+r3fs3svLT1PDa+a1RHRsGCBAv2ocDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+1BOp8/6Gnas7DNzp/pENACMFmdneCK21QmD/N9h5rU=; b=lnSzMZPI6iiPXB+6gT3z87qImP1se/usSBrQ7n5QMSH448WWcEQpxxsfOWJQi7HtxNvk1YwGWYEVgBuKS2d4xjfWrxTTXlNqnFAacms0DCR2iOX6pfvocA2eK86X4NF2QrX4RCQDu5NNzkMSfQYst8cTz3JkUajeBrzk6Tg+1Jux4FolrtJpzUcffqsRbpn37X/AvqWD1Klk4eq2zDdA+RpjXKjQB6aT4boWEZTUDeM4u1iWObEfzf4q213vHAABunf02BQU0V4OQmTw88S40aGAXG3OInuoKCiCdiyxWlnDz/vS/CooRgg8rvR84BcjLOjiYHhggyu5jbYYnyKoWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) 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=+1BOp8/6Gnas7DNzp/pENACMFmdneCK21QmD/N9h5rU=; b=huPiSXEZed1C8X9G6f6RLVg0/YVxP298EYMUNRqxDiYIH8JZp+jdizyvtELzbunfFn4Aoa0uynAQBkHqVbY/iaPuEl1rRxAdT+JLEHi/R8xpojqXYJmNh4flKoaFcR4Q9PdulVMiAoBRoEtuJT1W7KRDlv3Fcynkqz3QW4lviOs= Received: from MW4PR04CA0262.namprd04.prod.outlook.com (2603:10b6:303:88::27) by MW3PR12MB4458.namprd12.prod.outlook.com (2603:10b6:303:5d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Fri, 4 Dec 2026 10:54:55 +0000 Received: from SJ5PEPF000001E8.namprd05.prod.outlook.com (2603:10b6:303:88:cafe::24) by MW4PR04CA0262.outlook.office365.com (2603:10b6:303:88::27) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.13 via Frontend Transport; Fri, 4 Dec 2026 10:54:55 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb08.amd.com; pr=C Received: from satlexmb08.amd.com (165.204.84.17) by SJ5PEPF000001E8.mail.protection.outlook.com (10.167.242.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.709.6 via Frontend Transport; Fri, 4 Dec 2026 10:54:55 +0000 Received: from satlexmb07.amd.com (10.181.42.216) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Fri, 4 Dec 2026 04:54:54 -0600 Received: from br10-5-1-emily.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.57 via Frontend Transport; Fri, 4 Dec 2026 04:54:53 -0600 From: Emily Deng To: , , Subject: [RFC PATCH v1 17/34] drm/amd/sriov: add GMC 13.0.1 GPUIOV provider Date: Fri, 4 Dec 2026 18:54:52 +0800 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001E8:EE_|MW3PR12MB4458:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f36a214-b871-4f2d-e899-08df51f50811 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700016|376014|23010399003|82310400026|56012099006|261026121527099003|261021123027099003|261028144727099003|261022115727099003|10067099003|261022113327099003|261022075727099003|261022105027099003|261026140227099003|261021121427099003|261102123227099003|22082099003|18002099003|11063799006|261009223027099003|3023799007; X-Microsoft-Antispam-Message-Info: NT1am3Soc5aQsjIgiBUaS8uTG1Wuv8Zqg2NoOLvkIBNWuwHDgA4YEWd1ePbcRHl/AH17m2Iwy3rJT/2VEc2b8VlMtsRM2GenUnT6M7MO13/B8M7B4701uLaNGnILUl7L/NBOiJul4ibxpEqxVNvoswbn56F7N7lgKzmszpOjnn3zyDV1mcW2Wv+EcSounml6bkPH6KjKgr8oxEDjOWgJAJWIBd9Qy5899lBpvpmP+nRM3COBpIEVAf8M80IkIZbMcwE5ijVTbFY40xVz5V1/dXE2pPY8cJPhhdz/7fn8sGi4IecZXfLKFhNoHNfKjkxEGu8ke3HrMBE/zCW2lo1U2epIia5r5xU9N3V/nPvIKB6dDlT+8NHEU+vywb1hLvzkicX1VdGGqCq0kllqPI4hREgDzMcQbrfM64qiiuQDg+4ERgRWoOA4iiOuXPyCGYZNOGaLQOmlmmCuVjBNTZoyhNRWr1dtcchMU6kWsDlkmrhJCue6Z53axQFQ2FYtbl5a3YGNNvCLyWe2ZT3BtfEZ9VFTAIEl7d7r6rYauRkqxXUQOvU9YZ3bJaTDM0QHJWDuOmtuGs03mNKKeqLlGJs04ii3xIZgSfy7iyow4hmmh+0lqbB7EIEuOLQBYaXmSqKRIwDMwTom107rZVGbebEo4CBPD3G/IFMXIAO15ir/AH0Q9vyKvuNKAOunQcGtICDfcm5qYMwQSHUrZcUVKQOqyg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:satlexmb08.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(36860700016)(376014)(23010399003)(82310400026)(56012099006)(261026121527099003)(261021123027099003)(261028144727099003)(261022115727099003)(10067099003)(261022113327099003)(261022075727099003)(261022105027099003)(261026140227099003)(261021121427099003)(261102123227099003)(22082099003)(18002099003)(11063799006)(261009223027099003)(3023799007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6rw6+3Anw84SDKQXCs038WH/E9fxj8jhgJwkYXUAw7JrbN6lJJCfh5PkNU4M4YWUNBuBFadLle6V6BK3NHhx2/oRq3jWiqSGWWYMBV0OnC/axzVerXJpZrmQlxl23YLBrjKxO6dnG2MZX+QZ8SlG4a0GWsx2foqcao8Tx4QYdbDwVg0W4fJoAFolobY99UA8E4HlX3XqI1kpTcCw0s1PAK2xwoMFWiOGoY6gJXUjgbSyLl47VOB/7mJ1pLfo097/2VnEvniYwwuMZTOMcXdqfNsaJgEisfvqSEJLbps8Q0o56n5Xr6HSASafTAyPd1JqENouu9geMxcUDWc4eqSBc3yjvo1GiAQCV31iX73p4loNZm8cYzFF7wXuikGrhtU/zbigfkTzp2lZhao7NJb9hBdgC039pbyIEFhLL6gW0nuuH8I6b2YqxavehWPibLAe X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2026 10:54:55.3122 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9f36a214-b871-4f2d-e899-08df51f50811 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=[satlexmb08.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF000001E8.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4458 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "amd-gfx" X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Add the GMC GPUIOV backend for VF framebuffer assignment. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/sriov/Makefile | 1 + drivers/gpu/drm/amd/sriov/sriov.c | 16 +++++ drivers/gpu/drm/amd/sriov/sriov.h | 7 ++ drivers/gpu/drm/amd/sriov/sriov_gmc_v13_0.c | 77 +++++++++++++++++++++ drivers/gpu/drm/amd/sriov/sriov_gmc_v13_0.h | 32 +++++++++ drivers/gpu/drm/amd/sriov/sriov_gpuiov.c | 15 +++- 6 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/amd/sriov/sriov_gmc_v13_0.c create mode 100644 drivers/gpu/drm/amd/sriov/sriov_gmc_v13_0.h diff --git a/drivers/gpu/drm/amd/sriov/Makefile b/drivers/gpu/drm/amd/sriov/Makefile index b9339fd532de..80618807800a 100644 --- a/drivers/gpu/drm/amd/sriov/Makefile +++ b/drivers/gpu/drm/amd/sriov/Makefile @@ -29,3 +29,4 @@ AMD_SRIOV_FILES += ../sriov/sriov.o AMD_SRIOV_FILES += ../sriov/sriov_iovm.o AMD_SRIOV_FILES += ../sriov/sriov_gpuiov.o AMD_SRIOV_FILES += ../sriov/sriov_gfx_v13_0.o +AMD_SRIOV_FILES += ../sriov/sriov_gmc_v13_0.o diff --git a/drivers/gpu/drm/amd/sriov/sriov.c b/drivers/gpu/drm/amd/sriov/sriov.c index 8d2900730bad..9dc8bfe0cc96 100644 --- a/drivers/gpu/drm/amd/sriov/sriov.c +++ b/drivers/gpu/drm/amd/sriov/sriov.c @@ -28,6 +28,7 @@ #include "amdgpu_virt.h" #include "sriov.h" #include "sriov_gfx_v13_0.h" +#include "sriov_gmc_v13_0.h" #define SRIOV_PCI_SRIOV_CAP_VF_10BIT_TAG BIT(2) #define SRIOV_PCI_SRIOV_CTRL_VF_10BIT_TAG BIT(5) @@ -60,6 +61,17 @@ static int sriov_set_gfx_funcs(struct amdgpu_device *adev) } } +static int sriov_set_gmc_funcs(struct amdgpu_device *adev) +{ + switch (amdgpu_ip_version(adev, GC_HWIP, 0)) { + case IP_VERSION(13, 0, 1): + adev->sriov->gmc_funcs = &sriov_gmc_v13_0_funcs; + return 0; + default: + return -EOPNOTSUPP; + } +} + static int sriov_set_init_funcs(struct amdgpu_device *adev) { sriov_init_func_add(adev, &sriov_gpuiov_func); @@ -89,6 +101,10 @@ static int sriov_early_init(struct amdgpu_ip_block *ip_block) if (r) goto err_fini; + r = sriov_set_gmc_funcs(adev); + if (r) + goto err_fini; + r = sriov_set_init_funcs(adev); if (r) goto err_fini; diff --git a/drivers/gpu/drm/amd/sriov/sriov.h b/drivers/gpu/drm/amd/sriov/sriov.h index 3097bd287301..4455217fd054 100644 --- a/drivers/gpu/drm/amd/sriov/sriov.h +++ b/drivers/gpu/drm/amd/sriov/sriov.h @@ -65,6 +65,12 @@ struct sriov_gfx_funcs { unsigned int vf_idx); }; +struct sriov_gmc_funcs { + int (*gpuiov_set_vf_fb)(struct amdgpu_device *adev, + unsigned int vf_idx, u64 fb_offset, + u64 fb_size); +}; + #define SRIOV_MAX_INIT_FUNCS 16 #define SRIOV_VF_FB_ALIGNMENT SZ_16M @@ -74,6 +80,7 @@ struct sriov_gfx_funcs { struct amdgpu_sriov { struct amdgpu_device *adev; const struct sriov_gfx_funcs *gfx_funcs; + const struct sriov_gmc_funcs *gmc_funcs; u64 flags; struct sriov_gpuiov gpuiov; const struct sriov_init_func diff --git a/drivers/gpu/drm/amd/sriov/sriov_gmc_v13_0.c b/drivers/gpu/drm/amd/sriov/sriov_gmc_v13_0.c new file mode 100644 index 000000000000..b3ff2517e7b7 --- /dev/null +++ b/drivers/gpu/drm/amd/sriov/sriov_gmc_v13_0.c @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: MIT +/* + * Copyright 2026 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#include +#include + +#include "amdgpu.h" +#include "sriov.h" +#include "gc/gc_13_0_1_offset.h" +#include "mmhub/mmhub_5_0_1_offset.h" + +#define GMC_V13_0_GPUIOV_FB_GRANULARITY_MB 16 + +static int sriov_gmc_v13_0_gpuiov_set_vf_fb(struct amdgpu_device *adev, + unsigned int vf_idx, + u64 fb_offset, u64 fb_size) +{ + u64 fb_offset_mb; + u64 fb_size_mb; + u32 xcc_mask; + u32 aid_mask; + u32 data; + u32 reg; + int i; + + if (vf_idx >= adev->num_vfs) + return -EINVAL; + + fb_offset_mb = div64_u64(fb_offset, (u64)SZ_1M); + fb_size_mb = div64_u64(fb_size, (u64)SZ_1M); + if (!IS_ALIGNED(fb_offset_mb, (u64)GMC_V13_0_GPUIOV_FB_GRANULARITY_MB) || + !IS_ALIGNED(fb_size_mb, (u64)GMC_V13_0_GPUIOV_FB_GRANULARITY_MB) || + fb_offset_mb > U32_MAX || fb_size_mb > U32_MAX) + return -ERANGE; + + data = ((u32)fb_size_mb >> 4) | (((u32)fb_offset_mb >> 4) << 16); + xcc_mask = adev->gfx.xcc_mask ? adev->gfx.xcc_mask : 1; + aid_mask = adev->aid_mask ? adev->aid_mask : 1; + + for_each_inst(i, xcc_mask) { + reg = SOC15_REG_OFFSET(GC, GET_INST(GC, i), + regGCMC_VM_FB_SIZE_OFFSET_VF0) + vf_idx; + WREG32(reg, data); + } + for_each_inst(i, aid_mask) { + reg = SOC15_REG_OFFSET(MMHUB, i, regMMMC_VM_FB_SIZE_OFFSET_VF0) + + vf_idx; + WREG32(reg, data); + } + + return 0; +} + +const struct sriov_gmc_funcs sriov_gmc_v13_0_funcs = { + .gpuiov_set_vf_fb = sriov_gmc_v13_0_gpuiov_set_vf_fb, +}; diff --git a/drivers/gpu/drm/amd/sriov/sriov_gmc_v13_0.h b/drivers/gpu/drm/amd/sriov/sriov_gmc_v13_0.h new file mode 100644 index 000000000000..a5f770d4cf69 --- /dev/null +++ b/drivers/gpu/drm/amd/sriov/sriov_gmc_v13_0.h @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright 2026 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef __SRIOV_GMC_V13_0_H__ +#define __SRIOV_GMC_V13_0_H__ + +#include "sriov.h" + +extern const struct sriov_gmc_funcs sriov_gmc_v13_0_funcs; + +#endif diff --git a/drivers/gpu/drm/amd/sriov/sriov_gpuiov.c b/drivers/gpu/drm/amd/sriov/sriov_gpuiov.c index 76c689e360df..58ae9a51bbc7 100644 --- a/drivers/gpu/drm/amd/sriov/sriov_gpuiov.c +++ b/drivers/gpu/drm/amd/sriov/sriov_gpuiov.c @@ -335,7 +335,20 @@ int sriov_gpuiov_set_vf_fb(struct amdgpu_device *adev, unsigned int vf_idx, u64 fb_offset, u64 fb_size) { - return -EOPNOTSUPP; + if (!adev->sriov->gpuiov.hw_init) + return -EINVAL; + if (vf_idx >= adev->num_vfs) + return -EINVAL; + if (!IS_ALIGNED(fb_offset, (u64)SRIOV_VF_FB_ALIGNMENT) || + !IS_ALIGNED(fb_size, (u64)SRIOV_VF_FB_ALIGNMENT)) + return -EINVAL; + + if (!adev->sriov->gmc_funcs || + !adev->sriov->gmc_funcs->gpuiov_set_vf_fb) + return -EOPNOTSUPP; + + return adev->sriov->gmc_funcs->gpuiov_set_vf_fb(adev, vf_idx, + fb_offset, fb_size); } bool sriov_gpuiov_is_cmd_complete(struct amdgpu_device *adev, -- 2.34.1