From patchwork Sat Nov 19 20:44:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 13049807 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 092C5C433FE for ; Sat, 19 Nov 2022 20:44:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B006210E02E; Sat, 19 Nov 2022 20:44:48 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id EF69810E10A for ; Sat, 19 Nov 2022 20:44:46 +0000 (UTC) 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 CBC5960BAA; Sat, 19 Nov 2022 20:44:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5989C433C1; Sat, 19 Nov 2022 20:44:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668890685; bh=MmB0kiiRS0fZ8FYGoiHwWYca4qOtCXkpxetHnZytkyM=; h=From:To:Cc:Subject:Date:From; b=YTlMpSOs6F34vvnrgMqsizuCW87N2FIyluvDo0yLv4T4YCtJpNnC0HiGUlL4rQudz HjVDrGpzZ2iqPrR+J1EUskL5gVMb4yacrW2pTSvgXJ4aww5lOWilcPWAgB7vjdRvqB x9EYgLuEM3GZTOaZyWKx3UPGgCv6yQXcr5Tw+IopltmQ0eUQ6Gxodgtx/nvisAsGFv uEscs7DhaSC+EJXFyeBHqnxYwQGJZXXqA5H07VQCUDuxDYBpCc5xsQ9FTUdHDNVpZF uahbGajimfLAm0/hgsIEL5EUPJe42FFD83l9RGot815k56yOHhPjfaRBUOxZIJ2nP1 RkV8iGIY9ltbg== From: Oded Gabbay To: David Airlie , Daniel Vetter , Greg Kroah-Hartman Subject: [PATCH v4 0/4] new subsystem for compute accelerator devices Date: Sat, 19 Nov 2022 22:44:31 +0200 Message-Id: <20221119204435.97113-1-ogabbay@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tvrtko Ursulin , Jacek Lawrynowicz , Jeffrey Hugo , Jason Gunthorpe , Arnd Bergmann , Jiho Chu , John Hubbard , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Christoph Hellwig , Christopher Friedt , Thomas Zimmermann , Kevin Hilman , Alex Deucher , Yuji Ishikawa , Maciej Kwapulinski , Jagan Teki Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is the fourth (and hopefully last) version of the patch-set to add the new subsystem for compute accelerators. I removed the RFC headline as I believe it is now ready for merging. Compare to v3, this patch-set contains one additional patch that adds documentation regarding the accel subsystem. I hope it's good enough for this stage. In addition, there were few very minor fixes according to comments received on v3. The patches are in the following repo: https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/accel.git/log/?h=accel_v4 As in v3, The HEAD of that branch is a commit adding a dummy driver that registers an accel device using the new framework. This can be served as a simple reference. v1 cover letter: https://lkml.org/lkml/2022/10/22/544 v2 cover letter: https://lore.kernel.org/lkml/20221102203405.1797491-1-ogabbay@kernel.org/T/ v3 cover letter: https://lore.kernel.org/lkml/20221106210225.2065371-1-ogabbay@kernel.org/T/ Thanks, Oded. Oded Gabbay (4): drivers/accel: define kconfig and register a new major accel: add dedicated minor for accelerator devices drm: initialize accel framework doc: add documentation for accel subsystem Documentation/accel/index.rst | 17 ++ Documentation/accel/introduction.rst | 109 +++++++++ Documentation/admin-guide/devices.txt | 5 + Documentation/subsystem-apis.rst | 1 + MAINTAINERS | 9 + drivers/Kconfig | 2 + drivers/accel/Kconfig | 24 ++ drivers/accel/drm_accel.c | 323 ++++++++++++++++++++++++++ drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_drv.c | 102 +++++--- drivers/gpu/drm/drm_file.c | 2 +- drivers/gpu/drm/drm_sysfs.c | 24 +- include/drm/drm_accel.h | 97 ++++++++ include/drm/drm_device.h | 3 + include/drm/drm_drv.h | 8 + include/drm/drm_file.h | 21 +- 16 files changed, 711 insertions(+), 37 deletions(-) create mode 100644 Documentation/accel/index.rst create mode 100644 Documentation/accel/introduction.rst create mode 100644 drivers/accel/Kconfig create mode 100644 drivers/accel/drm_accel.c create mode 100644 include/drm/drm_accel.h Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jeffrey Hugo Reviewed-by: Dave Airlie Acked-by: Thomas Zimmermann Acked-by: Alex Deucher Acked-by: Alex Deucher Acked-by: Jacek Lawrynowicz Tested-by: Jacek Lawrynowicz Acked-by: Maxime Ripard Acked-by: Sonal Santan Acked-by: Daniel Stone --- 2.25.1