Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2687687imn; Tue, 2 Aug 2022 12:09:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR52rcCeuKPxXIESozgind9K2Bly04Bzv236hLwe/g2DGAwAzuAYI6gKgp85nAG4zqNlbXUO X-Received: by 2002:aa7:88d1:0:b0:52e:f8e:aab5 with SMTP id k17-20020aa788d1000000b0052e0f8eaab5mr1052675pff.63.1659467340156; Tue, 02 Aug 2022 12:09:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659467340; cv=none; d=google.com; s=arc-20160816; b=aodf7XwRoXQpXljDUz/q3+XHqTr8gtmbL6+IV+Y9Kf1sgNMqyA62orbXLdi1dlQZ9e E4TxxNV78a7CYAzGLFb5A8slCCHeNV+q0LOXnwqa73uuVE6gFXjHhmQjhCtAaht34E9M QTG59aEx0cqhgZkB1Ub0dHF7nBuOPsgA+sq04hSwBe0wHIFBgv09g8P9QF0R3nAuRbL6 GIeW1D6VSj7Lzlw8IrlXy5vedJl70oNzs3UozNB/JRuUZHGlU/51aNSqca+J3VSP4MYB sTTL0RJgV/DH8pXvBk/clb/XGSr4qua9Pvyy/XzO3171ezYtZqfGKOCCnUBmSDzvexXv tjYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=PwHROmjdSzYzm0sxl+mb0D7nS/Dpj+aOGIkG9xrIgpc=; b=lNIB5BovaeNmr5JPL8On0PXuoWBRbU1DoFLC+tJPoyfc8lk1u5MR3ApEu15Smoe7cr BFe2Uu+Cx8AZiNxVbOH4NKItCc+eEomr1X2wGVLmQK6OuUsVMlKlag3Rsu2CiTFKQdSd twHdAPoAMOpfvQ7Fk26VxFp6GquLi0tJdnHMp95E1jfGog/llowFbLMqh3XgpkUFCzIL dQSnpewHAeHCr1lVukdZGvHM2rALLjF6okdKVAqjAWI6l2qjDyHaUzrI4/NaV8rb8irh 3OVUoRNfp3mxBvwXryl7tEFGrI6oNUSXar3iW2tcsg96ldkLPBgr2nHKQ+Fqu1ulHxUo MM8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=f7Zl01K4; 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 p20-20020a170902b09400b0016dbc1b5b31si157650plr.61.2022.08.02.12.08.44; Tue, 02 Aug 2022 12:09:00 -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=f7Zl01K4; 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 S231308AbiHBTIH (ORCPT + 99 others); Tue, 2 Aug 2022 15:08:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229864AbiHBTIG (ORCPT ); Tue, 2 Aug 2022 15:08:06 -0400 Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2286DF81 for ; Tue, 2 Aug 2022 12:08:05 -0700 (PDT) Received: by mail-oi1-x22a.google.com with SMTP id w72so13242054oiw.6 for ; Tue, 02 Aug 2022 12:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=PwHROmjdSzYzm0sxl+mb0D7nS/Dpj+aOGIkG9xrIgpc=; b=f7Zl01K4rflUNsIJYdTnIL/qMwNba+cHm1OwmbHUKs0Uc1E/UxPLCnG4kO+M/tZ1XG cdM0lVuixLt7Vy6sC3Oy4JmK4FAVsibGAf1yztWBj9ZWY22Cnydya4BN0EVOXkqfiikM CxOH+8O72Gl6rAldJA0XveG2ofNI/WENHCl8n6nGBdbVCKr/VU7tdBwJd8iNi1uxVn39 nYYYg5zlkfSzwL13wcXUocP8Mp/h1KjKtpwevOTvf7MIDB1/HH87w8Bge/WleyDf9ed5 2PCB+0Q47nMjtXQ5sf42cQmfcXzp8fd71u1/EnByY9cjijv9nNTke7pett7wqIVrO705 D5Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=PwHROmjdSzYzm0sxl+mb0D7nS/Dpj+aOGIkG9xrIgpc=; b=SiCGgCGx60M0igwtQ0kCC7PBPbLH8GR4WnFqO99V8sTMwDEHzbP79ZQR+TtOXO0jsw R2Aea5YnKlj2Fpr+/d84XvY+v5RI48ZHE8UhlThpJFDJuhx2djIm1K8/n9MPZQRfcEYV L3HtIEpKyawxI4wiax9YB+nYugPP9k9UTlT7WCbZFzeOAd90EmafQPohdA6IKsB8orJB 14igIqLveVHKXs8pvGqI64Cp/sQ7OC/JQZZG0RxUmkG6XGNsouWW0rKy3q4IFN1FW/AF T4IxPeiqVNG4uuCkM0PWMaDT51OKcGHDfWra8Y9Lfw2uy8ChfdTSmen/hP5IlX+KFHcJ f/Og== X-Gm-Message-State: ACgBeo38o7pBdHB9139j8/rHCTodGrhUzLiQcCEWvXGjHdQxEAZXRUiy NcB26O5iza8ox/uSCEgxoEe/r2CcR5DQF081ceAL4PZxCF0= X-Received: by 2002:a05:6808:11cc:b0:32e:7fc5:3a49 with SMTP id p12-20020a05680811cc00b0032e7fc53a49mr359789oiv.166.1659467284951; Tue, 02 Aug 2022 12:08:04 -0700 (PDT) MIME-Version: 1.0 References: <20220803022549.cc12d4b82fb05974214f8b23@samsung.com> In-Reply-To: <20220803022549.cc12d4b82fb05974214f8b23@samsung.com> From: Oded Gabbay Date: Tue, 2 Aug 2022 22:07:38 +0300 Message-ID: Subject: Re: New subsystem for acceleration devices To: Jiho Chu Cc: Yuji Ishikawa , Greg Kroah-Hartman , Arnd Bergmann , "Linux-Kernel@Vger. Kernel. Org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Tue, Aug 2, 2022 at 8:25 PM Jiho Chu wrote: > > On Sun, 31 Jul 2022 14:45:34 +0300 > Oded Gabbay wrote: > > > Hi, > > Greg and I talked a couple of months ago about preparing a new accel > > subsystem for compute/acceleration devices that are not GPUs and I > > think your drivers that you are now trying to upstream fit it as well. > > > > Would you be open/interested in migrating your drivers to this new subsystem ? > > > > Because there were no outstanding candidates, I have done so far only > > a basic and partial implementation of the infrastructure for this > > subsystem, but if you are willing to join I believe I can finish it > > rather quickly. > > > > At start, the new subsystem will provide only a common device > > character (e.g. /dev/acX) so everyone will do open/close/ioctl on the > > same device character. Also sysfs/debugfs entries will be under that > > device and maybe an IOCTL to retrieve information. > > > > In the future I plan to move some of habanalabs driver's code into the > > subsystem itself, for common tasks such as memory management, dma > > memory allocation, etc. > > > > Of course, you will be able to add your own IOCTLs as you see fit. > > There will be a range of IOCTLs which are device-specific (similar to > > drm). > > > > wdyt ? > > > > Thanks, > > Oded > > > > Hi, Oded. > Thanks for sharing your idea. And I'm really positive on the subsystem for ai acceleration devices. > > Samsung NPU driver is trying to upstream now, so I wonder new subsystem can cover all of the operations. > I'll appreciate if you share the code when you ready, so I can figure out our driver can be migrated. I'm working on it. I'm also preparing a small demo driver so you will be able to better understand how to integrate a driver with this subsystem. I believe I will be able to post the link during the weekend. Oded > > Sincerely, > Jiho Chu > > > > >