[PATCH 0/6] drm: Introduce consistent reference counting APIs

Daniel Vetter daniel at ffwll.ch
Thu Feb 9 19:07:41 UTC 2017


On Thu, Feb 09, 2017 at 07:39:33PM +0200, Jani Nikula wrote:
> On Thu, 09 Feb 2017, Daniel Vetter <daniel at ffwll.ch> wrote:
> > On Thu, Feb 09, 2017 at 04:10:12PM +0200, Jani Nikula wrote:
> >> On Wed, 08 Feb 2017, Thierry Reding <thierry.reding at gmail.com> wrote:
> >> > This series introduces DRM reference counting APIs that are consistent
> >> > with other reference counting APIs in the kernel. They are also much
> >> > shorter. Compatibility aliases are added to keep existing code working
> >> > and will stay in place until all users of the old APIs are gone.
> >> 
> >> I like it.
> >> 
> >> But it makes drm_connector_list_iter_{get,put} stick out like a sore
> >> thumb. Something for the TODO list I guess.
> >
> > Hm, why is that one the sore thumb now? Just because it's really long? It
> > does acquire/drop references behind the scenes, that's why I went with the
> > _get/put postfixes ...
> 
> I think the assumption is that get/put work on an object, and you can
> get/put as many times as you like, as long as you keep them at
> balance. AFAICT this doesn't hold for iter.

Hm right. What else should we use instead? start/stop are confusing in the
context of list walking, create/destroy maybe?

I don't have a good name I guess ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list