[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <41329726-6861-f777-e7b1-e4b510ab4af5@redhat.com>
Date: Thu, 6 Jul 2023 17:52:31 +0200
From: Danilo Krummrich <dakr@...hat.com>
To: Donald Robson <Donald.Robson@...tec.com>,
"corbet@....net" <corbet@....net>,
"jason@...kstrand.net" <jason@...kstrand.net>,
"willy@...radead.org" <willy@...radead.org>,
"christian.koenig@....com" <christian.koenig@....com>,
"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>,
"bskeggs@...hat.com" <bskeggs@...hat.com>,
"ogabbay@...nel.org" <ogabbay@...nel.org>,
"boris.brezillon@...labora.com" <boris.brezillon@...labora.com>,
"Liam.Howlett@...cle.com" <Liam.Howlett@...cle.com>,
"daniel@...ll.ch" <daniel@...ll.ch>,
"alexdeucher@...il.com" <alexdeucher@...il.com>,
"airlied@...il.com" <airlied@...il.com>
Cc: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"airlied@...hat.com" <airlied@...hat.com>
Subject: Re: [PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA
mappings
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
>> +
Powered by blists - more mailing lists