diff options
| author | Greg Hackmann <ghackmann@google.com> | 2014-03-24 16:45:43 -0700 |
|---|---|---|
| committer | John Stultz <john.stultz@linaro.org> | 2016-02-16 13:53:19 -0800 |
| commit | 41bda719aa49b512ea43f8f1dfbf6fdbfdf5addb (patch) | |
| tree | 7f9768a5139f7adf8f7616e654f9ed2c70b5a8ad /include | |
| parent | 0bb5d2b6b6fc0536c656918409bc2edb62eb9733 (diff) | |
video: adf: replace fbdev helper's open flag with refcount
A device's fb_info is shared between clients. fb_release() is called
when each client is released, not just the last one. Since the fbdev
helper needs to release its dma-buf when the last client goes away, it
must keep its own reference count.
fbmem and fbcon hold different locks while calling fb_release(), so
explicit locking is needed.
Change-Id: I42cd659f7633adba7c11f407d4b594bd43305d6a
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/video/adf_fbdev.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/video/adf_fbdev.h b/include/video/adf_fbdev.h index 9c349144b5cd..e4d6fb7b25df 100644 --- a/include/video/adf_fbdev.h +++ b/include/video/adf_fbdev.h @@ -16,6 +16,7 @@ #define _VIDEO_ADF_FBDEV_H_ #include <linux/fb.h> +#include <linux/mutex.h> #include <video/adf.h> struct adf_fbdev { @@ -24,7 +25,8 @@ struct adf_fbdev { struct fb_info *info; u32 pseudo_palette[16]; - bool open; + unsigned int refcount; + struct mutex refcount_lock; struct dma_buf *dma_buf; u32 offset; |
