public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oded Gabbay <ogabbay@kernel.org>
To: David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Jason Gunthorpe <jgg@nvidia.com>,
	John Hubbard <jhubbard@nvidia.com>,
	Alex Deucher <alexander.deucher@amd.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>,
	Jiho Chu <jiho.chu@samsung.com>,
	Daniel Stone <daniel@fooishbar.org>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	Jeffrey Hugo <quic_jhugo@quicinc.com>,
	Christoph Hellwig <hch@infradead.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jagan Teki <jagan@amarulasolutions.com>,
	Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>,
	Maciej Kwapulinski <maciej.kwapulinski@linux.intel.com>
Subject: [RFC PATCH v2 0/3] new subsystem for compute accelerator devices
Date: Wed,  2 Nov 2022 22:34:02 +0200	[thread overview]
Message-ID: <20221102203405.1797491-1-ogabbay@kernel.org> (raw)

This is the second version of the RFC following the comments given on the
first version. Nothing materially has changed in regard to how accel
devices are registered and exposed to user-space. The changes are mostly
re-factoring according to the comments.

Changes since v1:
- Instead of embedding the accel code inside drm core functions, create
  accel_drv.c to hold all the new core code and call that code from
  DRM core.

- Replace deprecated IDR with xarray to manage the accel minors.

- Remove all #ifdef from drm_drv.c. Instead, there are empty inline
  implementations in a new header file drm_accel.h (in include/drm/) that
  will be compiled in case CONFIG_ACCEL is set to 'N'.

- Patch-set organization is a bit different:
  - Patch 1 introduces the accel major code and the new Kconfig.
  - Patch 2 introduces the accel minor code.
  - Patch 3 adds the call to accel functions from DRM core code.

I still haven't added formal documentation as I want to make sure the
general design of the new version is acceptable. If there won't be any
major comments, I'll add the documentation and send the next version as
the version to be merged to drm-next.

The patches are in the following repo:
https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/accel.git/log/?h=accel_v2

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

Thanks,
Oded.

Oded Gabbay (3):
  drivers/accel: define kconfig and register a new major
  accel: add dedicated minor for accelerator devices
  drm: initialize accel framework

 Documentation/admin-guide/devices.txt |   5 +
 MAINTAINERS                           |   8 +
 drivers/Kconfig                       |   2 +
 drivers/Makefile                      |   3 +
 drivers/accel/Kconfig                 |  24 +++
 drivers/accel/Makefile                |  10 +
 drivers/accel/accel_drv.c             | 281 ++++++++++++++++++++++++++
 drivers/gpu/drm/drm_drv.c             |  98 ++++++---
 drivers/gpu/drm/drm_file.c            |   2 +-
 drivers/gpu/drm/drm_sysfs.c           |  24 ++-
 include/drm/drm_accel.h               |  58 ++++++
 include/drm/drm_device.h              |   3 +
 include/drm/drm_drv.h                 |   8 +
 include/drm/drm_file.h                |  21 +-
 14 files changed, 513 insertions(+), 34 deletions(-)
 create mode 100644 drivers/accel/Kconfig
 create mode 100644 drivers/accel/Makefile
 create mode 100644 drivers/accel/accel_drv.c
 create mode 100644 include/drm/drm_accel.h

--
2.25.1


             reply	other threads:[~2022-11-02 20:34 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02 20:34 Oded Gabbay [this message]
2022-11-02 20:34 ` [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major Oded Gabbay
2022-11-02 21:04   ` Jeffrey Hugo
2022-11-03 13:28     ` Oded Gabbay
2022-11-02 22:58   ` Randy Dunlap
2022-11-03 13:29     ` Oded Gabbay
2022-11-03  0:32   ` Greg Kroah-Hartman
2022-11-03 13:31     ` Oded Gabbay
2022-11-03 20:39       ` Oded Gabbay
2022-11-03 23:01         ` Randy Dunlap
2022-11-04  7:23           ` Stanislaw Gruszka
2022-11-07 12:56         ` Jason Gunthorpe
2022-11-07 13:01           ` Oded Gabbay
2022-11-07 13:10             ` Jason Gunthorpe
2022-11-07 13:25               ` Stanislaw Gruszka
2022-11-07 14:02               ` Oded Gabbay
2022-11-07 14:10                 ` Jason Gunthorpe
2022-11-07 15:53                   ` Oded Gabbay
2022-11-07 16:30                     ` Jason Gunthorpe
2022-11-07 19:27                       ` Oded Gabbay
2022-11-07 20:33                       ` Dave Airlie
2022-11-08 12:28                         ` Jason Gunthorpe
2022-11-09  7:22                           ` Dave Airlie
2022-11-07 20:18               ` Dave Airlie
2022-11-02 20:34 ` [RFC PATCH v2 2/3] accel: add dedicated minor for accelerator devices Oded Gabbay
2022-11-02 21:17   ` Jeffrey Hugo
2022-11-06 10:51     ` Oded Gabbay
2022-11-03  5:25   ` Jiho Chu
2022-11-06 10:54     ` Oded Gabbay
2022-11-06 14:15       ` Oded Gabbay
2022-11-02 20:34 ` [RFC PATCH v2 3/3] drm: initialize accel framework Oded Gabbay
2022-11-02 21:30   ` Jeffrey Hugo
2022-11-06 10:55     ` Oded Gabbay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221102203405.1797491-1-ogabbay@kernel.org \
    --to=ogabbay@kernel.org \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=arnd@arndb.de \
    --cc=daniel@ffwll.ch \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=jacek.lawrynowicz@linux.intel.com \
    --cc=jagan@amarulasolutions.com \
    --cc=jgg@nvidia.com \
    --cc=jhubbard@nvidia.com \
    --cc=jiho.chu@samsung.com \
    --cc=khilman@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maciej.kwapulinski@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=quic_jhugo@quicinc.com \
    --cc=tvrtko.ursulin@linux.intel.com \
    --cc=tzimmermann@suse.de \
    --cc=yuji2.ishikawa@toshiba.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox