Thread (23 messages) 23 messages, 4 authors, 2010-07-12

Re: [PATCH 4/4] HID: picolcd: implement refcounting of framebuffer

From: Bernie Thompson <bernie@plugable.com>
Date: 2010-06-30 15:41:14

On Tue, Jun 29, 2010 at 1:42 PM, Bruno Prémont
[off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help