Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2908973rdb; Fri, 22 Sep 2023 11:40:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHbQ4P3Pjh6V05Z0Y57QJjRGF+/riSerKEVPn9EMberU8NyyH83lv2njc3EDH+HaAIc4zrC X-Received: by 2002:a05:6a20:96d7:b0:14c:a2e1:65ec with SMTP id hq23-20020a056a2096d700b0014ca2e165ecmr362007pzc.38.1695408047992; Fri, 22 Sep 2023 11:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695408047; cv=none; d=google.com; s=arc-20160816; b=FUGHhTiHcRmIKxWnnrH3ATG7YqgQFFxNZnbrKaRwiG1mSG4Ws0oPUEhhPwcrUl6dIy mNl2zSuqH48LDsX4NaxAxcJAWPyQUN/R2PMY6STVufRK578V0r63bj3ZC2G/zF+hS4T4 neZuXXajGTToII5pEy5r6KVaWHksTgVbejSTi59wIbwsz5TTgLliw6OHM5aAXYTVyfKg TUlWtf8TIBKj8Dj8Rrh2mXG+6uok94fjXZGlNqWd4zl8og5jdVgmqni87snKpQVo38Y8 swhm3WxABDhrLM3KeSCnmcdBdYmSVIcWy76Dp91SeqbKIXO+lbVXbKSWpHvM8z8m3xU5 VXwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=0dJ0bpjUFMb41ig3nRVBYbo1H+UuXlIsHzLPSXBCkXQ=; fh=LejOxwyHNMW66HRtSfhnbPTOahVeT11HWAHsdozjqUU=; b=aRk22R/H9G1OL3qy0RjCK7/FfpUH/nXHTVJmCRVAEUddp+JRsHWVKEogqP3Nq9/XwL PQOhRSw+IDePs5SzF66FAl1u75pLqatjZRnm+m/e+KFjmTqHyVUj3zq3a26aHBfC4sv3 Tr5iWZTgWSgEPMTjVWpv72A+zgY4VX9W9BgrGcGr2JymECV7UOiPujKPTPTMQd4vHjuH w93kfaEz72r2Y9cHRt5vIqW4fs9ABthV2tAAmjzu3pYkGF6/2yNy2uYyTymRg08luL9w GClj6hn5cgiTqDpgVTW4tD+eAwaGY9V2QNMd/WIXzDFcICmazmLRwWrQfXZbYXPLhQNk izbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tYrrz2Jt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b130-20020a633488000000b005775e2a7951si4151522pga.345.2023.09.22.11.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 11:40:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tYrrz2Jt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 38ED3810438F; Fri, 22 Sep 2023 08:09:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232324AbjIVPJN (ORCPT + 99 others); Fri, 22 Sep 2023 11:09:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232056AbjIVPJM (ORCPT ); Fri, 22 Sep 2023 11:09:12 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94A1CC6; Fri, 22 Sep 2023 08:09:06 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36140C433C8; Fri, 22 Sep 2023 15:09:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695395346; bh=XsXHh90rL5Oxz0o4/7pmVqXNIDZlKcy9P9sRX+xLwE8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=tYrrz2Jtz5yuQkLWbKIj5PUSQ5gakrnfGiL/P2cbSrXvmawjo7OmJBMcZQK+xcjtu vyD4uuAuZygWuXsQPfJAYe/rsgKiZ8v07oU11krDKlbJSBgHOmGm97KbtmilSQT+Lp 574G9bAn3TEnJZmg3V+0tw69bXAkak3zKv5hveTo1kGfh4t4biM250lC6p+iDo7PUF /POOC6MsthXVhyaKl2OU1mXbd1KIVD15wMq67m54udKHe2VWgM/8TqOHIJgvnmOo00 RRhuQ1y5lZWAZaeH+NORmVwlxBw6lybEF/6yso6/8mfb3/VRliMY8SuKsgbElFJioa Vw+dxVzbTsI1A== Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-59c268676a9so26705717b3.0; Fri, 22 Sep 2023 08:09:06 -0700 (PDT) X-Gm-Message-State: AOJu0YwlDTiNg7BiAwHenkacGSl+FDR1F8Lo2KT+SVw0KbiB0N6tnSjS ZyS9pRx71a0lfBKsXUlCZ81IQk3VAvJk5nqbxsg= X-Received: by 2002:a0d:c8c1:0:b0:59b:c6a4:15c7 with SMTP id k184-20020a0dc8c1000000b0059bc6a415c7mr9129453ywd.46.1695395345308; Fri, 22 Sep 2023 08:09:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Oded Gabbay Date: Fri, 22 Sep 2023 18:08:38 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: kernel.org 6.5.4 , NPU driver, --not support (RFC) To: Jagan Teki Cc: Cancan Chang , linux-media , linux-kernel , Dave Airlie , Daniel Vetter Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 22 Sep 2023 08:09:11 -0700 (PDT) On Fri, Sep 22, 2023 at 12:38=E2=80=AFPM Jagan Teki wrot= e: > > On Fri, 22 Sept 2023 at 15:04, Cancan Chang wr= ote: > > > > Dear Media Maintainers: > > Thanks for your attention. Before describing my problem=EF=BC=8Cle= t me introduce to you what I mean by NPU. > > NPU is Neural Processing Unit, It is designed for deep learning ac= celeration, It is also called TPU, APU .. > > > > The real problems: > > When I was about to upstream my NPU driver codes to linux mainlin= e, i meet two problems: > > 1. According to my research, There is no NPU module path in th= e linux (base on linux 6.5.4) , I have searched all linux projects and foun= d no organization or comany that has submitted NPU code. Is there a path pr= epared for NPU driver currently? > > 2. If there is no NPU driver path currently, I am going to pu= t my NPU driver code in the drivers/media/platform/amlogic/ =EF=BB=BF, beca= use my NPU driver belongs to amlogic. and amlogic NPU is mainly used for AI= vision applications. Is this plan suitabe for you? > > If I'm correct about the discussion with Oded Gabby before. I think > the drivers/accel/ is proper for AI Accelerators including NPU. > > + Oded in case he can comment. > > Thanks, > Jagan. Thanks Jagan for adding me to this thread. Adding Dave & Daniel as well. Indeed, the drivers/accel is the place for Accelerators, mainly for AI/Deep-Learning accelerators. We currently have 3 drivers there already. The accel subsystem is part of the larger drm subsystem. Basically, to get into accel, you need to integrate your driver with the drm at the basic level (registering a device, hooking up with the proper callbacks). ofc the more you use code from drm, the better. You can take a look at the drivers under accel for some examples on how to do that. Could you please describe in a couple of sentences what your accelerator does, which engines it contains, how you program it. i.e. Is it a fixed-function device where you write to a couple of registers to execute workloads, or is it a fully programmable device where you load compiled code into it (GPU style) ? For better background on the accel subsystem, please read the following: https://docs.kernel.org/accel/introduction.html This introduction also contains links to other important email threads and to Dave Airlie's BOF summary in LPC2022. Thanks, Oded