]>
Commit | Line | Data |
---|---|---|
04fd09d4 SL |
1 | From ce68f5ef5deb02469b18b518d0e7d9c14c49fe07 Mon Sep 17 00:00:00 2001 |
2 | From: Ezequiel Garcia <ezequiel@collabora.com> | |
3 | Date: Fri, 8 Feb 2019 11:17:46 -0500 | |
4 | Subject: media: sh_veu: Correct return type for mem2mem buffer helpers | |
5 | ||
6 | [ Upstream commit 43c145195c7fc3025ee7ecfc67112ac1c82af7c2 ] | |
7 | ||
8 | Fix the assigned type of mem2mem buffer handling API. | |
9 | Namely, these functions: | |
10 | ||
11 | v4l2_m2m_next_buf | |
12 | v4l2_m2m_last_buf | |
13 | v4l2_m2m_buf_remove | |
14 | v4l2_m2m_next_src_buf | |
15 | v4l2_m2m_next_dst_buf | |
16 | v4l2_m2m_last_src_buf | |
17 | v4l2_m2m_last_dst_buf | |
18 | v4l2_m2m_src_buf_remove | |
19 | v4l2_m2m_dst_buf_remove | |
20 | ||
21 | return a struct vb2_v4l2_buffer, and not a struct vb2_buffer. | |
22 | ||
23 | Fixing this is necessary to fix the mem2mem buffer handling API, | |
24 | changing the return to the correct struct vb2_v4l2_buffer instead | |
25 | of a void pointer. | |
26 | ||
27 | Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> | |
28 | Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> | |
29 | Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | |
30 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
31 | --- | |
32 | drivers/media/platform/sh_veu.c | 4 ++-- | |
33 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
34 | ||
35 | diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c | |
36 | index 15a562af13c7..a4f593220ef0 100644 | |
37 | --- a/drivers/media/platform/sh_veu.c | |
38 | +++ b/drivers/media/platform/sh_veu.c | |
39 | @@ -276,13 +276,13 @@ static void sh_veu_process(struct sh_veu_dev *veu, | |
40 | static void sh_veu_device_run(void *priv) | |
41 | { | |
42 | struct sh_veu_dev *veu = priv; | |
43 | - struct vb2_buffer *src_buf, *dst_buf; | |
44 | + struct vb2_v4l2_buffer *src_buf, *dst_buf; | |
45 | ||
46 | src_buf = v4l2_m2m_next_src_buf(veu->m2m_ctx); | |
47 | dst_buf = v4l2_m2m_next_dst_buf(veu->m2m_ctx); | |
48 | ||
49 | if (src_buf && dst_buf) | |
50 | - sh_veu_process(veu, src_buf, dst_buf); | |
51 | + sh_veu_process(veu, &src_buf->vb2_buf, &dst_buf->vb2_buf); | |
52 | } | |
53 | ||
54 | /* ========== video ioctls ========== */ | |
55 | -- | |
56 | 2.19.1 | |
57 |