Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp56537rwb; Sat, 17 Sep 2022 00:25:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM66HLbP5Ij8bYZXO1q5RIGAAHDXQtks5Ab71zximYKyGDg72CPL0qc3dzNOCRdGAzFSRrOo X-Received: by 2002:a17:90a:ac10:b0:202:9880:4cae with SMTP id o16-20020a17090aac1000b0020298804caemr9183188pjq.173.1663399551817; Sat, 17 Sep 2022 00:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663399551; cv=none; d=google.com; s=arc-20160816; b=U/deTEAF0GLdCioki+xX3hpGmTfQnJdsbWkiiBrUG2hEhRc5z2QjusapleObPi7nVa ad/KyIj6qrXhje71b+Hrnn76Zwzya8JhYrecYjQzA7Jktb9hN106kFRzU5kQ658a65DH 99zkUU18WuqcmdT8XC3rSw+6UC6/z/E6x4nyK4FM0s8KZ8npxIz7pQG8KXcXdF3Glg+1 9ARb1fYPFxQEsrdAwE8WThopua3RW7C8eoFLrN4oDn89cw2+DtEQjge7YfQSu8eZ5Kf8 3agpE4j2IjTHM8jP7bo2QtHxoHNsj9lNiGMNSU3xnjHpL7Xx7STExyHDpZy92lqmY3Wr JomA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature:dkim-filter; bh=h/4r2gEtnptD3nTlpYtosI79Zc0cl2MuMZT/t5g8j7c=; b=FYLu82ej6Tv23FQNig40GcGJCKa7Hh0GFOLKO1waVy8CwSBrx/hE/8MjVWgqya/YYC GVEwc1O2O4CY7KqKExv7yEMkJirpaKC72zA+Oc9EeWxMp4OB3F+BHhnVFsHK1FPqQD/G OvP2sonWWASKdRAQXNCNg+Tk9elMMoI8QJkkoH8xQhyQek4yt9vi+tknR7u7iawWT2mT VYZ6bPj+ccYWwkaPvrwSWE2f0qHysCN9CHi+sUX0GJDd94V+vulegqX3+sHGJIt5G9Y4 oIRLlqOCrOYk5SPRJMH4AHr+dpge+X0wmH3/nPriqcmpb3Hke14HzTjuwuFvghWqqyfF spJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=a3JQfVXN; 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=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 136-20020a63028e000000b00439d071c11fsi2002298pgc.118.2022.09.17.00.25.40; Sat, 17 Sep 2022 00:25:51 -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=@samsung.com header.s=mail20170921 header.b=a3JQfVXN; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229452AbiIQHYl (ORCPT + 99 others); Sat, 17 Sep 2022 03:24:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbiIQHYK (ORCPT ); Sat, 17 Sep 2022 03:24:10 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A836B45F7B for ; Sat, 17 Sep 2022 00:24:05 -0700 (PDT) Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20220917072359epoutp0191f0f9c55b1451bf8e7ebb8d1607dd1d~VlPojJrgx2007820078epoutp01Y for ; Sat, 17 Sep 2022 07:23:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20220917072359epoutp0191f0f9c55b1451bf8e7ebb8d1607dd1d~VlPojJrgx2007820078epoutp01Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1663399439; bh=h/4r2gEtnptD3nTlpYtosI79Zc0cl2MuMZT/t5g8j7c=; h=From:To:Cc:Subject:Date:References:From; b=a3JQfVXNDPB2lTf/XD4EHD3dsjbJXI66BvMIE4VA616AVWS32kGgCzTm+6urD0DCl HdmfDXT7DewJ0jnsjeLkYraw+s8cJlpJA2pPERMi49n4O9etDVwPPiFId3IVA+WBVG s/uJJ6QsxZEXqin05d+jZVMKjUInEjDnm4nwZVkQ= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20220917072358epcas1p1321a2b30b98d399b138f1354bf507725~VlPn9n06a0249502495epcas1p1U; Sat, 17 Sep 2022 07:23:58 +0000 (GMT) Received: from epsmges1p2.samsung.com (unknown [182.195.38.232]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4MV2Vj5fmkz4x9Px; Sat, 17 Sep 2022 07:23:57 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 7B.71.51827.D0675236; Sat, 17 Sep 2022 16:23:57 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p3.samsung.com (KnoxPortal) with ESMTPA id 20220917072357epcas1p3fea7d947782d9ce58d91249533e0c1f7~VlPmUAIq_0974609746epcas1p3Q; Sat, 17 Sep 2022 07:23:57 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220917072357epsmtrp25cc98e975fa0587e14882dbf1a216ff7~VlPmSuZ0W1654916549epsmtrp2s; Sat, 17 Sep 2022 07:23:57 +0000 (GMT) X-AuditID: b6c32a36-f25ff7000000ca73-27-6325760d68ee Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 63.F0.18644.C0675236; Sat, 17 Sep 2022 16:23:56 +0900 (KST) Received: from localhost.localdomain (unknown [10.113.113.58]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220917072356epsmtip208adf45c36e874da31948459d2147ece~VlPmECPXb0131701317epsmtip2S; Sat, 17 Sep 2022 07:23:56 +0000 (GMT) From: Jiho Chu To: gregkh@linuxfoundation.org, arnd@arndb.de, ogabbay@kernel.org, krzysztof.kozlowski@linaro.org, broonie@kernel.org Cc: linux-kernel@vger.kernel.org, yelini.jeong@samsung.com, myungjoo.ham@samsung.com, jiho.chu@samsung.com Subject: [PATCH v2 00/13] Samsung Trinity NPU device driver-v2 Date: Sat, 17 Sep 2022 16:23:43 +0900 Message-Id: <20220917072356.2255620-1-jiho.chu@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgk+LIzCtJLcpLzFFi42LZdlhTX5e3TDXZ4EarpsXfScfYLaY+fMJm 0bx4PZvF++7dzBZ7X29lt7i8aw6bxe3GFWwW+3o+Mlo8n3adxYHT4/evSYwem1Z1snncubaH zWP/3DXsHn1bVjF6fN4kF8AWlW2TkZqYklqkkJqXnJ+SmZduq+QdHO8cb2pmYKhraGlhrqSQ l5ibaqvk4hOg65aZA3SVkkJZYk4pUCggsbhYSd/Opii/tCRVISO/uMRWKbUgJafAtECvODG3 uDQvXS8vtcTK0MDAyBSoMCE7Y97CdYwFPxQqFvT4NzA+lOxi5OCQEDCR6H3C2sXIxSEksINR YsatGYwQzidGifu77jFBOJ8ZJZ5t/c/WxcgJ1tF86hJ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vYHwo2cXIySEh YCLRfOoSaxcjF4eQwA5GiW/Pj7NAJCQkNt1bztzFyAFkC0scPlwMUfORUeJT+wVmkBo2AVWJ mTPWsIPYIgK1EgePzgeLMwsUSMx+OhNsjrCAnUTLkw9sIDYLUP2kHdPA4rwC1hKzFk5ghrAF JU7OfMIC0Ssv0bx1NvMERt5ZSFKzkKQWMDKtYpRMLSjOTc8tNiwwykst1ytOzC0uzUvXS87P 3cQIDlQtrR2Me1Z90DvEyMTBeIhRgoNZSYRX1VMlWYg3JbGyKrUoP76oNCe1+BCjNAeLkjjv ha6T8UIC6YklqdmpqQWpRTBZJg5OqQamkxeeLv94XFLyrgxbkan/lD0HFvy78eb0revcJ67a 66qkt/245cnSojlxvtTtUobHGz02hG31XMJ+7ZZJ2MwJIT8FW21lJrefknzEf/+QZHZczun7 G5TCPmZPmXAjfGq0bM3bW1NS2VNqrX5mS+0Uns8xPzP49aaNjV4/vXtnXuhwtOvwSb9SwLJ/ 7cTe7TJPUjK0ndTjuiyXbeI2EznBvjFF5PyhtZVn5ILOzlj21kdmkd/DZ1wsukGT80+pHy5s NP/SouiXV5ToOeHZxlcRpgwfq3XCjGYdMXw2b0nQr12nVOd3Gm5benKmBrO96ZLGGb8E8m4w Lmj5I1Twznan1dQXn12jDN9wq3czLEg9rsRSnJFoqMVcVJwIACUIm/PDAgAA X-CMS-MailID: 20220917072357epcas1p3fea7d947782d9ce58d91249533e0c1f7 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220917072357epcas1p3fea7d947782d9ce58d91249533e0c1f7 References: 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 Hello, This patch set is v2 of Samsung Trinity NPU driver. As reviews of v1, unnecessary logs are removed, and essential documents including binding and ABI are presented. There were some violations like user space access, abstraction and open count. They modified in right way as much as possible, but if there are any faults, please let me know. Unnecessary functions are removed, and each patch is reduced in size for better reading. Thanks for reviews. The main changes are: Since V2: - Remove all tracing info logs - Remove abstraction layer for scheduler - Remove access to user space file - USE IDA to generate id - Add ABI document for sysfs - Add dt-bindings document - Use default group for sysfs Link to v1: https://lore.kernel.org/all/20220725065308.2457024-1-jiho.chu@samsung.com/ I would highly appreciate your feedback. Reviews, questions or anythings. Thanks, Jiho Chu Jiho Chu (13): trinity: Add base driver tirnity: Add memory module trinity: Add IDU feature trinity: Add schduler module trinity: Add debugfs module trinity: add statistics module trinity: Add sysfs module trinity: Add ioctl feature trinity: Add request and pm feature trinity: Add profile module trinity: Add trace module MAINTAINERS: add TRINITY driver dt-bindings: arm: Add Samsung Trinity bindings .../ABI/testing/sysfs-driver-trinity | 55 + .../bindings/arm/samsung,trinity.yaml | 115 ++ MAINTAINERS | 8 + drivers/misc/Kconfig | 1 + drivers/misc/Makefile | 1 + drivers/misc/trinity/Kconfig | 25 + drivers/misc/trinity/Makefile | 13 + drivers/misc/trinity/trinity.c | 1019 ++++++++++ drivers/misc/trinity/trinity_common.h | 437 +++++ drivers/misc/trinity/trinity_debug.c | 331 ++++ drivers/misc/trinity/trinity_dma.c | 83 + drivers/misc/trinity/trinity_dma.h | 87 + drivers/misc/trinity/trinity_hwmem.c | 380 ++++ drivers/misc/trinity/trinity_hwmem.h | 81 + drivers/misc/trinity/trinity_sched.c | 338 ++++ drivers/misc/trinity/trinity_sched.h | 24 + drivers/misc/trinity/trinity_stat.c | 898 +++++++++ drivers/misc/trinity/trinity_stat.h | 56 + drivers/misc/trinity/trinity_sysfs.c | 667 +++++++ drivers/misc/trinity/trinity_trace.c | 15 + drivers/misc/trinity/trinity_trace.h | 329 ++++ drivers/misc/trinity/trinity_vision2_drv.c | 1685 +++++++++++++++++ .../misc/trinity/trinity_vision2_profile.h | 324 ++++ drivers/misc/trinity/trinity_vision2_regs.h | 210 ++ include/uapi/misc/trinity.h | 476 +++++ 25 files changed, 7658 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-trinity create mode 100644 Documentation/devicetree/bindings/arm/samsung,trinity.yaml create mode 100644 drivers/misc/trinity/Kconfig create mode 100644 drivers/misc/trinity/Makefile create mode 100644 drivers/misc/trinity/trinity.c create mode 100644 drivers/misc/trinity/trinity_common.h create mode 100644 drivers/misc/trinity/trinity_debug.c create mode 100644 drivers/misc/trinity/trinity_dma.c create mode 100644 drivers/misc/trinity/trinity_dma.h create mode 100644 drivers/misc/trinity/trinity_hwmem.c create mode 100644 drivers/misc/trinity/trinity_hwmem.h create mode 100644 drivers/misc/trinity/trinity_sched.c create mode 100644 drivers/misc/trinity/trinity_sched.h create mode 100644 drivers/misc/trinity/trinity_stat.c create mode 100644 drivers/misc/trinity/trinity_stat.h create mode 100644 drivers/misc/trinity/trinity_sysfs.c create mode 100644 drivers/misc/trinity/trinity_trace.c create mode 100644 drivers/misc/trinity/trinity_trace.h create mode 100644 drivers/misc/trinity/trinity_vision2_drv.c create mode 100644 drivers/misc/trinity/trinity_vision2_profile.h create mode 100644 drivers/misc/trinity/trinity_vision2_regs.h create mode 100644 include/uapi/misc/trinity.h -- 2.25.1