From: Danilo Krummrich <dakr@redhat.com>
To: Donald Robson <Donald.Robson@imgtec.com>,
"corbet@lwn.net" <corbet@lwn.net>,
"jason@jlekstrand.net" <jason@jlekstrand.net>,
"willy@infradead.org" <willy@infradead.org>,
"christian.koenig@amd.com" <christian.koenig@amd.com>,
"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>,
"bskeggs@redhat.com" <bskeggs@redhat.com>,
"ogabbay@kernel.org" <ogabbay@kernel.org>,
"boris.brezillon@collabora.com" <boris.brezillon@collabora.com>,
"Liam.Howlett@oracle.com" <Liam.Howlett@oracle.com>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
"alexdeucher@gmail.com" <alexdeucher@gmail.com>,
"airlied@gmail.com" <airlied@gmail.com>
Cc: "nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
"airlied@redhat.com" <airlied@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: Re: [PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings
Date: Thu, 6 Jul 2023 17:52:31 +0200 [thread overview]
Message-ID: <41329726-6861-f777-e7b1-e4b510ab4af5@redhat.com> (raw)
In-Reply-To: <8d01cb3add315277c86cf4b28d6901fed1977448.camel@imgtec.com>
Hi Donald,
On 7/6/23 17:45, Donald Robson wrote:
> On Fri, 2023-06-30 at 00:25 +0200, Danilo Krummrich wrote:
>>
>> +#ifdef CONFIG_LOCKDEP
>> +typedef struct lockdep_map *lockdep_map_p;
>> +#define drm_gpuva_manager_ext_assert_held(mgr) \
>> + lockdep_assert(lock_is_held((mgr)->ext_lock) != LOCK_STATE_NOT_HELD)
>> +/**
>> + * drm_gpuva_manager_set_ext_lock - set the external lock according to
>> + * @DRM_GPUVA_MANAGER_LOCK_EXTERN
>> + * @mgr: the &drm_gpuva_manager to set the lock for
>> + * @lock: the lock to set
>> + *
>> + * If @DRM_GPUVA_MANAGER_LOCK_EXTERN is set, drivers need to call this function
>> + * to provide the lock used to lock linking and unlinking of &drm_gpuvas to the
>> + * &drm_gem_objects GPUVA list.
>> + */
>> +#define drm_gpuva_manager_set_ext_lock(mgr, lock) \
>> + (mgr)->ext_lock = &(lock)->dep_map
>> +#else
>> +typedef struct { /* nothing */ } lockdep_map_p;
>
> lockdep_map_p conflicts with an identical typedef in maple_tree.h when CONFIG_LOCKDEP is
> not set (it's being pulled in by mm.h in drm_vma_manager.h). I'll just comment the line
> out for now.
Good catch! I got this trick from maple_tree.h and intended to move it
to the lockdep header in a separate patch to avoid such collisions.
Unfortunately, I forgot about it. Gonna fix it up.
- Danilo
>
>> +#define drm_gpuva_manager_ext_assert_held(mgr) do { (void)(mgr); } while (0)
>> +#define drm_gpuva_manager_set_ext_lock(mgr, lock) do { } while (0)
>> +#endif
>> +
next prev parent reply other threads:[~2023-07-06 15:52 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 22:25 [PATCH drm-next v6 00/13] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI Danilo Krummrich
2023-06-29 22:25 ` [PATCH drm-next v6 01/13] drm: execution context for GEM buffers v5 Danilo Krummrich
2023-06-29 22:25 ` [PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings Danilo Krummrich
2023-06-30 8:02 ` Boris Brezillon
2023-06-30 8:09 ` Boris Brezillon
2023-06-30 9:40 ` Boris Brezillon
2023-07-06 15:06 ` Danilo Krummrich
2023-07-06 16:17 ` Boris Brezillon
2023-07-06 8:49 ` Thomas Hellström (Intel)
2023-07-06 15:48 ` Danilo Krummrich
2023-07-06 17:30 ` Thomas Hellström (Intel)
2023-07-06 15:45 ` Donald Robson
2023-07-06 15:52 ` Danilo Krummrich [this message]
2023-07-06 18:26 ` Boris Brezillon
2023-07-07 7:57 ` Boris Brezillon
2023-07-07 12:32 ` Danilo Krummrich
2023-07-07 11:00 ` Boris Brezillon
2023-07-07 12:41 ` Danilo Krummrich
2023-07-07 12:52 ` Boris Brezillon
2023-07-08 6:39 ` Matthew Brost
2023-06-29 22:25 ` [PATCH drm-next v6 03/13] drm: debugfs: provide infrastructure to dump a DRM GPU VA space Danilo Krummrich
2023-06-29 22:25 ` [PATCH drm-next v6 04/13] drm/nouveau: new VM_BIND uapi interfaces Danilo Krummrich
2023-06-29 22:25 ` [PATCH drm-next v6 05/13] drm/nouveau: get vmm via nouveau_cli_vmm() Danilo Krummrich
2023-06-29 22:25 ` [PATCH drm-next v6 06/13] drm/nouveau: bo: initialize GEM GPU VA interface Danilo Krummrich
2023-06-29 22:25 ` [PATCH drm-next v6 07/13] drm/nouveau: move usercopy helpers to nouveau_drv.h Danilo Krummrich
2023-06-29 22:25 ` [PATCH drm-next v6 08/13] drm/nouveau: fence: separate fence alloc and emit Danilo Krummrich
2023-06-29 22:25 ` [PATCH drm-next v6 09/13] drm/nouveau: fence: fail to emit when fence context is killed Danilo Krummrich
2023-06-29 22:25 ` [PATCH drm-next v6 10/13] drm/nouveau: chan: provide nouveau_channel_kill() Danilo Krummrich
2023-06-29 22:25 ` [PATCH drm-next v6 11/13] drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm Danilo Krummrich
2023-06-29 22:25 ` [PATCH drm-next v6 12/13] drm/nouveau: implement new VM_BIND uAPI Danilo Krummrich
2023-06-29 22:25 ` [PATCH drm-next v6 13/13] drm/nouveau: debugfs: implement DRM GPU VA debugfs 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=41329726-6861-f777-e7b1-e4b510ab4af5@redhat.com \
--to=dakr@redhat.com \
--cc=Donald.Robson@imgtec.com \
--cc=Liam.Howlett@oracle.com \
--cc=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=alexdeucher@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=bskeggs@redhat.com \
--cc=christian.koenig@amd.com \
--cc=corbet@lwn.net \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jason@jlekstrand.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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