Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5528784rwi; Sun, 23 Oct 2022 07:34:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6tySQhxeWbi1m1TqVvOl+CB5zQvM+aC2GmSW9Th768u2ikmGuvOQB9vMOxcigSs+BK4utD X-Received: by 2002:a63:e64f:0:b0:43c:9db1:8096 with SMTP id p15-20020a63e64f000000b0043c9db18096mr23528580pgj.567.1666535667801; Sun, 23 Oct 2022 07:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666535667; cv=none; d=google.com; s=arc-20160816; b=kbJYk/9HKD7HSznL8gOlGIDyvZgSCqb36oSNTJ4DLVarFuge1LVfnLKQPcSjq1oFTE ykeuJ3S9tE1XsJoyDk8uSgxmgPaPxitS7I/Qzh5rF0/qkZ7rRuwPwITuRsx70DQczc/B I9dBQmFIYzKHzEWkYrW99cbo6m2DytiFBGMwnNGH7SlWdY8kBi+iNPqraaW7rvvOTPuA HVNnWuIEyNOMaCzQ0B65v3EHTD1QsGDqhEZLIpI/BAhJsyKzgsLxLBebf/WN4fdMvb6a fleFZihB0Y6bDxDRZlKJWl4dxA7NW+Hqe0Eh2WaxuPNHmWtrT61MdCkIlwwhTb1w17yr NXrQ== 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=pkudQ7nXDZ62J/NUscZ4eYh+VkBpHyrM81JvaxkHBBI=; b=ncbMlL8Azqlse2useYZ6FtTBXBrFLlDFvOCkQy/2ONq5Harb0nqD4ZtC6SO9/dqeD0 hRGgNBeVhwPj+UWWOQ5KAt92n1mChoPMVNPANehwGcSHNAbzQh24me8neBWBhD6cwWhR +pXSNQ2DGzHuLojAnQC1YInP6+4UAFFbFiaa/oel43ehHDYVgN/XMA6u4wIKw777qg+u a7rpl5bxsJPEvIuoHO+Zkl5X46FVKRYq+nC8LvhOqCQ16SVaA9ZG+Zhac8OA6ZjLurBP /wqDE7LX+oRo5Lwq87TYC4YbH+VTp+PUJlo8Ym14jShq5yL0EB5ZE462TYe32JxZEhBZ M2QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FXOUmEyn; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jb20-20020a170903259400b001865f59697asi12047309plb.429.2022.10.23.07.34.15; Sun, 23 Oct 2022 07:34:27 -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=@linuxfoundation.org header.s=korg header.b=FXOUmEyn; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230024AbiJWOPF (ORCPT + 99 others); Sun, 23 Oct 2022 10:15:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbiJWOPB (ORCPT ); Sun, 23 Oct 2022 10:15:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E589D3679E; Sun, 23 Oct 2022 07:14:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5836560E9E; Sun, 23 Oct 2022 14:14:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26165C433D6; Sun, 23 Oct 2022 14:14:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666534498; bh=+mgpn2SQZFBbWY8pcXjmHFWINFP2Fcvzsq9oNLuAra8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FXOUmEynkar7+9suRiSaDGsqrhExcPCQWcuZ02F2lHV81lSij4D7owi8jPtGyOHbp S9Q0BgY1vqRXZbFpFshca54aKYyBj4qztWYLsrXyTFLb+29BSLkvmZUeXcaIQUx4l3 bks/URcMQfo//SjcnYRemKgHWw78itiqP59mHRl8= Date: Sun, 23 Oct 2022 16:14:55 +0200 From: Greg Kroah-Hartman To: Bagas Sanjaya Cc: Oded Gabbay , David Airlie , Daniel Vetter , Arnd Bergmann , 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Sun, Oct 23, 2022 at 09:02:49PM +0700, Bagas Sanjaya wrote: > 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. > > > > After an analysis that was done by DRM maintainers and myself, and following > > 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. > > > > 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). > > > > 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 separate > > place in the kernel tree (drivers/accel/). > > > > 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: > > > > device char files - /dev/accel/accel* > > sysfs - /sys/class/accel/accel*/ > > debugfs - /sys/kernel/debug/accel/accel*/ > > > > I tried to reuse the existing DRM code as much as possible, while keeping it > > readable and maintainable. > > > > 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-set, > > after I will receive feedback from the community. > > > > As for drivers, once this series will be accepted (after adding the namespace), > > 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 then > > start working on the driver's individual features that will be either added > > to the accel core code (with or without changes), or will be removed and > > instead the driver will use existing DRM code. > > > > In addition, I know of at least 3 or 4 drivers that were submitted for review > > and are good candidates to be included in this new subsystem, instead of being > > a drm render node driver or a misc driver. > > > > [1] https://lkml.org/lkml/2022/7/31/83 > > [2] https://airlied.blogspot.com/2022/09/accelerators-bof-outcomes-summary.html > > > > Since this is new subsystem, it should have its own git tree where you > collected accelerator-related patches. No, that is never a requirement, where did you get that idea? > 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. Again, no, that has never been a requirement. > Also, it had been great if you write short, descriptive documentation > about the subsystem (maintainers handbook). Also no, this is fine, it's an RFC sent to all of the people involved in the discussions about this new subsystem. The changelog here is totally sufficient. Please do not confuse people and ask them to do things that are not requirements, that's not helpful at all. greg k-h