Message ID | 20241003124506.470931-3-pierre-eric.pelloux-prayer@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> 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 04BCBCF34A4 for <dri-devel@archiver.kernel.org>; Thu, 3 Oct 2024 12:45:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7AC1510E832; Thu, 3 Oct 2024 12:45:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="mkaiZE1a"; dkim-atps=neutral Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2075.outbound.protection.outlook.com [40.107.94.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2F55B10E832; Thu, 3 Oct 2024 12:45:45 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=G5nUOloyKY/jZKxDIhEl3+3zW/oNeVA/aF88xZ2zD7GkES3as74UlC0Lr76dxR2MqqPX3zXzSbw9szbMBPFwUL41Z71JacMthrCA02gYtJYOSdbFIX18LElip6PiYjqbhUaoF0SpqaJlHpBMtkMPtp1NDrHBcA16gO63NR1kHkBJa3vwyoEKkdc17XExoJ4wGBtjB0FsiP9KCVmb7FYKRY56QH4xPogZy8Q8TVsPBtATpf6kL99LcwfGANvmoXtqcXtmj+Nm5auwHRyAQ+WSZjM3iAsuSRuaXnzT/4Cc3sA91Y3v7Xy9J7vj4H8HSTqHmBght49jNsRniYjf8JCi+Q== 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=9f+kHca6uPX+a7qhLf96OaSWInnJjf7xkV4/At6HyT8=; b=JxMp8TxKBCPeMwYqX7UCYmFR95dvH0PoMhAxZvhhVp+XZ29q3nGbAlxevsKeFuo/F46GBZ5ifvtITnW9BC2OH/WYZPMSA4ZGZzZq6hOYksf5IZODLA0J8ih9EDPv20nSf1ILLbpd01GfZlJJYCUeBTsfurq50WEWCgEIedtjGfaUHVWlgNrRSBpCytAwg0OceP8R3QTe17znjfbh41b278MoZ1CNJmHf1PYext6Avyda+Ibt1RoZI3oNMKKtspyYQVmEz/kDdRaY6rJSllhD0cN6FMu4cHncidRb2iqItfBAuK+8mhD4R9raeYFbwVnJ7NYyKphW3XQs5QdNMGqBjQ== 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=9f+kHca6uPX+a7qhLf96OaSWInnJjf7xkV4/At6HyT8=; b=mkaiZE1aSRcUu8lsTNFi6CTaaVN0YBttUByRWZgZJjyIHGUgTx61tP7Fc7kc9ClRUbkvBUVx7cHsRDEAqJ9i3iLNJVh7wD9dOhDgqi5klYeKbXK2kd/NDU/Trj6DwtKbhBMI/ZGH1vTsxyg/rw21rS/YhZBNdnTFUNSwxb5AB78= Received: from SN4PR0501CA0021.namprd05.prod.outlook.com (2603:10b6:803:40::34) by SN7PR12MB6886.namprd12.prod.outlook.com (2603:10b6:806:262::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.16; Thu, 3 Oct 2024 12:45:39 +0000 Received: from SA2PEPF00003F68.namprd04.prod.outlook.com (2603:10b6:803:40:cafe::85) by SN4PR0501CA0021.outlook.office365.com (2603:10b6:803:40::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.16 via Frontend Transport; Thu, 3 Oct 2024 12:45:39 +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 SA2PEPF00003F68.mail.protection.outlook.com (10.167.248.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8026.11 via Frontend Transport; Thu, 3 Oct 2024 12:45:39 +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; Thu, 3 Oct 2024 07:45:36 -0500 From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> To: <dri-devel@lists.freedesktop.org>, <amd-gfx@lists.freedesktop.org>, <dmitry.osipenko@collabora.com>, <jani.nikula@linux.intel.com>, <christian.koenig@amd.com>, <tursulin@igalia.com>, <simona.vetter@ffwll.ch>, <robdclark@gmail.com>, <alexander.deucher@amd.com> CC: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>, "Tvrtko Ursulin" <tvrtko.ursulin@igalia.com> Subject: [PATCH v5 2/6] drm: use drm_file client_name in fdinfo Date: Thu, 3 Oct 2024 14:43:10 +0200 Message-ID: <20241003124506.470931-3-pierre-eric.pelloux-prayer@amd.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241003124506.470931-1-pierre-eric.pelloux-prayer@amd.com> References: <20241003124506.470931-1-pierre-eric.pelloux-prayer@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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: SA2PEPF00003F68:EE_|SN7PR12MB6886:EE_ X-MS-Office365-Filtering-Correlation-Id: 37efc26b-75d6-45eb-4a16-08dce3a94935 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?q?8yLeAOivkzo60bozn1Wox0Ksi9htsHP?= =?utf-8?q?hb8ii6ybJjmk/ENS4sVpeRXH1CRDO96a4pOJN+GjQIIqWfjUDuzilytsVv/wNZRXZ?= =?utf-8?q?ux3rw+fDUAt7PNqH0RS3eWrdWM5WUqhYJJ4cchy3TERLuMOCsVnQcQ9km3E2AeAok?= =?utf-8?q?c5k1d/BhXq9Bj/xYdlC4JmPTqk71zotF22nKQqyu+ZOUmXsvy2l6sSC3/kG7uK+EO?= =?utf-8?q?qGGIA79/lFif/V0wdNKbwBNHWukPKa5kRf60tQDVu+tbaz5IsFYo+2R3eJsF0NwCV?= =?utf-8?q?DWW+C3daE5zBB3SxVrCfJ3Q/sEEV9ZFOn6XXQ+V1EUk8TD5867HqopF29Fa3r+zGu?= =?utf-8?q?XYdGN0x9NXC6sTxGqDDo95czNU0mtBio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8E1gM3xoO0cJc7q?= =?utf-8?q?/Q8L8hF4U96+Md0HW7LxrPObtRdz1lPLm13MNiLf7FjRuuBtkRwrDzpF5Mxf2ysY0?= =?utf-8?q?5jcfR3SLIElZ?= 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)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2024 12:45:39.6193 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 37efc26b-75d6-45eb-4a16-08dce3a94935 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: SA2PEPF00003F68.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6886 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> Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
DRM_SET_CLIENT_NAME ioctl
|
expand
|
diff --git a/Documentation/gpu/drm-usage-stats.rst b/Documentation/gpu/drm-usage-stats.rst index a80f95ca1b2f..566e122e6e60 100644 --- a/Documentation/gpu/drm-usage-stats.rst +++ b/Documentation/gpu/drm-usage-stats.rst @@ -73,6 +73,11 @@ scope of each device, in which case `drm-pdev` shall be present as well. Userspace should make sure to not double account any usage statistics by using the above described criteria in order to associate data to individual clients. +- drm-client-name: <valstr> + +String optionally set by userspace using DRM_IOCTL_SET_CLIENT_NAME. + + Utilization ^^^^^^^^^^^ diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index 64f5e15304e7..1c9e03477a24 100644 --- a/drivers/gpu/drm/drm_file.c +++ b/drivers/gpu/drm/drm_file.c @@ -955,6 +955,11 @@ void drm_show_fdinfo(struct seq_file *m, struct file *f) PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); } + mutex_lock(&file->client_name_lock); + if (file->client_name) + drm_printf(&p, "drm-client-name:\t%s\n", file->client_name); + mutex_unlock(&file->client_name_lock); + if (dev->driver->show_fdinfo) dev->driver->show_fdinfo(&p, file); }