From: Donald Robson <Donald.Robson@imgtec.com>
To: "dakr@redhat.com" <dakr@redhat.com>
Cc: "corbet@lwn.net" <corbet@lwn.net>,
"jason@jlekstrand.net" <jason@jlekstrand.net>,
"christian.koenig@amd.com" <christian.koenig@amd.com>,
"willy@infradead.org" <willy@infradead.org>,
"tzimmermann@suse.de" <tzimmermann@suse.de>,
"bagasdotme@gmail.com" <bagasdotme@gmail.com>,
"mripard@kernel.org" <mripard@kernel.org>,
"matthew.brost@intel.com" <matthew.brost@intel.com>,
"ogabbay@kernel.org" <ogabbay@kernel.org>,
"Liam.Howlett@oracle.com" <Liam.Howlett@oracle.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"boris.brezillon@collabora.com" <boris.brezillon@collabora.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"bskeggs@redhat.com" <bskeggs@redhat.com>,
"nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: Re: [PATCH drm-next v4 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI
Date: Wed, 14 Jun 2023 07:58:28 +0000 [thread overview]
Message-ID: <1cee380fb31e1a2f499e50e6b8771d86a68c1b16.camel@imgtec.com> (raw)
In-Reply-To: <67ffef18-fae4-cb84-ff75-c4eed92a8755@redhat.com>
On Tue, 2023-06-13 at 16:20 +0200, Danilo Krummrich wrote:
> I'm definitely up improving the existing documentation. Anything in
> particular you think should be described in more detail?
>
> - Danilo
Hi Danilo,
As I said, with inexperience it's possible I missed what I was
looking for in the existing documentation, which is highly detailed
in regard to how it deals with operations, but usage was where I fell
down.
If I understand there are three ways to use this, which are:
1) Using drm_gpuva_insert() and drm_gpuva_remove() directly using
stack va objects.
2) Using drm_gpuva_insert() and drm_gpuva_remove() in a callback
context, after having created ops lists using
drm_gpuva_sm_[un]map_ops_create().
3) Using drm_gpuva_[un]map() in callback context after having
prealloced a node and va objects for map/remap function use,
which must be forwarded in as the 'priv' argument to
drm_gpuva_sm_[un]map().
The first of these is pretty self-explanatory. The second was also
fairly easy to understand, it has an example in your own driver, and
since it takes care of allocs in drm_gpuva_sm_map_ops_create() it
leads to pretty clean code too.
The third case, which I am using in the new PowerVR driver did not
have an example of usage and the approach is quite different to 2)
in that you have to prealloc everything explicitly. I didn't realise
this, so it led to a fair amount of frustration.
I think if you're willing, it would help inexperienced implementers a
lot if there were some brief 'how to' snippets for each of the three
use cases.
Thanks,
Donald
next prev parent reply other threads:[~2023-06-14 7:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 22:31 Danilo Krummrich
2023-06-06 22:31 ` [PATCH drm-next v4 01/14] drm: execution context for GEM buffers v4 Danilo Krummrich
2023-06-06 22:31 ` [PATCH drm-next v4 02/14] maple_tree: split up MA_STATE() macro Danilo Krummrich
2023-06-13 17:25 ` Liam R. Howlett
2023-06-06 22:31 ` [PATCH drm-next v4 03/14] drm: manager to keep track of GPUs VA mappings Danilo Krummrich
2023-06-07 4:36 ` kernel test robot
2023-06-14 0:29 ` Liam R. Howlett
2023-06-15 14:27 ` Danilo Krummrich
2023-06-06 22:31 ` [PATCH drm-next v4 04/14] drm: debugfs: provide infrastructure to dump a DRM GPU VA space Danilo Krummrich
2023-06-06 23:55 ` kernel test robot
2023-06-07 20:19 ` kernel test robot
2023-06-06 22:31 ` [PATCH drm-next v4 05/14] drm/nouveau: new VM_BIND uapi interfaces Danilo Krummrich
2023-06-06 22:31 ` [PATCH drm-next v4 06/14] drm/nouveau: get vmm via nouveau_cli_vmm() Danilo Krummrich
2023-06-06 22:31 ` [PATCH drm-next v4 07/14] drm/nouveau: bo: initialize GEM GPU VA interface Danilo Krummrich
2023-06-06 22:31 ` [PATCH drm-next v4 08/14] drm/nouveau: move usercopy helpers to nouveau_drv.h Danilo Krummrich
2023-06-06 22:31 ` [PATCH drm-next v4 09/14] drm/nouveau: fence: separate fence alloc and emit Danilo Krummrich
2023-06-07 15:42 ` kernel test robot
2023-06-06 22:31 ` [PATCH drm-next v4 10/14] drm/nouveau: fence: fail to emit when fence context is killed Danilo Krummrich
2023-06-06 22:31 ` [PATCH drm-next v4 11/14] drm/nouveau: chan: provide nouveau_channel_kill() Danilo Krummrich
2023-06-06 22:31 ` [PATCH drm-next v4 12/14] drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm Danilo Krummrich
2023-06-07 15:52 ` kernel test robot
2023-06-06 22:31 ` [PATCH drm-next v4 13/14] drm/nouveau: implement new VM_BIND uAPI Danilo Krummrich
2023-06-08 12:53 ` kernel test robot
2023-06-06 22:31 ` [PATCH drm-next v4 14/14] drm/nouveau: debugfs: implement DRM GPU VA debugfs Danilo Krummrich
2023-06-14 1:20 ` Liam R. Howlett
2023-06-09 11:56 ` [PATCH drm-next v4 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI Donald Robson
2023-06-13 14:20 ` Danilo Krummrich
2023-06-14 7:58 ` Donald Robson [this message]
2023-06-15 16:31 ` Danilo Krummrich
2023-06-15 16:39 ` Danilo Krummrich
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=1cee380fb31e1a2f499e50e6b8771d86a68c1b16.camel@imgtec.com \
--to=donald.robson@imgtec.com \
--cc=Liam.Howlett@oracle.com \
--cc=bagasdotme@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=bskeggs@redhat.com \
--cc=christian.koenig@amd.com \
--cc=corbet@lwn.net \
--cc=dakr@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jason@jlekstrand.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=matthew.brost@intel.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=ogabbay@kernel.org \
--cc=tzimmermann@suse.de \
--cc=willy@infradead.org \
/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