mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Gary Guo" <gary@garyguo.net>
To: "Alexandre Courbot" <acourbot@nvidia.com>,
	"Matteo Kloiber" <kernel@matt3o12.de>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
	"Gary Guo" <gary@garyguo.net>,
	"Robin Murphy" <robin.murphy@arm.com>, <aliceryhl@google.com>,
	<ojeda@kernel.org>, <airlied@gmail.com>, <simona@ffwll.ch>,
	<abdiel.janulgue@gmail.com>, <daniel.almeida@collabora.com>,
	<a.hindborg@kernel.org>, <nova-gpu@lists.linux.dev>,
	<dri-devel@lists.freedesktop.org>, <driver-core@lists.linux.dev>,
	<rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] rust: scatterlist: honor the device's maximum segment size
Date: Mon, 28 Sep 2026 18:39:54 +0100	[thread overview]
Message-ID: <DLR4TIXBL0K0.3GNRPD2HU6S4T@garyguo.net> (raw)
In-Reply-To: <DLR1JCUWS824.35QJU45D2W9ZE@nvidia.com>

On Mon Sep 28, 2026 at 4:05 PM BST, Alexandre Courbot wrote:
> On Mon Sep 28, 2026 at 7:44 AM JST, Matteo Kloiber wrote:
>> First of all, thanks for merging my first two patches and sorry about my late reply.
>>
>> What I think Alex meant and what I agree with is that the new API should focus on
>> making semantic bugs harder, not to necessarily make it easier to write safer
>> drivers. That being said, I think we can do both with this change.
>>
>> The key change here is that we introduce a structure that defines dma
>> parameters for a device. This structure deliberately has no default
>> implementation and new fields should be added even if they require changes for
>> all dma drivers.
> <...>
>
> Thanks for the detailed plan; I think it mostly makes sense.
>
> A few details that we have discussed offline with Danilo:
>
> - The `probe` methods should not take the `dma::Setup` token directly,
>   but rather a bus-specific struct that contains it and can be augmented
>   with other capabilities. Drivers would have to deconstruct it using
>   the `..` operator to make sure code doesn't break if we add new tokens
>   to it.

I was quite skeptical whether the complication of adding the dma setup token is
worth the effort, but the capacity struct sounds like a very nice design as it's
infinitely extensible. I can foresee that we might want to eventually get rid of
the special `Core` typestate and just replace everything with setup
capabilities.

Best,
Gary

> - The token should not assume default parameters and only call functions
>   corresponding to parameters explicitly set; converting the token to a
>   handler means the driver acknowledged all the settings, so we should
>   not make any parameter mandatory (the doc should of course detail what
>   drivers *should* do).
>
> With that and your plan I believe you have a solid basis to send a
> RFC/PoC. :)



  reply	other threads:[~2026-09-28 17:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 23:32 [PATCH 0/2] rust: honor the maximum DMA " Matteo Kloiber
2026-08-31 23:32 ` [PATCH 1/2] gpu: nova-core: declare unlimited DMA max " Matteo Kloiber
2026-09-07  2:10   ` Alexandre Courbot
2026-09-13 21:07     ` Matteo Kloiber
2026-08-31 23:32 ` [PATCH 2/2] rust: scatterlist: honor the device's maximum " Matteo Kloiber
2026-09-07  2:43   ` Alexandre Courbot
2026-09-13 21:08     ` Matteo Kloiber
2026-09-14  0:45       ` Alexandre Courbot
2026-09-14  9:58         ` Danilo Krummrich
2026-09-14 10:22           ` Gary Guo
2026-09-14 12:17             ` Robin Murphy
2026-09-14 13:17               ` Gary Guo
2026-09-14 13:57                 ` Danilo Krummrich
2026-09-17  9:06                   ` Alexandre Courbot
2026-09-27 22:44                     ` Matteo Kloiber
2026-09-28 15:05                       ` Alexandre Courbot
2026-09-28 17:39                         ` Gary Guo [this message]
2026-09-28 18:22                           ` Danilo Krummrich
2026-09-15  4:44             ` Alexandre Courbot
2026-09-15  4:52               ` Alexandre Courbot

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=DLR4TIXBL0K0.3GNRPD2HU6S4T@garyguo.net \
    --to=gary@garyguo.net \
    --cc=a.hindborg@kernel.org \
    --cc=abdiel.janulgue@gmail.com \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=driver-core@lists.linux.dev \
    --cc=kernel@matt3o12.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=ojeda@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    /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

all inboxes | Powered by JetHome®