From patchwork Wed Aug 28 17:25:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mihail Atanassov X-Patchwork-Id: 13781610 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 9FCC0C636E5 for ; Wed, 28 Aug 2024 17:26:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 10FE110E28E; Wed, 28 Aug 2024 17:26:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.b="VLlud/nZ"; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="VLlud/nZ"; dkim-atps=neutral Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2046.outbound.protection.outlook.com [40.107.21.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id 64F0210E28E for ; Wed, 28 Aug 2024 17:26:35 +0000 (UTC) ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=Rjm1T+V8oLr1lwi7+D2+4pGFl9MK4zCOLgvQh1ETVKHtRyitpZBa4/h+E/dTbPHTdxA/lgZbRsy9pnd36uYyGgp5QiUP9iUIJB61lFcEBi1UFZuYTqncuhQC0uaj8ISFLE22PGjmMt5/4C4U9D+4UQqAdwUGM3C8OFs+B03u/CZBMU1DaPfEyVmHR96rnvOcqoF0zpgt4MNfhT/dU56M/ATDFctyPfThsDbmWLJ4PpYG4KZ8sRD5y1zhTHYcHePhc9Hrk2Ind2CY2s7kxFdeJW3dyEZWTYTTF3toTDQYwchmSxnNG7OrXgJLahZLIYGRAuaIFNMj2+Fw/n4vXWK1UQ== 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=ml9krNOY1z3lu2uy4dgfvpCfoKPiLSWDheMD1MelDPg=; b=Chs2ExOr+K1R9cOSjLtJRPElDD4NeANpsLpM0sV6kPhWkDyy3kY24o1CxRKbvTQZTINkQ0B2cKAuJenbYHMlgsKKJbKMXAEAjbxN8RrIOCxuzSYwnKqZzEDZL0wAmasv7sG4eeyuyEUTsg93/f6T5gKCrpvTYZMRDEj2qI1PHLfmQUXf4GyKwRxGnkKEFeHAIu+JcbKG2fltoALGKPHkRVA3wievTvSFe0jGAvr8egTbnVo5bWmfvEHipA7GkpU23u4tpmuSFuOhnIkFSOICe3tvSybu5SCoEtQb4V5rmDpA50AS5Wl1hXssTH1uPP/HOHZ/Rd5cwivGlZ1qLoIhXg== 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=ml9krNOY1z3lu2uy4dgfvpCfoKPiLSWDheMD1MelDPg=; b=VLlud/nZe0uaQ0L2WMnOKXldTbhbGDmiH996cmBywqk2ItpA0JiAch6+g1dWwwsTXoEyZD5wWdCfXyS/WU2y0RU+Gtu+JWZ7D9M8zOgnZ9i/E6Uk5RzJFrgDYfjZVSF3OfvWYGjxQvI31i9xJcNVTOk0EC97qhIuOdAIEMhIAS8= Received: from AS8PR04CA0090.eurprd04.prod.outlook.com (2603:10a6:20b:313::35) by AM8PR08MB5859.eurprd08.prod.outlook.com (2603:10a6:20b:1c6::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.18; Wed, 28 Aug 2024 17:26:18 +0000 Received: from AMS0EPF0000019A.eurprd05.prod.outlook.com (2603:10a6:20b:313:cafe::d7) by AS8PR04CA0090.outlook.office365.com (2603:10a6:20b:313::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.25 via Frontend Transport; Wed, 28 Aug 2024 17:26:18 +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 AMS0EPF0000019A.mail.protection.outlook.com (10.167.16.246) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Wed, 28 Aug 2024 17:26:18 +0000 Received: ("Tessian outbound 7d86ec5dfeb5:v403"); Wed, 28 Aug 2024 17:26:17 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 749c5843b15c9026 X-CR-MTA-TID: 64aa7808 Received: from Ld778b74ff0d4.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2F828FFC-9A6C-431B-8699-757598A84704.1; Wed, 28 Aug 2024 17:26:10 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Ld778b74ff0d4.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 28 Aug 2024 17:26:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CVMMg/yJeXqX8DGPS3gFPmzY9CL1szfhjHkLFZgEaMr71bEVNLQ4W7uoNnL80wSkjMBH2pO6xE8fVj9g7/UeApNTJ6Td12E7KCm1O7J6Eu+eGaSs8IRdMqUwWMyAMGDT7Prj32l3mQwK4j2i7G9IW1FiM4W0WSQ1BeGuDIG6472beYgPYq+YBwDtlbAqh+LuMwMexeU1tc4n/2PwoqcRCG/Eo+2ZCIrhDp99tgQdCrXYynw6zVvNPsbZIj0dz4+3NZ+e6NOtv0h7PnZJn8vgfV5wplGCvzZ8Ukdht8fYAlX1FW/2Xnfh1RKqsqMpf8R2wm9IztqBS27JpS17bw3GuA== 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=ml9krNOY1z3lu2uy4dgfvpCfoKPiLSWDheMD1MelDPg=; b=VWp+ycz1zm3lIzUbXjD5S7/kY/D96esaHbuU3oS8k0zWUqTsbZCglNArTvKDZfgks+DncP4XncGj+KIbl8YB8Ec5noM/VHr3kHfwa4HHTXvDFFqjtW9uPjQIgun2eI+0BufUVadL3wb7DrbAiYu+ZsoN4QG0sgmCnOeRXfR8wgNVppIT7PASrJVY/aZh5udukyWpwySm8n5zP7RgNuqiplsAXZ8t48BpvEvje0qS4yLTn11pN6ZPc9sWbUhXSwR0Ot3W3wgKuIZS28Y05PteXbBBSNltIk6ELXV7wQ5XpoGKsXbA+4P7GLlS+GMDX7/kEcAZrG639ZLEWpz2kvPXsw== 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=ml9krNOY1z3lu2uy4dgfvpCfoKPiLSWDheMD1MelDPg=; b=VLlud/nZe0uaQ0L2WMnOKXldTbhbGDmiH996cmBywqk2ItpA0JiAch6+g1dWwwsTXoEyZD5wWdCfXyS/WU2y0RU+Gtu+JWZ7D9M8zOgnZ9i/E6Uk5RzJFrgDYfjZVSF3OfvWYGjxQvI31i9xJcNVTOk0EC97qhIuOdAIEMhIAS8= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6263.eurprd08.prod.outlook.com (2603:10a6:20b:290::9) by AS8PR08MB6551.eurprd08.prod.outlook.com (2603:10a6:20b:319::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.18; Wed, 28 Aug 2024 17:26:08 +0000 Received: from AS8PR08MB6263.eurprd08.prod.outlook.com ([fe80::12b5:3f0a:2090:fa7c]) by AS8PR08MB6263.eurprd08.prod.outlook.com ([fe80::12b5:3f0a:2090:fa7c%7]) with mapi id 15.20.7918.012; Wed, 28 Aug 2024 17:26:08 +0000 From: Mihail Atanassov To: linux-kernel@vger.kernel.org, Boris Brezillon , Liviu Dudau , Steven Price Cc: dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , Xinhui Pan , Shashank Sharma , Ketil Johnsen , Akash Goel , Mihail Atanassov Subject: [RFC PATCH 00/10] drm/panthor: Add user submission Date: Wed, 28 Aug 2024 18:25:56 +0100 Message-ID: <20240828172605.19176-1-mihail.atanassov@arm.com> X-Mailer: git-send-email 2.45.0 X-ClientProxiedBy: LO4P265CA0091.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2bc::8) To AS8PR08MB6263.eurprd08.prod.outlook.com (2603:10a6:20b:290::9) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6263:EE_|AS8PR08MB6551:EE_|AMS0EPF0000019A:EE_|AM8PR08MB5859:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e29e71d-c9e9-4d32-e699-08dcc78686d7 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|376014|7416014|1800799024|366016; X-Microsoft-Antispam-Message-Info-Original: =?utf-8?q?3WAqlI8Hs0v8h53Z8kY0fn?= =?utf-8?q?8021yYRSHrtxNaMHaGfAwQAEIOdZY9wdYoQkMK/nvRuh6EnR+5tF6tP2e3k+r+D/X?= =?utf-8?q?Lbv9nU1m9RIGL/JnSY15AtHUwR3y37TEzop0xW+oc/pGQuqO97GhJTWrOe7RkNk5n?= =?utf-8?q?JLIYA6xukLKvBUud3DPaLbv5nKxK4TkENvKwN2L4b1nGKtGAVAWDSZCNvMA1VZTJS?= =?utf-8?q?0khfCsggJ4CvQ8tgnrfkl0e8bgki3iIYUgCLvvHsZ3GinS6LfcBmW8JZD9ELjx3Wq?= =?utf-8?q?Nu0MfVPKM66z52NOmYbLg78tJ/i13nyequrQjETaFLyHYb455T5GCVWLOq46H7uYN?= =?utf-8?q?v9y4Sly346/uMYgGAEVxTVSEGP3tJdYtGoOFklyFatpNyc1sLXfZ+yHwbwlFrtqm7?= =?utf-8?q?OhrQZk28z78BBRCVQh8L4bQ4CIV2irCvCfanDT8drjwgdgYq8QgsmAYHrn6lI1oz4?= =?utf-8?q?gbZfReD6Hqt7yRkS7tibBxDAQujspIdSwMwwPfkCrECkPW1YLsstYkN2nNN04vN8Z?= =?utf-8?q?a4QNs+o5BH2bVhm/g++90+O20pFlGrVSbD3xBsIlOJel0US6g6vL272oYYAXUnuZH?= =?utf-8?q?CbDTyAIN0QdfU+wqdhVk72rUsmZKB/1XZww5m1N3y3wxcAUCD+0g/yTjqvf+HNMZR?= =?utf-8?q?O9IynHO5HEdNnpnC/iqBBBnvg12qAHfF78Wfq/No7qbmK3AklrXrNYMX4ud7KYSW3?= =?utf-8?q?Uqyv/s3EbI7xJ7UHoseofBppHe7MfIOFFhtxmT+7PEBj5JkfQRRuHdqcswKM1TaX3?= =?utf-8?q?jletF9/4m4BTl9MY69mwyEEFS2fvBwS5Ll9BkOUE5EsLekObfmQWx0jkibQi2PLXc?= =?utf-8?q?8POwK3aYOv/r2f139Rva6LIvnijcmg0yXrPS/6mGQWIPXKMgnrs9C/MKmGxgEs8Jw?= =?utf-8?q?1cL8lDGpL6t8n6jT8A+dXP8ZqaKEY5Gwp9TBFALq/j4xkpUaLhG3BKK8/2rr4vUdV?= =?utf-8?q?SKEczSIDhh8CzHjGdgw1eO6HN1arbMiI1riREbO0pX8ARZErGgwtMfsSQVFJsM0kY?= =?utf-8?q?jRrY8BBHKbNya24UevriBbQ1/xqCff7FrpJCyWwNRxLfIQBtDS/0vbXx0FwUa47XD?= =?utf-8?q?5xRohAmC+7UD8YnJbXMW+SjFgHA6sBIulIKVHWU+fJuqAdh5764yG4tk5ZBKrB0bP?= =?utf-8?q?aLj8E/eXfQZv/opxGqgAUOM3D0FO7dsSZXApXBmQOebHw1VnFDIIOzgOgY6D0QFSN?= =?utf-8?q?w5Awfwuu72FYUnbua+RIxx3QJ7eNm/A4BlKlD2jtHNtURnOU9EoFSqq+wph5GeD5E?= =?utf-8?q?k=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB6263.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(7416014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6551 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:20b:290::9]; domain=AS8PR08MB6263.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF0000019A.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f0b9c133-4b40-4654-78f6-08dcc78680fa X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|376014|36860700013|35042699022; X-Microsoft-Antispam-Message-Info: =?utf-8?q?KitJnIFNWW99ycTxfOY9dLSMc3eEWHd?= =?utf-8?q?MoZbeH2VbLWblmQQBKUCx5y+pCF1gQTyP4KIhuwH59YXhtOSVWE4duxI3Iqs0nVt2?= =?utf-8?q?yEANaqPLhy057zyJGw4MHxf/UywPSLGLSu5IMQcGB67cjIYqS7dnEkPplaU5CHifS?= =?utf-8?q?BY5Fr2ZJM/teeJGKO5pkowiwtBfq+Z/ST72O21bbDNS4R5SZ72UwU7NLbwpNO6AAU?= =?utf-8?q?Q/9BhlvONknf24U8SQigNgr3b8dVpNELc6QyzOuVAHWCVQiCnRH4L1hW3vgQfXDPg?= =?utf-8?q?KUxcO0j5TXP53eUIZYCVIwaQJyBZgjsoJBU2SzZ7rokHJPhAvp8498xrG5QuYGeCi?= =?utf-8?q?855MqitWe6RuXZpmMV6CVOeQ7vOfZq4jHwzIdDSuoVDe7K++0OId8CVjjT6fS5wc2?= =?utf-8?q?H2QcdK4McDdk2Nh/Cp0CsKj/3MwFDI3qQerHaRSv6m49FSC/C2JyBWIc86Lln5Uve?= =?utf-8?q?Tk8wavw+I6QA3hlE2WEKR8GamRB2jlZnQQvEtFel2Wi3EOVcz8i8nP18vWTs1jnE6?= =?utf-8?q?NcBZ6eyNiUy4asWfINSCidzkkoNSHpdIsPMfa7ZaVITrObzvPNFStqEF5WXmV48qs?= =?utf-8?q?O2+5rMPQ7U9L4L15Tzn67Jb/+oXYNKt5TGHxDvV4fA2kDk+IGsXDJj/wT/MOgUL43?= =?utf-8?q?B2tFIRGYJ5Y2ILBCRNbDpFxxJsQYptjhhvR0aPpkDjNMCbRCHwuvw2nJds3EX3bmN?= =?utf-8?q?V6Ki7FfVJQH1rrHCATv0czVVFvGEnp3XFQRNGDmWiWW8UZVTxScDIugPr9qZKoxV/?= =?utf-8?q?52psdJxUIbyD94CH94DzjTnWBsraKsyPAiBW4UXvbfCvp89zVIFlGHaYkNz3B0IzU?= =?utf-8?q?Vvq+PL7ULnrs5D9pqZPYfysF6kLP2kKX3AWyvqIUJls7LHLaLVmt+zSVP4uLemCP/?= =?utf-8?q?TAhV2+Ip7o/ocp2zAvxbaRqWGyzrjKC+VUAGu1Wpj2eJ2jMumdUum0joNK7yDQveZ?= =?utf-8?q?17F8LTW76j+5jI0M47kO6GFLOklx1zD/du+kkjpMxT1Osjm5K9dg+FgMj8M7VsZfl?= =?utf-8?q?lKbWH/Q12eFTgHnEA6hDHwH6f5zodLoKJqqJfXBjGPRfhPaTf/gxpuV/GDVfEDfU7?= =?utf-8?q?VmeImgw++VLOYavhgg/xfdWsVIOi3yC1oV3HnaWxdFFqKvAMrok1Yn1DZLGonB0zY?= =?utf-8?q?bc/y5bjRaENxRvCHCSRrdiyI0Y+t9cGlzc5ZRy4VMn8UTq5Jg2b2DnfmCYiXqZKXO?= =?utf-8?q?HE27gYqAPuzBY2kIX3LYkpBY2koFx+8EsbLqGpYL/QN10bCEnR3A1bThV2DmHGA+V?= =?utf-8?q?0UP3H0+MhH/7e+NDmm78Tha4Tae3bkTjsiF6N5CdO4Kn6W5KnyszXUzhJMdYddjf9?= =?utf-8?q?2H9KrOT4fGkceSydX3EoDmOhyFxq0HUfWQ=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:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(82310400026)(1800799024)(376014)(36860700013)(35042699022); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2024 17:26:18.0827 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2e29e71d-c9e9-4d32-e699-08dcc78686d7 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: AMS0EPF0000019A.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5859 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" Hello all, This series implements a mechanism to expose Mali CSF GPUs' queue ringbuffers directly to userspace, along with paraphernalia to allow userspace to control job synchronisation between the CPU and GPU. The goal of these changes is to allow userspace to control work submission to the FW/HW directly without kernel intervention in the common case, thereby reducing context switching overhead. It also allows for greater flexibility in the way work is enqueued in the ringbufs. For example, the current kernel submit path only supports indirect calls, which is inefficient for small command buffers. Userspace can also skip unnecessary sync operations. This is still a work-in-progress, there's an outstanding issue with multiple processes using different submission flows triggering scheduling bugs (e.g. the same group getting scheduled twice), but we'd love to gather some feedback on the suitability of the approach in general and see if there's a clear path to merging something like this eventually. I've also CCd AMD maintainers because they have in the past done something similar[1], in case they want to chime in. There are two uses of this new uAPI in Mesa, one in gallium/panfrost (link TBD), and one in panvk [2]. The Gallium implementation is a naïve change just to switch the submission model and exercise the new kernel code, and we don't plan on pursuing this at this time. The panvk driver changes are, however, a better representation of the intent behind this new uAPI, so please consider that as the reference userspace. It is still very much also a work in progress. * patch 1 adds all the uAPI changes; * patch 2 implements the GROUP_CREATE ioctl changes necessary to expose the required objects to userspace; * patch 3 maps the doorbell pages, similarly to how the user I/O page is mapped; * patch 4 implements GROUP_KICK, which lets userspace request an inactive group to be scheduled on the GPU; * patches 5 & 6 implement XGS queues, a way for userspace to synchronise GPU queue progress with DRM syncobjs; * patches 7 & 8 add notification mechanisms for user & kernel to signal changes to native GPU syncobjs. [1] https://lore.kernel.org/amd-gfx/CADnq5_N61q_o+5WYUZsZ=qu7VmeXTFHQSxLwTco05gLzHaiswA@mail.gmail.com/t/#m116a36a598d8fad1329e053974ad37a4dc0f28ed [2] https://gitlab.freedesktop.org/larsivsi/mesa/-/commits/panvk-v10-usersubmit?ref_type=heads Ketil Johnsen (7): drm/panthor: Add uAPI to submit from user space drm/panthor: Extend GROUP_CREATE for user submission drm/panthor: Map doorbell pages drm/panthor: Add GROUP_KICK ioctl drm/panthor: Factor out syncobj handling drm/panthor: Implement XGS queues drm/panthor: Add SYNC_UPDATE ioctl Mihail Atanassov (1): drm/panthor: Add sync_update eventfd handling drivers/gpu/drm/panthor/Makefile | 4 +- drivers/gpu/drm/panthor/panthor_device.c | 66 ++- drivers/gpu/drm/panthor/panthor_device.h | 35 +- drivers/gpu/drm/panthor/panthor_drv.c | 233 +++++++- drivers/gpu/drm/panthor/panthor_fw.c | 2 +- drivers/gpu/drm/panthor/panthor_sched.c | 408 +++++++++----- drivers/gpu/drm/panthor/panthor_sched.h | 8 +- drivers/gpu/drm/panthor/panthor_syncobj.c | 167 ++++++ drivers/gpu/drm/panthor/panthor_syncobj.h | 27 + drivers/gpu/drm/panthor/panthor_xgs.c | 638 ++++++++++++++++++++++ drivers/gpu/drm/panthor/panthor_xgs.h | 42 ++ include/uapi/drm/panthor_drm.h | 243 +++++++- 12 files changed, 1696 insertions(+), 177 deletions(-) create mode 100644 drivers/gpu/drm/panthor/panthor_syncobj.c create mode 100644 drivers/gpu/drm/panthor/panthor_syncobj.h create mode 100644 drivers/gpu/drm/panthor/panthor_xgs.c create mode 100644 drivers/gpu/drm/panthor/panthor_xgs.h