Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5528486rwi; Sun, 23 Oct 2022 07:34:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM699WLH9W2gSLd0BFsvR5rfLgdj9a4LMaCuukY6kuSmVCYvq0OhO/46NUm79SmVk6HDfaPJ X-Received: by 2002:a17:902:cf01:b0:186:810c:d994 with SMTP id i1-20020a170902cf0100b00186810cd994mr11456665plg.151.1666535651778; Sun, 23 Oct 2022 07:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666535651; cv=none; d=google.com; s=arc-20160816; b=itsP1YtUp7Bc10gtnEGKFGpnGfTf1PqS8qHYzAK+V9RUu/GHAMAoRijWGjZr5AEHf6 gVHhupU/mcf22usAFmSZkWAxmoQIVTvktIMY2+9K4bWALC1w+T51XuY9it9s+bQw/mIi EmShfJgUnM93nfqMU7EMs2tWpAJyKxi4YLQ4E1WRccxmhLDvtnO5pmX6/1DFEvDY/US0 9jrCNpVO/3RHbWkRIyZQ4Rgq306F7D9Ptqs06DhH/+ys3NAfei8/8dP+RyJdgNnQN1Tm pyK8WWBF13b2BSsvC6e5yXFRCi/tbKb/Pj/bdK1X0Io8hlN/AW1aZDLq6fq8e7Sf4QOr KoTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=t6pBF/o0natTLuLX/wEXaHuftOiR1PZ0M1sSmiCulEc=; b=zd1kfixNlNcpb3nKlLwNzCavZicSIH7+GE/PCDERDobWzsni5TjszV9ByJ5fn2AQfo tPtFLnA9biHe72i3/JZrvyQ1hYW0htLoRuXeUfgOHzbJSnQGmm6f3YtLjyzD4/vzpvpJ VWWEvuU6pIlEyPfIuTgL/l75fqpbXTvlo76o4S9PlXiWtQMTVvod1Y5/esDLuJi+6R8o Hxb7S301apHsWqsE/0uTHtr403FkFnDthG9Ciu8Co4YON1c3ZyMkySye5aoLL9TntHbB HDHU9b5l0ZarrVNVi3N5Zn4IJTG7vQ7QFsznRo2xH2IO8Tx1N/FlhE7GlSeS07AexHPB seMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IUWzmI71; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mi12-20020a17090b4b4c00b0020befc1a93asi15011393pjb.100.2022.10.23.07.34.00; Sun, 23 Oct 2022 07:34:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IUWzmI71; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbiJWOC6 (ORCPT + 99 others); Sun, 23 Oct 2022 10:02:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229707AbiJWOC4 (ORCPT ); Sun, 23 Oct 2022 10:02:56 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4445D73908; Sun, 23 Oct 2022 07:02:55 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id l22-20020a17090a3f1600b00212fbbcfb78so1256943pjc.3; Sun, 23 Oct 2022 07:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=t6pBF/o0natTLuLX/wEXaHuftOiR1PZ0M1sSmiCulEc=; b=IUWzmI71fyIUK86PItGrbkGDgECFyiP1DOXhDRI36uIh3LwOJb+pBNZRtiGXBxuR/X EkgHrb08gHySShO6zEhRbGtQSD8HXiWRiwsX/q1fb4Rla2P9+yK3DEuXXIoajEbx0KZJ O1lMk1WEESOFv1GJwGm8jKsXfcB1ydcOrkxggQ6bgQnfaPn6QQyYl7BTjt3nku5VKDf1 srM3Rbj9zZMaXgvZpKOjm3Sg6oSAt/TWhe5fI7eu/Rqo3eSw/iNCKi2PS6HmcnvHUD/7 s4d/neVbaEVYhkCsZ7/kMfwkkOvxCHM/K84QA8S9oqiIfXWOnaDdE7aIujLYTe6abH7O I1xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=t6pBF/o0natTLuLX/wEXaHuftOiR1PZ0M1sSmiCulEc=; b=lVpqrvX7GN48MDLN2tnHNYceLwHLuvGQJDLiefQ/4gKmrOKDOuYSkAg4T5TW1NLwm6 Zd4gbLndfUda6fTvO8yM4fvA7sKT5clRaH1a4CAgOG8POmjpX1JRZk5zBL1WkmyC9OFx Yyo7NbBsniKWqAmAKgg8+0XIc1AHBFtWMweGNhjIY+0/F2bnfr2+K5Y4RLKvjFa9E8kR DqSjZtXYjFmVZeAKg4iD/DCPPwiAlkum3pV8BVSufO6sfDI5OOeJnVA0AQNdpxgH6WcG 0Zw3MwQnKc9XyPehGAdGbtUBSnQdu+kwQKw2IE3XtFndAJln1Qp22J14THUgENf1jgqI oRdg== X-Gm-Message-State: ACrzQf3FUjROyED0O+vHVl1Qf5HMFIrZ8w7doR4ld1CrbCIui0jLYwbl B5pAugkHgoqNXkq+4tEnWhg= X-Received: by 2002:a17:90a:6845:b0:210:7ef5:ab99 with SMTP id e5-20020a17090a684500b002107ef5ab99mr24388726pjm.80.1666533774770; Sun, 23 Oct 2022 07:02:54 -0700 (PDT) Received: from debian.me (subs02-180-214-232-1.three.co.id. [180.214.232.1]) by smtp.gmail.com with ESMTPSA id e28-20020a056a0000dc00b0056afd55722asm4270109pfj.153.2022.10.23.07.02.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Oct 2022 07:02:53 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id C9886104163; Sun, 23 Oct 2022 21:02:50 +0700 (WIB) Date: Sun, 23 Oct 2022 21:02:49 +0700 From: Bagas Sanjaya To: Oded Gabbay Cc: David Airlie , Daniel Vetter , Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, Jason Gunthorpe , John Hubbard , Alex Deucher , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Yuji Ishikawa , Jiho Chu , Daniel Stone , Tvrtko Ursulin , Jeffrey Hugo , Christoph Hellwig , Kevin Hilman , Jagan Teki , Jacek Lawrynowicz , Maciej Kwapulinski , Jonathan Corbet Subject: Re: [RFC PATCH 0/3] new subsystem for compute accelerator devices Message-ID: References: <20221022214622.18042-1-ogabbay@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KFhUQIkYlmhwSi0N" Content-Disposition: inline In-Reply-To: <20221022214622.18042-1-ogabbay@kernel.org> X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --KFhUQIkYlmhwSi0N Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 23, 2022 at 12:46:19AM +0300, Oded Gabbay wrote: > In the last couple of months we had a discussion [1] about creating a new > subsystem for compute accelerator devices in the kernel. >=20 > After an analysis that was done by DRM maintainers and myself, and follow= ing > a BOF session at the Linux Plumbers conference a few weeks ago [2], we > decided to create a new subsystem that will use the DRM subsystem's code = and > functionality. i.e. the accel core code will be part of the DRM subsystem. >=20 > This will allow us to leverage the extensive DRM code-base and > collaborate with DRM developers that have experience with this type of > devices. In addition, new features that will be added for the accelerator > drivers can be of use to GPU drivers as well (e.g. RAS). >=20 > As agreed in the BOF session, the accelerator devices will be exposed to > user-space with a new, dedicated device char files and a dedicated major > number (261), to clearly separate them from graphic cards and the graphic > user-space s/w stack. Furthermore, the drivers will be located in a separ= ate > place in the kernel tree (drivers/accel/). >=20 > This series of patches is the first step in this direction as it adds the > necessary infrastructure for accelerator devices to DRM. The new devices = will > be exposed with the following convention: >=20 > device char files - /dev/accel/accel* > sysfs - /sys/class/accel/accel*/ > debugfs - /sys/kernel/debug/accel/accel*/ >=20 > I tried to reuse the existing DRM code as much as possible, while keeping= it > readable and maintainable. >=20 > One thing that is missing from this series is defining a namespace for the > new accel subsystem, while I'll add in the next iteration of this patch-s= et, > after I will receive feedback from the community. >=20 > As for drivers, once this series will be accepted (after adding the names= pace), > I will start working on migrating the habanalabs driver to the new accel > subsystem. I have talked about it with Dave and we agreed that it will be > a good start to simply move the driver as-is with minimal changes, and th= en > start working on the driver's individual features that will be either add= ed > to the accel core code (with or without changes), or will be removed and > instead the driver will use existing DRM code. >=20 > In addition, I know of at least 3 or 4 drivers that were submitted for re= view > and are good candidates to be included in this new subsystem, instead of = being > a drm render node driver or a misc driver. >=20 > [1] https://lkml.org/lkml/2022/7/31/83 > [2] https://airlied.blogspot.com/2022/09/accelerators-bof-outcomes-summar= y.html >=20 Since this is new subsystem, it should have its own git tree where you collected accelerator-related patches. By convention, there should be "next" branch targeting for next kernel release and "fixes" branch for bugfixes pending for current release. Both branches should be included into linux-next. The names don't necessarily be that, though. Also, it had been great if you write short, descriptive documentation about the subsystem (maintainers handbook). Cc'ing linux-doc folks. --=20 An old man doll... just what I always wanted! - Clara --KFhUQIkYlmhwSi0N Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSSYQ6Cy7oyFNCHrUH2uYlJVVFOowUCY1VJhQAKCRD2uYlJVVFO o+yTAP0Wq0yPX3TS5HZJ27v0PHGSOWTbOi+nH/lPSH1cS+ol9AD8CHBTzQqZytiP wolMvwwGEa8J+1fi1Wk5hKbB1ex35g8= =9xlo -----END PGP SIGNATURE----- --KFhUQIkYlmhwSi0N--