From patchwork Tue Apr 1 15:48:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lukas Zapolskas X-Patchwork-Id: 14035057 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 7816EC36010 for ; Tue, 1 Apr 2025 15:48:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F61A10E5FF; Tue, 1 Apr 2025 15:48:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.b="ZB4XxlhL"; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="ZB4XxlhL"; dkim-atps=neutral Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011054.outbound.protection.outlook.com [52.101.70.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8717C10E5FD for ; Tue, 1 Apr 2025 15:48:52 +0000 (UTC) ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=SbPx3Hf998mSku/fUNo3GUDYJfVNjye6c1Jx0APYldiNvpyrPKBs54BmUDMC4O+eXdfMY2O5w5PWZzQP8UqTdmojVe+SMJ2AfBxcnxwYR35yG5AtzEKcDJTx4vbnphab6HKMWUIJgSLLVdwmX0RgYKqG6kZ+hJj/K/Ie1n1ozq9qxuVnjZjnSFfKPNC5OwG0yLDVevDldHwiMcFYAtSQ02hpGnr5swC1JlkTdnhNweTDAWfW18+ZdUZBOFU0hyesJbMyNwLKByk0jcWfA7Iz4X71981B7x/pVRubN1cPUsMCWRnMgloh8UbF+4QtgKQAPtQyflOOI4VoyfgdlqIR3A== ARC-Message-Signature: i=2; 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=RKToYnsnhK/atjtQcUyS+m3lGaKZADzK4Xhkt3mZuVo=; b=PoQUD+RTTPvyMnQXMD60GpLSxTMpE+8tuHE2Oc70wu+f0t01tZfszp+38lOtbY+P9iY5FT5kT5ODGo97ysMF+jAh2NK8HMTPw7Gl4Wp9nKzBo9DUYILnY1qbqvX5cALSInxE95WkKa4C0HXKTTom4mZeHTbWmPY0eclFvV4utf1ujrwRw+enSZOKTq+zjObEke8HdTwxXWkcoiR1APmNFdFaDv6Wf7AQmCu89v6plgbp61YmzJzDhulvcz9cLTGw+vKf3h7eoqgCMrFDjBbvPvxQPbEoB09qTHeghemwiJrquDKnajgCk0w3RjPuODxWB5ASbCj6Pe38lPp9/adn8Q== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RKToYnsnhK/atjtQcUyS+m3lGaKZADzK4Xhkt3mZuVo=; b=ZB4XxlhLBJzUytrgYqaEHiYB5nHTNaTFSoJ1iZh/P0dCn7o4B/4W7EWXOTr9tz/Sh7pkXFeT6GeM4Cqmj6eL0mLJfAB2eagtTFuVsHlaeCh+1DZwHaBlWCOZJTKaTgD2qwylGPn9OR+LwQWJCM03w/NAbCvGKFl/fNHlUbsjIps= Received: from AM0PR10CA0132.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::49) by AS2PR08MB8647.eurprd08.prod.outlook.com (2603:10a6:20b:55e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.47; Tue, 1 Apr 2025 15:48:46 +0000 Received: from AMS1EPF00000049.eurprd04.prod.outlook.com (2603:10a6:208:e6:cafe::df) by AM0PR10CA0132.outlook.office365.com (2603:10a6:208:e6::49) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8583.39 via Frontend Transport; Tue, 1 Apr 2025 15:48:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AMS1EPF00000049.mail.protection.outlook.com (10.167.16.133) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8606.22 via Frontend Transport; Tue, 1 Apr 2025 15:48:46 +0000 Received: ("Tessian outbound d933a9851b56:v604"); Tue, 01 Apr 2025 15:48:46 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3fdee01f070c5258 X-TessianGatewayMetadata: zdau7lNxuKT/PBcDwz3JCS2lj63ukJ2jrJIWxTaUjM4J6d/6vgGv2Uba6bRv7oVwjPrFR7AVbtJd2w2lXo0EC7ypRf38cXS0EBPE8gRernDiHiVlJ4Fv6w5eUk61eC8BtMmtjqw2Kz7GPm42uGpB0DedA5fQQA6MXUpJUpWUmae+F/l/q0nIP+VWkx+pkSzP3TzAnnKjhnU+Noi4B2eyuw== X-CR-MTA-TID: 64aa7808 Received: from L12314321001d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A8011DF0-7E90-4AE2-B5FE-6DADAC91EE5E.1; Tue, 01 Apr 2025 15:48:39 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L12314321001d.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 01 Apr 2025 15:48:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gSx1CPoRt16r07GY7pWLzthTJMdFmrhOJY53q3dMq4FHZahsLE8CoEey/1+bpyGDgEVMTdTnqPjegb/wT/XPXeUMyoywCEazb2t7wVJMvSfaO2inGYQ79K1IU6e+O4e1Q5Gy5KAjKlYj4eEZ+sGaXLxlQN7f//vJ/Nx71srbCNj7z+U2druhY/VUOk/+Su0IE+W/5y/yChHlwEvq7HhL1FwwD+Atj4JSVLoV2hTzwAw4A+UWh4M0csElGJUbSXAYNTBmfSzd563jETc1hNHj9tF+7L1Ow+nTeiXgX8zQQWJ+/wJg+uzXrFqIvlyvbxtHvlTNSIeqmY+KPk+WCZM6rQ== 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=RKToYnsnhK/atjtQcUyS+m3lGaKZADzK4Xhkt3mZuVo=; b=IQJHJzMawE3owv7ibm8XZ5HwRvxl5ZHCzxPXJWWTvgk5o6v+ra7w319dnhnzfxG+JaiuolZ9Ps0qS5AgWzWDUH/xSl+OGMMj2lquNpaKRof+01mjMyoggF5Bzbd0v8y/FcJJ+oxnJ6IGxCypgbGQjY0CSQyGRCfn+C+SrRFS9RaiWDOukNXR3ZQycdW20Bsvt4QqLMrj6ZfF712POI3BTON0Xz9S83SwY7jWSrje8IzGVtdgzSd1UyvhVaK+TyIP3FuzJG9z0MfOoVY7yusTlrfUPvS6A5SJVxTKE2BGVIrBz3uh3FCpXZ9YiCHlK7jkm+aUWcDZMpd1bNmUIUNXtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RKToYnsnhK/atjtQcUyS+m3lGaKZADzK4Xhkt3mZuVo=; b=ZB4XxlhLBJzUytrgYqaEHiYB5nHTNaTFSoJ1iZh/P0dCn7o4B/4W7EWXOTr9tz/Sh7pkXFeT6GeM4Cqmj6eL0mLJfAB2eagtTFuVsHlaeCh+1DZwHaBlWCOZJTKaTgD2qwylGPn9OR+LwQWJCM03w/NAbCvGKFl/fNHlUbsjIps= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AM0PR08MB3315.eurprd08.prod.outlook.com (2603:10a6:208:5c::16) by DU0PR08MB8279.eurprd08.prod.outlook.com (2603:10a6:10:40d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Tue, 1 Apr 2025 15:48:38 +0000 Received: from AM0PR08MB3315.eurprd08.prod.outlook.com ([fe80::42a0:1b6e:cf98:d8fc]) by AM0PR08MB3315.eurprd08.prod.outlook.com ([fe80::42a0:1b6e:cf98:d8fc%6]) with mapi id 15.20.8534.048; Tue, 1 Apr 2025 15:48:38 +0000 From: Lukas Zapolskas To: Boris Brezillon , Steven Price , Liviu Dudau , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Adri=C3=A1n_Larumbe?= , Lukas Zapolskas Subject: [PATCH v3 2/7] drm/panthor: Add DEV_QUERY.PERF_INFO handling for Gx10 Date: Tue, 1 Apr 2025 16:48:17 +0100 Message-Id: <203e6c8f7e82068fd570896a4302757247980c09.1743517880.git.lukas.zapolskas@arm.com> X-Mailer: git-send-email 2.33.0.dirty In-Reply-To: References: X-ClientProxiedBy: LO6P123CA0047.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:310::16) To AM0PR08MB3315.eurprd08.prod.outlook.com (2603:10a6:208:5c::16) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AM0PR08MB3315:EE_|DU0PR08MB8279:EE_|AMS1EPF00000049:EE_|AS2PR08MB8647:EE_ X-MS-Office365-Filtering-Correlation-Id: 43d15991-82d6-42d8-6e96-08dd7134b05f X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|1800799024|366016|376014|921020; X-Microsoft-Antispam-Message-Info-Original: =?utf-8?q?OnawiU2ExtW/6u4xfUwFwN?= =?utf-8?q?w4QLXzTBcl1caO8JdISDNou4LlhhfODmEujmy4D1FSbc5Y/L2y/iZI1brz6el2xDO?= =?utf-8?q?7ef7ZxQctW62mwhHe0fZhKPI2pzdD6E7cXPX6vgv61moWf884VMaA/fZBj89cPgc6?= =?utf-8?q?mQLJU+/DC5blkMOeNVFGgjy1OTiK/sg6BcwkGTjyuKCse/jjoV4k5AmZuYEc39NJR?= =?utf-8?q?JMwrbT5DC8xwtYrwdM6IMRICosv+pW7kWRyYCrQWd3m5zWjwp2F12lMwsfypg85mk?= =?ut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?= =?utf-8?q?gsiHCtnORp7MilC7SjKYOPnP+fbxzPPdoPwOj0MNxqzml8ibnVIPUOzwojtxzV5lv?= =?utf-8?q?4F7+S7GvOMJRu6yehN00CNMH2wqn2Oy77H9N0mqA9+CAkUopOtSYDpuQLo24lMyOR?= =?utf-8?q?rVcytPB1Om1xBNqMnAyCT6emM1NuF8gRZUijVYcy/Y+PG+AuDmKnW1QREpWiq/FWW?= =?utf-8?q?qpalFOuU4hCoZhC/SlK5B73eX3w9J4GypWVXMpmUBH2Hu6VVm/oaM+SEC48H7oXA?= =?utf-8?q?=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR08MB3315.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8279 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:208:5c::16]; domain=AM0PR08MB3315.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS1EPF00000049.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 22075fad-1163-4046-218e-08dd7134ab1e X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|376014|35042699022|14060799003|36860700013|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?BP7yzLg/qLA7YyBLZXT1TejkzqucOgc?= =?utf-8?q?HzjNgFxg4o7n7V7wLp2ljy6Y++1DFbJoa1AK+8MAY/XUThRORsf4kiObidzDbktbH?= =?utf-8?q?Ohk+K8/BFBY6SIDIhhf8duGegfF6F0AEjNpW7Sd/zNphHdJzmhpXasCPnOsWn0syo?= =?utf-8?q?2TR5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= =?utf-8?q?wFFRo/kBjVLXFK3clL3wIcfcsKxz/IspHhGoD6HnOdcZpEHfSDNqsLyp2z5FqX+p9?= =?utf-8?q?tElQco70D4truB5Oo719SKZuVt8guAj2Fv75ahZnOjXodm19eeFhjHIL+9cawQXzZ?= =?utf-8?q?vHIuvuzEfBkfhSBbwtrIAoWkhYfRrBRspQYAPkiC5VVVjE5p8zOW3qC2PoXT1O/qc?= =?utf-8?q?N1dzmehVaHzh8Voi/r3IfD+IwdDJFhMdxsanUn+bPKXMy+E1EUxYMUlVo5ZE0c6/P?= =?utf-8?q?FsbkZWu19eQ2x9MB7UxNlLmUMBGx9GubHHalzwcXgWDwXJev/04mZaPiwCjjmT6d8?= =?utf-8?q?GUg/9vSmxhEHt+H9eEzBS6wzTFKOh198Cx2cQ/YXIVNhzxgHlQscDHgq5yQyQyGS1?= =?utf-8?q?KnZcOEi0jm5QK0Eg94hofRkQWgZ0FTny5M10+clLfRa+ZFg0rbVvExe5HSQYa3Bmp?= =?utf-8?q?nD5R7IX0aK0lwlP+1NlpCql4Qi/Hntkg=3D=3D?= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE; SFS:(13230040)(82310400026)(1800799024)(376014)(35042699022)(14060799003)(36860700013)(921020); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2025 15:48:46.7135 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 43d15991-82d6-42d8-6e96-08dd7134b05f X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AMS1EPF00000049.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8647 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" This change adds the IOCTL to query data about the performance counter setup. Some of this data was available via previous DEV_QUERY calls, for instance for GPU info, but exposing it via PERF_INFO minimizes the overhead of creating a single session to just the one aggregate IOCTL. Signed-off-by: Lukas Zapolskas Reviewed-by: Adrián Larumbe --- drivers/gpu/drm/panthor/Makefile | 1 + drivers/gpu/drm/panthor/panthor_device.c | 5 +++ drivers/gpu/drm/panthor/panthor_device.h | 3 ++ drivers/gpu/drm/panthor/panthor_drv.c | 10 ++++- drivers/gpu/drm/panthor/panthor_fw.h | 3 ++ drivers/gpu/drm/panthor/panthor_perf.c | 55 ++++++++++++++++++++++++ drivers/gpu/drm/panthor/panthor_perf.h | 15 +++++++ include/uapi/drm/panthor_drm.h | 1 + 8 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/panthor/panthor_perf.c create mode 100644 drivers/gpu/drm/panthor/panthor_perf.h diff --git a/drivers/gpu/drm/panthor/Makefile b/drivers/gpu/drm/panthor/Makefile index 15294719b09c..0df9947f3575 100644 --- a/drivers/gpu/drm/panthor/Makefile +++ b/drivers/gpu/drm/panthor/Makefile @@ -9,6 +9,7 @@ panthor-y := \ panthor_gpu.o \ panthor_heap.o \ panthor_mmu.o \ + panthor_perf.o \ panthor_sched.o obj-$(CONFIG_DRM_PANTHOR) += panthor.o diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c index a9da1d1eeb70..76b4cf3dc391 100644 --- a/drivers/gpu/drm/panthor/panthor_device.c +++ b/drivers/gpu/drm/panthor/panthor_device.c @@ -19,6 +19,7 @@ #include "panthor_fw.h" #include "panthor_gpu.h" #include "panthor_mmu.h" +#include "panthor_perf.h" #include "panthor_regs.h" #include "panthor_sched.h" @@ -259,6 +260,10 @@ int panthor_device_init(struct panthor_device *ptdev) if (ret) goto err_unplug_fw; + ret = panthor_perf_init(ptdev); + if (ret) + goto err_unplug_fw; + /* ~3 frames */ pm_runtime_set_autosuspend_delay(ptdev->base.dev, 50); pm_runtime_use_autosuspend(ptdev->base.dev); diff --git a/drivers/gpu/drm/panthor/panthor_device.h b/drivers/gpu/drm/panthor/panthor_device.h index da6574021664..657ccc39568c 100644 --- a/drivers/gpu/drm/panthor/panthor_device.h +++ b/drivers/gpu/drm/panthor/panthor_device.h @@ -120,6 +120,9 @@ struct panthor_device { /** @csif_info: Command stream interface information. */ struct drm_panthor_csif_info csif_info; + /** @perf_info: Performance counter interface information. */ + struct drm_panthor_perf_info perf_info; + /** @gpu: GPU management data. */ struct panthor_gpu *gpu; diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c index 06fe46e32073..9d2b716cca45 100644 --- a/drivers/gpu/drm/panthor/panthor_drv.c +++ b/drivers/gpu/drm/panthor/panthor_drv.c @@ -175,7 +175,8 @@ panthor_get_uobj_array(const struct drm_panthor_obj_array *in, u32 min_stride, PANTHOR_UOBJ_DECL(struct drm_panthor_sync_op, timeline_value), \ PANTHOR_UOBJ_DECL(struct drm_panthor_queue_submit, syncs), \ PANTHOR_UOBJ_DECL(struct drm_panthor_queue_create, ringbuf_size), \ - PANTHOR_UOBJ_DECL(struct drm_panthor_vm_bind_op, syncs)) + PANTHOR_UOBJ_DECL(struct drm_panthor_vm_bind_op, syncs), \ + PANTHOR_UOBJ_DECL(struct drm_panthor_perf_info, shader_blocks)) /** * PANTHOR_UOBJ_SET() - Copy a kernel object to a user object. @@ -835,6 +836,10 @@ static int panthor_ioctl_dev_query(struct drm_device *ddev, void *data, struct d args->size = sizeof(priorities_info); return 0; + case DRM_PANTHOR_DEV_QUERY_PERF_INFO: + args->size = sizeof(ptdev->perf_info); + return 0; + default: return -EINVAL; } @@ -859,6 +864,9 @@ static int panthor_ioctl_dev_query(struct drm_device *ddev, void *data, struct d panthor_query_group_priorities_info(file, &priorities_info); return PANTHOR_UOBJ_SET(args->pointer, args->size, priorities_info); + case DRM_PANTHOR_DEV_QUERY_PERF_INFO: + return PANTHOR_UOBJ_SET(args->pointer, args->size, ptdev->perf_info); + default: return -EINVAL; } diff --git a/drivers/gpu/drm/panthor/panthor_fw.h b/drivers/gpu/drm/panthor/panthor_fw.h index 6598d96c6d2a..8bcb933fa790 100644 --- a/drivers/gpu/drm/panthor/panthor_fw.h +++ b/drivers/gpu/drm/panthor/panthor_fw.h @@ -197,8 +197,11 @@ struct panthor_fw_global_control_iface { u32 output_va; u32 group_num; u32 group_stride; +#define GLB_PERFCNT_FW_SIZE(x) ((((x) >> 16) << 8)) u32 perfcnt_size; u32 instr_features; +#define PERFCNT_FEATURES_MD_SIZE(x) (((x) & GENMASK(3, 0)) << 8) + u32 perfcnt_features; }; struct panthor_fw_global_input_iface { diff --git a/drivers/gpu/drm/panthor/panthor_perf.c b/drivers/gpu/drm/panthor/panthor_perf.c new file mode 100644 index 000000000000..b0a6f3fca8a9 --- /dev/null +++ b/drivers/gpu/drm/panthor/panthor_perf.c @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: GPL-2.0 or MIT +/* Copyright 2023 Collabora Ltd */ +/* Copyright 2025 Arm ltd. */ + +#include +#include + +#include "panthor_device.h" +#include "panthor_fw.h" +#include "panthor_perf.h" + +/** + * PANTHOR_PERF_COUNTERS_PER_BLOCK - On CSF architectures pre-11.x, the number of counters + * per block was hardcoded to be 64. Arch 11.0 onwards supports the PRFCNT_FEATURES GPU register, + * which indicates the same information. + */ +#define PANTHOR_PERF_COUNTERS_PER_BLOCK (64) + +static void panthor_perf_info_init(struct panthor_device *ptdev) +{ + struct panthor_fw_global_iface *glb_iface = panthor_fw_get_glb_iface(ptdev); + struct drm_panthor_perf_info *const perf_info = &ptdev->perf_info; + + if (PERFCNT_FEATURES_MD_SIZE(glb_iface->control->perfcnt_features)) + perf_info->flags |= DRM_PANTHOR_PERF_BLOCK_STATES_SUPPORT; + + perf_info->counters_per_block = PANTHOR_PERF_COUNTERS_PER_BLOCK; + + perf_info->sample_header_size = sizeof(struct drm_panthor_perf_sample_header); + perf_info->block_header_size = sizeof(struct drm_panthor_perf_block_header); + + if (GLB_PERFCNT_FW_SIZE(glb_iface->control->perfcnt_size)) + perf_info->fw_blocks = 1; + + perf_info->cshw_blocks = 1; + perf_info->tiler_blocks = 1; + perf_info->memsys_blocks = DRM_PANTHOR_L2_SLICES(ptdev->gpu_info.mem_features); + perf_info->shader_blocks = hweight64(ptdev->gpu_info.shader_present); +} + +/** + * panthor_perf_init - Initialize the performance counter subsystem. + * @ptdev: Panthor device + * + * Return: 0 on success, negative error code on failure. + */ +int panthor_perf_init(struct panthor_device *ptdev) +{ + if (!ptdev) + return -EINVAL; + + panthor_perf_info_init(ptdev); + + return 0; +} diff --git a/drivers/gpu/drm/panthor/panthor_perf.h b/drivers/gpu/drm/panthor/panthor_perf.h new file mode 100644 index 000000000000..3c32c24c164c --- /dev/null +++ b/drivers/gpu/drm/panthor/panthor_perf.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 or MIT */ +/* Copyright 2025 Collabora Ltd */ +/* Copyright 2025 Arm ltd. */ + +#ifndef __PANTHOR_PERF_H__ +#define __PANTHOR_PERF_H__ + +#include + +struct panthor_device; + +int panthor_perf_init(struct panthor_device *ptdev); + +#endif /* __PANTHOR_PERF_H__ */ + diff --git a/include/uapi/drm/panthor_drm.h b/include/uapi/drm/panthor_drm.h index c63cbdddde76..4d352008dffa 100644 --- a/include/uapi/drm/panthor_drm.h +++ b/include/uapi/drm/panthor_drm.h @@ -270,6 +270,7 @@ struct drm_panthor_gpu_info { /** @mem_features: Memory features. */ __u32 mem_features; +#define DRM_PANTHOR_L2_SLICES(x) ((((x) >> 8) & 0xf) + 1) /** @mmu_features: MMU features. */ __u32 mmu_features;