From: Boris Brezillon <boris.brezillon@collabora.com>
To: Steven Price <steven.price@arm.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>,
dri-devel@lists.freedesktop.org,
Alyssa Rosenzweig <alyssa@collabora.com>,
Rob Herring <robh+dt@kernel.org>,
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH v3 5/7] drm/panfrost: Add a new ioctl to submit batches
Date: Mon, 5 Jul 2021 10:43:19 +0200 [thread overview]
Message-ID: <20210705104319.7b709530@collabora.com> (raw)
In-Reply-To: <a059fc1a-2596-314c-ace8-c3bd44d1b052@arm.com>
Hi Steven,
On Mon, 5 Jul 2021 09:22:39 +0100
Steven Price <steven.price@arm.com> wrote:
> On 02/07/2021 19:11, Boris Brezillon wrote:
> > On Fri, 2 Jul 2021 12:49:55 -0400
> > Alyssa Rosenzweig <alyssa@collabora.com> wrote:
> >
> >>>> ```
> >>>>> #define PANFROST_BO_REF_EXCLUSIVE 0x1
> >>>>> +#define PANFROST_BO_REF_NO_IMPLICIT_DEP 0x2
> >>>> ```
> >>>>
> >>>> This seems logically backwards. NO_IMPLICIT_DEP makes sense if we're
> >>>> trying to keep backwards compatibility, but here you're crafting a new
> >>>> interface totally from scratch. If anything, isn't BO_REF_IMPLICIT_DEP
> >>>> the flag you'd want?
> >>>
> >>> AFAICT, all other drivers make the no-implicit-dep an opt-in, and I
> >>> didn't want to do things differently in panfrost. But if that's really
> >>> an issue, I can make it an opt-out.
> >>
> >> I don't have strong feelings either way. I was just under the
> >> impressions other drivers did this for b/w compat reasons which don't
> >> apply here.
> >
> > Okay, I think I'll keep it like that unless there's a strong reason to
> > make no-implicit dep the default. It's safer to oversync than the skip
> > the synchronization, so it does feel like something the user should
> > explicitly enable.
>
> I don't have strong feelings - ultimately the number of projects caring
> about the uABI is so limited the "default" is pretty irrelevant (it's
> not as if we are needing to guide random developers who are new to the
> interface). But a conservative default seems sensible.
>
> >>
> >>>> Hmm. I'm not /opposed/ and I know kbase uses strides but it seems like
> >>>> somewhat unwarranted complexity, and there is a combinatoric explosion
> >>>> here (if jobs, bo refs, and syncobj refs use 3 different versions, as
> >>>> this encoding permits... as opposed to just specifying a UABI version or
> >>>> something like that)
> >>>
> >>> Sounds like a good idea. I'll add a version field and map that
> >>> to a <job_stride,bo_ref_stride,syncobj_ref_stride> tuple.
> >>
> >> Cc Steven, does this make sense?
> >
> > I have this approach working, and I must admit I prefer it to the
> > per-object stride field passed to the submit struct.
> >
>
> There are benefits both ways:
>
> * Version number: easier to think about, and less worries about
> combinatorial explosion of possible options to test.
>
> * Explicit structure sizes/strides: much harder to accidentally forgot
> to change, clients 'naturally' move to newer versions just with recompiling.
The version I just sent has a PANFROST_SUBMIT_BATCH_VERSION macro
defined in the the uAPI header, so getting right without changing the
code should be fine (same has with the sizeof(struct xx)) trick with
the per-desc stride approach).
>
> For now I'd be tempted to go for the version number, but I suspect we
> should also ensure there's a generic 'flags' field in there. That would
> allow us to introduce new features/behaviours in a way which can be
> backported more easily if necessary.
Adding features at the submit level without changing the version number
is already possible (we can extend drm_panfrost_batch_submit without
breaking the uABI), but I'm not sure that's a good idea...
If you mean adding a flags field at the job level, I can add it, but I
wonder what you have in mind when you say some features might be
interesting to backport. I really thought we'd force people to update
their kernel when they want those new features.
Regards,
Boris
next prev parent reply other threads:[~2021-07-05 8:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-02 14:32 [PATCH v3 0/7] drm/panfrost: drm/panfrost: Add a new submit ioctl Boris Brezillon
2021-07-02 14:32 ` [PATCH v3 1/7] drm/panfrost: Pass a job to panfrost_{acquire, attach}_object_fences() Boris Brezillon
2021-07-02 14:32 ` [PATCH v3 2/7] drm/panfrost: Move the mappings collection out of panfrost_lookup_bos() Boris Brezillon
2021-07-02 14:32 ` [PATCH v3 3/7] drm/panfrost: Add BO access flags to relax dependencies between jobs Boris Brezillon
2021-07-02 14:32 ` [PATCH v3 4/7] drm/panfrost: Add the ability to create submit queues Boris Brezillon
2021-07-02 15:05 ` Steven Price
2021-07-02 15:49 ` Boris Brezillon
2021-07-02 16:01 ` Boris Brezillon
2021-07-02 14:32 ` [PATCH v3 5/7] drm/panfrost: Add a new ioctl to submit batches Boris Brezillon
2021-07-02 15:13 ` Alyssa Rosenzweig
2021-07-02 15:38 ` Boris Brezillon
2021-07-02 16:49 ` Alyssa Rosenzweig
2021-07-02 17:54 ` Boris Brezillon
2021-07-02 18:11 ` Boris Brezillon
2021-07-05 8:22 ` Steven Price
2021-07-05 8:43 ` Boris Brezillon [this message]
2021-07-05 8:51 ` Steven Price
2021-07-06 12:48 ` Alyssa Rosenzweig
2021-07-07 9:09 ` Steven Price
2021-07-02 15:31 ` Steven Price
2021-07-02 15:34 ` Alyssa Rosenzweig
2021-07-02 14:32 ` [PATCH v3 6/7] drm/panfrost: Advertise the SYNCOBJ_TIMELINE feature Boris Brezillon
2021-07-02 14:32 ` [PATCH v3 7/7] drm/panfrost: Bump minor version to reflect the feature additions Boris Brezillon
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=20210705104319.7b709530@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=alyssa.rosenzweig@collabora.com \
--cc=alyssa@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jason@jlekstrand.net \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=steven.price@arm.com \
--cc=tomeu.vizoso@collabora.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.