[RFC 1/3] drm: Add a way to iterate over minors
Daniel Vetter
daniel at ffwll.ch
Wed Aug 10 14:34:06 UTC 2016
On Wed, Aug 10, 2016 at 4:27 PM, Noralf Trønnes <noralf at tronnes.org> wrote:
> Den 10.08.2016 10:43, skrev Daniel Vetter:
>>
>> On Tue, Aug 09, 2016 at 07:45:40PM +0200, Noralf Trønnes wrote:
>>>
>>> This adds a way for in-kernel users to iterate over the available
>>> DRM minors. The implementation is oops safe so the panic code
>>> can safely use it.
>>>
>>> Signed-off-by: Noralf Trønnes <noralf at tronnes.org>
>>
>> Why iterate over minors? I'd kinda have expected we'd iterate over devices
>> instead ... And looking ahead, that seems to be what you actually want.
>
>
> I did this because I couldn't find a list of drm_devices anywhere. Only
> minors.
> But I can do a drm_for_each_device() based on the minor "list".
Hm, the drm drivers are all part of the drm class, we should be able
to iterate them I think. Otherwise let's just add a new list instead
of jumping through hoops.
New list with it's own lock (which we then trylock from the panic
handler) would be safest I think.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the dri-devel
mailing list