[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-fbdev
Subject:    Re: [PATCH 4/4] HID: picolcd: implement refcounting of framebuffer
From:       Bernie Thompson <bernie () plugable ! com>
Date:       2010-06-30 15:41:14
Message-ID: AANLkTikJuRwnuY9rvqYGoANPnaiJcTgpKQgeL7bU3pmI () mail ! gmail ! com
[Download RAW message or body]

On Tue, Jun 29, 2010 at 1:42 PM, Bruno Prémont
<bonbons@linux-vserver.org> wrote:
> Something like
>  framebuffer_alloc()              <-- set refcount to 1
>  ...
>  register_framebuffer()           <-- inc refcount
>  ...
>  and open() of fb device would inc refcount
>  and close() would decrement it
>
>  unregister_framebuffer()         <-- dec refcount
>  framebuffer_release()            <-- dec refcount

Totally agree.  Just verbalizing smaller details - wiith a struct kref
added to fb_info, initialized in framebuffer_alloc, get_kref() and
put_kref() at the points you list, and a framebuffer_free() for use
with put_kref (static to start, assuming only fbmem itself will
directly touch refs), this is sounds like you'd have a good fix for
fbdev's current problems here.

Best wishes,
Bernie
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic