From: Jerome Glisse <j.glisse@gmail.com>
To: Rob Clark <robdclark@gmail.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: AMD GPU new API for new module
Date: Thu, 9 Oct 2014 03:54:42 -0400 [thread overview]
Message-ID: <20141009075440.GA4576@gmail.com> (raw)
In-Reply-To: <CAF6AEGuo4yLcH30+C=opxDAV9Qy5CXLopoWNqrUVuvwpaA3ZDQ@mail.gmail.com>
On Thu, Oct 09, 2014 at 03:32:26AM -0400, Rob Clark wrote:
> On Wed, Oct 8, 2014 at 12:00 PM, Jerome Glisse <j.glisse@gmail.com> wrote:
> >
> > So idea is simple, each ioctl would use some struct like :
> >
> > struct radeon_ioctl {
> > u32 version;
> > u32 size;
> > };
>
>
> fwiw, drm_ioctl() will do the right thing (zero-pad) for growing
> ioctls these days..
It's more about userspace knowing about ioctl XY and having a way
to override/ask for special version of each ioctl. So if we screw
ioctl XY, we can add a new version to XY and we can try to work
around if userspace still request the old version. It is mostly
about trying to keep the code clean and avoiding things like the
chunk stuff of the cs ioctl.
For instance if you cs ioctl with the following struct as ioctl
parameter:
struct drm_radeon_cs_ioctl_version_00 {
u64 *cs;
u32 size;
u32 flags;
};
And now you have a new generation of hardware or are just adding
a new feature :
struct drm_radeon_cs_ioctl_version_01 {
u64 *cs;
u32 size;
u32 flags;
u32 newfeature fields;
};
Of course you can argue that you could use the size of user space
paremeter to do this simple example. But with versioning you can
also move fields around, remove fields, ... basicly it is just more
flexible with small overhead of having one more indirection but this
will be lost into the ioctl cost anyway (i highly doubt it would
turns as a bottleneck).
Cheers,
Jérôme
>
> BR,
> -R
next prev parent reply other threads:[~2014-10-09 7:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 16:00 AMD GPU new API for new module Jerome Glisse
2014-10-08 16:43 ` Christian König
2014-10-09 6:54 ` Oded Gabbay
2014-10-09 8:02 ` Jerome Glisse
2014-10-09 10:15 ` Oded Gabbay
2014-10-09 15:55 ` Daniel Vetter
2014-10-09 18:33 ` Oded Gabbay
2014-10-11 18:30 ` Daniel Vetter
2014-10-12 8:13 ` Oded Gabbay
2014-10-12 9:33 ` Christian König
2014-10-09 7:32 ` Rob Clark
2014-10-09 7:54 ` Jerome Glisse [this message]
2014-10-09 9:49 ` Christian König
2014-10-09 12:13 ` Rob Clark
2014-10-09 9:20 ` Daniel Vetter
2014-10-13 21:13 ` Dave Airlie
2014-10-10 2:25 ` Olaf Buddenhagen
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=20141009075440.GA4576@gmail.com \
--to=j.glisse@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=robdclark@gmail.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.