lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1cee380fb31e1a2f499e50e6b8771d86a68c1b16.camel@imgtec.com>
Date:   Wed, 14 Jun 2023 07:58:28 +0000
From:   Donald Robson <Donald.Robson@...tec.com>
To:     "dakr@...hat.com" <dakr@...hat.com>
CC:     "corbet@....net" <corbet@....net>,
        "jason@...kstrand.net" <jason@...kstrand.net>,
        "christian.koenig@....com" <christian.koenig@....com>,
        "willy@...radead.org" <willy@...radead.org>,
        "tzimmermann@...e.de" <tzimmermann@...e.de>,
        "bagasdotme@...il.com" <bagasdotme@...il.com>,
        "mripard@...nel.org" <mripard@...nel.org>,
        "matthew.brost@...el.com" <matthew.brost@...el.com>,
        "ogabbay@...nel.org" <ogabbay@...nel.org>,
        "Liam.Howlett@...cle.com" <Liam.Howlett@...cle.com>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "boris.brezillon@...labora.com" <boris.brezillon@...labora.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "bskeggs@...hat.com" <bskeggs@...hat.com>,
        "nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: Re: [PATCH drm-next v4 00/14] [RFC] DRM GPUVA Manager & Nouveau
 VM_BIND UAPI

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ