dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: dri-devel@lists.freedesktop.org,
	Maciej Kwapulinski <maciej.kwapulinski@linux.intel.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Christoph Hellwig <hch@infradead.org>,
	Jagan Teki <jagan@amarulasolutions.com>,
	John Hubbard <jhubbard@nvidia.com>,
	stanislaw.gruszka@intel.com,
	Jeffrey Hugo <quic_jhugo@quicinc.com>,
	Arnd Bergmann <arnd@arndb.de>, Jiho Chu <jiho.chu@samsung.com>,
	Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>,
	Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Oded Gabbay <ogabbay@kernel.org>,
	linux-kernel@vger.kernel.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Alex Deucher <alexander.deucher@amd.com>
Subject: Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major
Date: Tue, 8 Nov 2022 06:33:23 +1000	[thread overview]
Message-ID: <CAPM=9twxu3v4voSukrkror1BrajShRLY9CFxYWpL2rwK7fMiKQ@mail.gmail.com> (raw)
In-Reply-To: <Y2kyvswuCsO0x1/2@nvidia.com>

> > >
> > > "drm_minor" is not necessary anymore. Strictly managing minor numbers
> > > lost its value years ago when /dev/ was reorganized. Just use
> > > dynamic minors fully.
> > drm minor is not just about handling minor numbers. It contains the
> > entire code to manage devices that register with drm framework (e.g.
> > supply callbacks to file operations), manage their lifecycle,
> > resources (e.g. automatic free of resources on release), sysfs,
> > debugfs, etc.
>
> This is why you are having such troubles, this is already good library
> code. You don't need DRM to wrapper debugfs APIs, for instance. We
> have devm, though maybe it is not a good idea, etc
>
> Greg already pointed out the sysfs was not being done correctly
> anyhow.
>
> I don't think DRM is improving on these core kernel services. Just use
> the normal stuff directly.

At plumbers we decided a direction, I think the direction is good, if
there is refactoring to be done, I'd rather it was done in tree with a
clear direction.

Coming in now and saying we should go down a different path isn't
really helpful. We need to get rolling on this, we have drivers that
want to land somewhere now, which means we need to just get a
framework in place, leveraging drm code is the way to do it.

There is no need to an "accel" module, what does that even buy you,
the idea is to have an accel subsystem that allows drivers to use drm
features, not an accel subsystem that refactors drm features, that
would take years. There are already drivers for this subsystem wanting
to use GEM, and I don't think holding them up for a year to refactor
something that we don't have a clear reason or goal behind
refactoring.

If there is a problem with the drm subsystem interactions with the
kernel standard implementations then let's go fix that and accel will
also get fixed, but there's no reason to start going down that road at
the same time as introducing accel.

Also with the idr/xarray stuff, this isn't the patchset to be
introducing a bunch of new and divergent work, if this patchset
identifies deficiencies then let's document them and work on them in
parallel instead of blocking the initial landing in favour of some
future refactors with no in-tree users.

Dave.

  parent reply	other threads:[~2022-11-07 20:33 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02 20:34 [RFC PATCH v2 0/3] new subsystem for compute accelerator devices Oded Gabbay
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 [this message]
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='CAPM=9twxu3v4voSukrkror1BrajShRLY9CFxYWpL2rwK7fMiKQ@mail.gmail.com' \
    --to=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=arnd@arndb.de \
    --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=maciej.kwapulinski@linux.intel.com \
    --cc=ogabbay@kernel.org \
    --cc=quic_jhugo@quicinc.com \
    --cc=stanislaw.gruszka@intel.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;
as well as URLs for NNTP newsgroup(s).