diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2011-08-24 05:49:35 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-06 14:04:09 -0400 |
commit | 25a27d91006091e28532053c95fa36b70b79d3ad (patch) | |
tree | 9012e2126e118b5579b149e99320c4e7ccea9ba8 /include/media | |
parent | c1426bc727b78808fb956f7402b689144c1506ee (diff) |
[media] media: vb2: fix handling MAPPED buffer flag
MAPPED flag was set for the buffer only if all it's planes were mapped and
relied on a simple mapping counter. This assumption is really bogus,
especially because the buffers may be mapped multiple times. Also the
meaning of this flag for muliplane buffers was not really useful. This
patch fixes this issue by setting the MAPPED flag for the buffer if any of
it's planes is in use (what means that has been mapped at least once), so
MAPPED flag can be used as 'in_use' indicator.
Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/videobuf2-core.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 496d6e548ef5..984f2bae2578 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h | |||
@@ -75,7 +75,6 @@ struct vb2_mem_ops { | |||
75 | 75 | ||
76 | struct vb2_plane { | 76 | struct vb2_plane { |
77 | void *mem_priv; | 77 | void *mem_priv; |
78 | int mapped:1; | ||
79 | }; | 78 | }; |
80 | 79 | ||
81 | /** | 80 | /** |
@@ -147,7 +146,6 @@ struct vb2_queue; | |||
147 | * @done_entry: entry on the list that stores all buffers ready to | 146 | * @done_entry: entry on the list that stores all buffers ready to |
148 | * be dequeued to userspace | 147 | * be dequeued to userspace |
149 | * @planes: private per-plane information; do not change | 148 | * @planes: private per-plane information; do not change |
150 | * @num_planes_mapped: number of mapped planes; do not change | ||
151 | */ | 149 | */ |
152 | struct vb2_buffer { | 150 | struct vb2_buffer { |
153 | struct v4l2_buffer v4l2_buf; | 151 | struct v4l2_buffer v4l2_buf; |
@@ -164,7 +162,6 @@ struct vb2_buffer { | |||
164 | struct list_head done_entry; | 162 | struct list_head done_entry; |
165 | 163 | ||
166 | struct vb2_plane planes[VIDEO_MAX_PLANES]; | 164 | struct vb2_plane planes[VIDEO_MAX_PLANES]; |
167 | unsigned int num_planes_mapped; | ||
168 | }; | 165 | }; |
169 | 166 | ||
170 | /** | 167 | /** |