From patchwork Fri Sep 20 09:06:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Eric Pelloux-Prayer X-Patchwork-Id: 13808396 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3B1EDCF58F5 for ; Fri, 20 Sep 2024 09:10:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 07BB010E7DE; Fri, 20 Sep 2024 09:09:59 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="izCI2CRp"; dkim-atps=neutral Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2046.outbound.protection.outlook.com [40.107.93.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id 968A210E2E3; Fri, 20 Sep 2024 09:09:57 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jG//0Fctdj9jINkJ/yHDF/P+aQMwRLyo2pr4kqUmlBzPeyvok3NswJszq3BNqrReGge+zPnFRC/q6JYk2+dGMLA9aAnVePs7+0cjol9dSMckxPjUG5PwJHBDm5pdexPcqzTJIhgTSp6OdUpzLCoTgiz+1rBV62ASrj9b5mzgj4ICFZYVC2N0JGsaOtRgfPC2W4vSw7udkKp5EkqMXywBoG86XgeRYyHZhhFFfKqVL4Rr6iUnkwyS9Ak96zSNBsMgDuwlxI+tgY6UsngKN5N38PFy+5S6LJmgBNdO9M7OvELVPo0/tINFhb8PJRRISPmL8vZootz2qntPhdO8MpEdHQ== 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=ezoH+MTd0WcFgsGusw1CRIXDb3cWHXWRK+stFd5C3wg=; b=lBZjiddQxMjH/bFHZyi1SDfQdnKkpKPPB8VoSbkMg4jYwUsGbSZpn7RgphOvAUt3Gz8pNEeUSCJyjfnTDzDxIpEbcn+AMDSrcndVSlXLPgbLsTAcsgC6Iskjs+yC9uNBAg9TJoFPTBOyIl1MA4LeWKPGpZEAc5J3qhLN/C8wwODZHYBb6JEUka2/MhDYbFNtvgTPQretV474HkPxiVfiyJB2qkD7qsKd0OK6ZF/h3gHlHq9oeFdG6RGiiFuHRR47J1fyp/trMz6DeM94jO010afw4xX7LJmA5qjO7C2ol1S5q68FAFuIw9Ay6lQNLhIwyOE+aPM5FTJYysRZQz/j7A== 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=ezoH+MTd0WcFgsGusw1CRIXDb3cWHXWRK+stFd5C3wg=; b=izCI2CRppvJJdORuSJ2YAp+j21w6q6H0M+PtzJHmx+TvTMjsItV1iOnCqfRh0Jc31AJoqT/Xn+Xj3ZP6YJ7DcnSNipamn8fn2Dkxorr5mmL59HsudCoEeDstUPSCm80JMDfIZEkMQjOEwJ3QXpF7RhaRg/GZuEV5AJB0t27DE2k= Received: from CH2PR14CA0004.namprd14.prod.outlook.com (2603:10b6:610:60::14) by SA3PR12MB8809.namprd12.prod.outlook.com (2603:10b6:806:31f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.27; Fri, 20 Sep 2024 09:09:54 +0000 Received: from DS3PEPF000099DA.namprd04.prod.outlook.com (2603:10b6:610:60:cafe::68) by CH2PR14CA0004.outlook.office365.com (2603:10b6:610:60::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Fri, 20 Sep 2024 09:09:53 +0000 X-MS-Exchange-Authentication-Results: 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=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS3PEPF000099DA.mail.protection.outlook.com (10.167.17.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Fri, 20 Sep 2024 09:09:53 +0000 Received: from patedamande.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 20 Sep 2024 04:09:50 -0500 From: Pierre-Eric Pelloux-Prayer To: , , , , , , CC: Pierre-Eric Pelloux-Prayer Subject: [PATCH v3 0/6] DRM_SET_NAME ioctl Date: Fri, 20 Sep 2024 11:06:42 +0200 Message-ID: <20240920090920.1342694-1-pierre-eric.pelloux-prayer@amd.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099DA:EE_|SA3PR12MB8809:EE_ X-MS-Office365-Filtering-Correlation-Id: b3230c0a-b294-4df1-8a11-08dcd953fd26 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?xtB+YSqEEMAc/FoK+3b2HetYonW/smY?= =?utf-8?q?1VUzzA8qoVQ30ry0uucH/CzkD3O8pg9BqohiZtnJvk5BC5ofBQhqmn4Tg7lrapRQh?= =?utf-8?q?dL0DUy/oOlqiMlzYmGc0wldGX3c/9sMety6CGszj7174V1WHgXe7ymb6/TzqiNB0E?= =?utf-8?q?JlZUTgHqCVscNE/74Jj4hIlGaHb79Xk9u7ngp5puZV4mh7D+gHAY4l+rKKu6xIPwA?= =?utf-8?q?8DbU+4+P63hub6/eYlEesqTKi+uq0+i6Ia2JONRBU+kMTbmcdqDQnzcuVFBIttbmY?= =?utf-8?q?yiFQhE220t0NuJXajL8Aw0n3CXwBLzkdxTlPG3HXiMyv8bccrhi+c81dJABE6xQmS?= =?utf-8?q?Vh8Hy4YDJ/wOlt1oG1cukYroJe581D8YASqnkxjVtprZr+WSDOHQWmU+4YB7hFcoz?= =?utf-8?q?ICsXxXck45kw10MpU++n3AW3SF9aRtUd83iADenHgggGKjkxNzHiNjtIuvUcD5RqY?= =?utf-8?q?GxepHGNF6jqfc90SA9ctJ5JfwYPFplbCf2OW1ZUhgdTH2ax4J7hjyNVdzEb8f4y61?= =?utf-8?q?4K21xfwbtp9M9vEDXMahbtxgh2AHV84plqXkbLUdgnEUrP8a8IoOLF5BAXqJ/wtvI?= =?utf-8?q?FT15Y/ADexHp9ekn2pyZ17gukgoDIYb2Lwg3rSoNzBiTBQSDV9XxCwEItrqsddGdP?= =?utf-8?q?IT5AztOygIEUrDPRgRaHDkZLY2UwKbD8pTKM5NX/RhQS/4sgGruxgy8/gugfkD4pq?= =?utf-8?q?BM4EZtBsxBoFX5FOMcby6aGPaIO8kBSiSntbFQJx+0R+jSuOLVhdV7VMeCCfHXmUg?= =?utf-8?q?8J0pLobZlm84cDbiK1GwW3ASkP068WMof1TmdtlXCUuvkTjj8ZAiEejNvzwOzkc0D?= =?utf-8?q?RUk6NfcQ9E6pX0ys650XsiHCvqUc3Frr4Tw9q08YXlLjSAnwEigaCb/czMBKW4YZM?= =?utf-8?q?QE+5xY3kzTfAqVbMwgRXBq+Uo+pdZWnWnLSCi+krwhfYbL4TdSKFNmJ7DjmYod16S?= =?utf-8?q?vHijTY8pDWuOCmORoRKWqtm6aGu9R24hhqoRrT2ukFeR8pvTzztA63fy2gnSr7fzd?= =?utf-8?q?hRu0shlpDbX8jO/b//zgSdij/uHeFE1ontDmK97UYEEQ71mTX7u0X92oBIows/TW8?= =?utf-8?q?nS7uVQFY+FFOBsqbW32FMYo0mIlHgbU8KGPQz8tPQwZGLcbCIwr+WhnYH+IbQ8Q5Z?= =?utf-8?q?tHH020Nucf1jSV4bhb51AMp8Et9ipnyJH1T60kHrfgb0X1xg4aMj0RlFu2WRg9Kdb?= =?utf-8?q?+ue0nGZKOJp0t4DVajASgFKIcPDsvjY5xFZ7Y6Gc8PU1bebs0roVvqjQB0M3zwBLJ?= =?utf-8?q?eoai+9tTQBdRoNeWGSMMlnSZvUqHKaoE0hvwDJ5p1pwaPr4kBVauA9B6WHueIgDz5?= =?utf-8?q?yxdg9Qckr9pCSon8z6ZQgxX/zQ5tNZrIC9Sjz9uKYAH5jf69BMbEEA5rvDoZvncyM?= =?utf-8?q?y/nTiCc8f+5?= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(36860700013)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2024 09:09:53.1504 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b3230c0a-b294-4df1-8a11-08dcd953fd26 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=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099DA.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB8809 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" v3 changelog: * Added DRM_NAME_MAX_LEN instead of using NAME_MAX * Fixed Tvrtko & Christian comments on patch 1 * Added R-b tags to patch 2 * Following Christian' suggestion patch 3 became 4 patches: - amdgpu_task_info::process_name is now a flexible array - amdgpu_vm::task_info is allocated on first submit - amdgpu_task_info::process_name was renamed process_desc, and includes drm_file::name when set. Like task_info allocation this is done only once. Pierre-Eric Pelloux-Prayer (6): drm: add DRM_SET_NAME ioctl drm: use drm_file name in fdinfo drm/amdgpu: delay the use of amdgpu_vm_set_task_info drm/amdgpu: alloc and init vm::task_info from first submit drm/amdgpu: make process_name a flexible array drm/amdgpu: use drm_file::name in task_info::process_desc Documentation/gpu/drm-usage-stats.rst | 5 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 + .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 48 +++++++++++++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 4 +- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 3 ++ drivers/gpu/drm/drm_debugfs.c | 12 +++-- drivers/gpu/drm/drm_file.c | 10 ++++ drivers/gpu/drm/drm_ioctl.c | 48 +++++++++++++++++++ include/drm/drm_file.h | 9 ++++ include/uapi/drm/drm.h | 17 +++++++ 23 files changed, 159 insertions(+), 31 deletions(-)