diff options
author | Junghak Sung <jh1009.sung@samsung.com> | 2015-09-22 09:30:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-10-01 08:04:43 -0400 |
commit | 2d7007153f0c9b1dd00c01894df7d26ddc32b79f (patch) | |
tree | 8320f9d22f45dd7dcea64088b50ff706bb0082b2 /drivers/media/platform/coda | |
parent | c139990e842d550db2f59bd4f5993bba90f140e0 (diff) |
[media] media: videobuf2: Restructure vb2_buffer
Remove v4l2 stuff - v4l2_buf, v4l2_plane - from struct vb2_buffer.
Add new member variables - bytesused, length, offset, userptr, fd,
data_offset - to struct vb2_plane in order to cover all information
of v4l2_plane.
struct vb2_plane {
<snip>
unsigned int bytesused;
unsigned int length;
union {
unsigned int offset;
unsigned long userptr;
int fd;
} m;
unsigned int data_offset;
}
Replace v4l2_buf with new member variables - index, type, memory - which
are common fields for buffer management.
struct vb2_buffer {
<snip>
unsigned int index;
unsigned int type;
unsigned int memory;
unsigned int num_planes;
struct vb2_plane planes[VIDEO_MAX_PLANES];
<snip>
};
v4l2 specific fields - flags, field, timestamp, timecode,
sequence - are moved to vb2_v4l2_buffer in videobuf2-v4l2.c
struct vb2_v4l2_buffer {
struct vb2_buffer vb2_buf;
__u32 flags;
__u32 field;
struct timeval timestamp;
struct v4l2_timecode timecode;
__u32 sequence;
};
Signed-off-by: Junghak Sung <jh1009.sung@samsung.com>
Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com>
Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/coda')
-rw-r--r-- | drivers/media/platform/coda/coda-bit.c | 133 | ||||
-rw-r--r-- | drivers/media/platform/coda/coda-common.c | 21 | ||||
-rw-r--r-- | drivers/media/platform/coda/coda-jpeg.c | 6 | ||||
-rw-r--r-- | drivers/media/platform/coda/coda.h | 6 | ||||
-rw-r--r-- | drivers/media/platform/coda/trace.h | 16 |
5 files changed, 93 insertions, 89 deletions
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index cd41d49b206d..654e964f84a2 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c | |||
@@ -179,31 +179,32 @@ static void coda_kfifo_sync_to_device_write(struct coda_ctx *ctx) | |||
179 | } | 179 | } |
180 | 180 | ||
181 | static int coda_bitstream_queue(struct coda_ctx *ctx, | 181 | static int coda_bitstream_queue(struct coda_ctx *ctx, |
182 | struct vb2_buffer *src_buf) | 182 | struct vb2_v4l2_buffer *src_buf) |
183 | { | 183 | { |
184 | u32 src_size = vb2_get_plane_payload(src_buf, 0); | 184 | u32 src_size = vb2_get_plane_payload(&src_buf->vb2_buf, 0); |
185 | u32 n; | 185 | u32 n; |
186 | 186 | ||
187 | n = kfifo_in(&ctx->bitstream_fifo, vb2_plane_vaddr(src_buf, 0), | 187 | n = kfifo_in(&ctx->bitstream_fifo, |
188 | src_size); | 188 | vb2_plane_vaddr(&src_buf->vb2_buf, 0), src_size); |
189 | if (n < src_size) | 189 | if (n < src_size) |
190 | return -ENOSPC; | 190 | return -ENOSPC; |
191 | 191 | ||
192 | src_buf->v4l2_buf.sequence = ctx->qsequence++; | 192 | src_buf->sequence = ctx->qsequence++; |
193 | 193 | ||
194 | return 0; | 194 | return 0; |
195 | } | 195 | } |
196 | 196 | ||
197 | static bool coda_bitstream_try_queue(struct coda_ctx *ctx, | 197 | static bool coda_bitstream_try_queue(struct coda_ctx *ctx, |
198 | struct vb2_buffer *src_buf) | 198 | struct vb2_v4l2_buffer *src_buf) |
199 | { | 199 | { |
200 | int ret; | 200 | int ret; |
201 | 201 | ||
202 | if (coda_get_bitstream_payload(ctx) + | 202 | if (coda_get_bitstream_payload(ctx) + |
203 | vb2_get_plane_payload(src_buf, 0) + 512 >= ctx->bitstream.size) | 203 | vb2_get_plane_payload(&src_buf->vb2_buf, 0) + 512 >= |
204 | ctx->bitstream.size) | ||
204 | return false; | 205 | return false; |
205 | 206 | ||
206 | if (vb2_plane_vaddr(src_buf, 0) == NULL) { | 207 | if (vb2_plane_vaddr(&src_buf->vb2_buf, 0) == NULL) { |
207 | v4l2_err(&ctx->dev->v4l2_dev, "trying to queue empty buffer\n"); | 208 | v4l2_err(&ctx->dev->v4l2_dev, "trying to queue empty buffer\n"); |
208 | return true; | 209 | return true; |
209 | } | 210 | } |
@@ -224,7 +225,7 @@ static bool coda_bitstream_try_queue(struct coda_ctx *ctx, | |||
224 | 225 | ||
225 | void coda_fill_bitstream(struct coda_ctx *ctx, bool streaming) | 226 | void coda_fill_bitstream(struct coda_ctx *ctx, bool streaming) |
226 | { | 227 | { |
227 | struct vb2_buffer *src_buf; | 228 | struct vb2_v4l2_buffer *src_buf; |
228 | struct coda_buffer_meta *meta; | 229 | struct coda_buffer_meta *meta; |
229 | unsigned long flags; | 230 | unsigned long flags; |
230 | u32 start; | 231 | u32 start; |
@@ -257,7 +258,7 @@ void coda_fill_bitstream(struct coda_ctx *ctx, bool streaming) | |||
257 | } | 258 | } |
258 | 259 | ||
259 | /* Dump empty buffers */ | 260 | /* Dump empty buffers */ |
260 | if (!vb2_get_plane_payload(src_buf, 0)) { | 261 | if (!vb2_get_plane_payload(&src_buf->vb2_buf, 0)) { |
261 | src_buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx); | 262 | src_buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx); |
262 | v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE); | 263 | v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE); |
263 | continue; | 264 | continue; |
@@ -276,9 +277,9 @@ void coda_fill_bitstream(struct coda_ctx *ctx, bool streaming) | |||
276 | 277 | ||
277 | meta = kmalloc(sizeof(*meta), GFP_KERNEL); | 278 | meta = kmalloc(sizeof(*meta), GFP_KERNEL); |
278 | if (meta) { | 279 | if (meta) { |
279 | meta->sequence = src_buf->v4l2_buf.sequence; | 280 | meta->sequence = src_buf->sequence; |
280 | meta->timecode = src_buf->v4l2_buf.timecode; | 281 | meta->timecode = src_buf->timecode; |
281 | meta->timestamp = src_buf->v4l2_buf.timestamp; | 282 | meta->timestamp = src_buf->timestamp; |
282 | meta->start = start; | 283 | meta->start = start; |
283 | meta->end = ctx->bitstream_fifo.kfifo.in & | 284 | meta->end = ctx->bitstream_fifo.kfifo.in & |
284 | ctx->bitstream_fifo.kfifo.mask; | 285 | ctx->bitstream_fifo.kfifo.mask; |
@@ -483,20 +484,21 @@ err: | |||
483 | return ret; | 484 | return ret; |
484 | } | 485 | } |
485 | 486 | ||
486 | static int coda_encode_header(struct coda_ctx *ctx, struct vb2_buffer *buf, | 487 | static int coda_encode_header(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf, |
487 | int header_code, u8 *header, int *size) | 488 | int header_code, u8 *header, int *size) |
488 | { | 489 | { |
490 | struct vb2_buffer *vb = &buf->vb2_buf; | ||
489 | struct coda_dev *dev = ctx->dev; | 491 | struct coda_dev *dev = ctx->dev; |
490 | size_t bufsize; | 492 | size_t bufsize; |
491 | int ret; | 493 | int ret; |
492 | int i; | 494 | int i; |
493 | 495 | ||
494 | if (dev->devtype->product == CODA_960) | 496 | if (dev->devtype->product == CODA_960) |
495 | memset(vb2_plane_vaddr(buf, 0), 0, 64); | 497 | memset(vb2_plane_vaddr(vb, 0), 0, 64); |
496 | 498 | ||
497 | coda_write(dev, vb2_dma_contig_plane_dma_addr(buf, 0), | 499 | coda_write(dev, vb2_dma_contig_plane_dma_addr(vb, 0), |
498 | CODA_CMD_ENC_HEADER_BB_START); | 500 | CODA_CMD_ENC_HEADER_BB_START); |
499 | bufsize = vb2_plane_size(buf, 0); | 501 | bufsize = vb2_plane_size(vb, 0); |
500 | if (dev->devtype->product == CODA_960) | 502 | if (dev->devtype->product == CODA_960) |
501 | bufsize /= 1024; | 503 | bufsize /= 1024; |
502 | coda_write(dev, bufsize, CODA_CMD_ENC_HEADER_BB_SIZE); | 504 | coda_write(dev, bufsize, CODA_CMD_ENC_HEADER_BB_SIZE); |
@@ -509,14 +511,14 @@ static int coda_encode_header(struct coda_ctx *ctx, struct vb2_buffer *buf, | |||
509 | 511 | ||
510 | if (dev->devtype->product == CODA_960) { | 512 | if (dev->devtype->product == CODA_960) { |
511 | for (i = 63; i > 0; i--) | 513 | for (i = 63; i > 0; i--) |
512 | if (((char *)vb2_plane_vaddr(buf, 0))[i] != 0) | 514 | if (((char *)vb2_plane_vaddr(vb, 0))[i] != 0) |
513 | break; | 515 | break; |
514 | *size = i + 1; | 516 | *size = i + 1; |
515 | } else { | 517 | } else { |
516 | *size = coda_read(dev, CODA_REG_BIT_WR_PTR(ctx->reg_idx)) - | 518 | *size = coda_read(dev, CODA_REG_BIT_WR_PTR(ctx->reg_idx)) - |
517 | coda_read(dev, CODA_CMD_ENC_HEADER_BB_START); | 519 | coda_read(dev, CODA_CMD_ENC_HEADER_BB_START); |
518 | } | 520 | } |
519 | memcpy(header, vb2_plane_vaddr(buf, 0), *size); | 521 | memcpy(header, vb2_plane_vaddr(vb, 0), *size); |
520 | 522 | ||
521 | return 0; | 523 | return 0; |
522 | } | 524 | } |
@@ -799,7 +801,7 @@ static int coda_start_encoding(struct coda_ctx *ctx) | |||
799 | struct v4l2_device *v4l2_dev = &dev->v4l2_dev; | 801 | struct v4l2_device *v4l2_dev = &dev->v4l2_dev; |
800 | struct coda_q_data *q_data_src, *q_data_dst; | 802 | struct coda_q_data *q_data_src, *q_data_dst; |
801 | u32 bitstream_buf, bitstream_size; | 803 | u32 bitstream_buf, bitstream_size; |
802 | struct vb2_buffer *buf; | 804 | struct vb2_v4l2_buffer *buf; |
803 | int gamma, ret, value; | 805 | int gamma, ret, value; |
804 | u32 dst_fourcc; | 806 | u32 dst_fourcc; |
805 | int num_fb; | 807 | int num_fb; |
@@ -810,7 +812,7 @@ static int coda_start_encoding(struct coda_ctx *ctx) | |||
810 | dst_fourcc = q_data_dst->fourcc; | 812 | dst_fourcc = q_data_dst->fourcc; |
811 | 813 | ||
812 | buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx); | 814 | buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx); |
813 | bitstream_buf = vb2_dma_contig_plane_dma_addr(buf, 0); | 815 | bitstream_buf = vb2_dma_contig_plane_dma_addr(&buf->vb2_buf, 0); |
814 | bitstream_size = q_data_dst->sizeimage; | 816 | bitstream_size = q_data_dst->sizeimage; |
815 | 817 | ||
816 | if (!coda_is_initialized(dev)) { | 818 | if (!coda_is_initialized(dev)) { |
@@ -1185,7 +1187,7 @@ out: | |||
1185 | static int coda_prepare_encode(struct coda_ctx *ctx) | 1187 | static int coda_prepare_encode(struct coda_ctx *ctx) |
1186 | { | 1188 | { |
1187 | struct coda_q_data *q_data_src, *q_data_dst; | 1189 | struct coda_q_data *q_data_src, *q_data_dst; |
1188 | struct vb2_buffer *src_buf, *dst_buf; | 1190 | struct vb2_v4l2_buffer *src_buf, *dst_buf; |
1189 | struct coda_dev *dev = ctx->dev; | 1191 | struct coda_dev *dev = ctx->dev; |
1190 | int force_ipicture; | 1192 | int force_ipicture; |
1191 | int quant_param = 0; | 1193 | int quant_param = 0; |
@@ -1200,8 +1202,8 @@ static int coda_prepare_encode(struct coda_ctx *ctx) | |||
1200 | q_data_dst = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE); | 1202 | q_data_dst = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE); |
1201 | dst_fourcc = q_data_dst->fourcc; | 1203 | dst_fourcc = q_data_dst->fourcc; |
1202 | 1204 | ||
1203 | src_buf->v4l2_buf.sequence = ctx->osequence; | 1205 | src_buf->sequence = ctx->osequence; |
1204 | dst_buf->v4l2_buf.sequence = ctx->osequence; | 1206 | dst_buf->sequence = ctx->osequence; |
1205 | ctx->osequence++; | 1207 | ctx->osequence++; |
1206 | 1208 | ||
1207 | /* | 1209 | /* |
@@ -1209,12 +1211,12 @@ static int coda_prepare_encode(struct coda_ctx *ctx) | |||
1209 | * frame as IDR. This is a problem for some decoders that can't | 1211 | * frame as IDR. This is a problem for some decoders that can't |
1210 | * recover when a frame is lost. | 1212 | * recover when a frame is lost. |
1211 | */ | 1213 | */ |
1212 | if (src_buf->v4l2_buf.sequence % ctx->params.gop_size) { | 1214 | if (src_buf->sequence % ctx->params.gop_size) { |
1213 | src_buf->v4l2_buf.flags |= V4L2_BUF_FLAG_PFRAME; | 1215 | src_buf->flags |= V4L2_BUF_FLAG_PFRAME; |
1214 | src_buf->v4l2_buf.flags &= ~V4L2_BUF_FLAG_KEYFRAME; | 1216 | src_buf->flags &= ~V4L2_BUF_FLAG_KEYFRAME; |
1215 | } else { | 1217 | } else { |
1216 | src_buf->v4l2_buf.flags |= V4L2_BUF_FLAG_KEYFRAME; | 1218 | src_buf->flags |= V4L2_BUF_FLAG_KEYFRAME; |
1217 | src_buf->v4l2_buf.flags &= ~V4L2_BUF_FLAG_PFRAME; | 1219 | src_buf->flags &= ~V4L2_BUF_FLAG_PFRAME; |
1218 | } | 1220 | } |
1219 | 1221 | ||
1220 | if (dev->devtype->product == CODA_960) | 1222 | if (dev->devtype->product == CODA_960) |
@@ -1224,9 +1226,9 @@ static int coda_prepare_encode(struct coda_ctx *ctx) | |||
1224 | * Copy headers at the beginning of the first frame for H.264 only. | 1226 | * Copy headers at the beginning of the first frame for H.264 only. |
1225 | * In MPEG4 they are already copied by the coda. | 1227 | * In MPEG4 they are already copied by the coda. |
1226 | */ | 1228 | */ |
1227 | if (src_buf->v4l2_buf.sequence == 0) { | 1229 | if (src_buf->sequence == 0) { |
1228 | pic_stream_buffer_addr = | 1230 | pic_stream_buffer_addr = |
1229 | vb2_dma_contig_plane_dma_addr(dst_buf, 0) + | 1231 | vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0) + |
1230 | ctx->vpu_header_size[0] + | 1232 | ctx->vpu_header_size[0] + |
1231 | ctx->vpu_header_size[1] + | 1233 | ctx->vpu_header_size[1] + |
1232 | ctx->vpu_header_size[2]; | 1234 | ctx->vpu_header_size[2]; |
@@ -1234,20 +1236,21 @@ static int coda_prepare_encode(struct coda_ctx *ctx) | |||
1234 | ctx->vpu_header_size[0] - | 1236 | ctx->vpu_header_size[0] - |
1235 | ctx->vpu_header_size[1] - | 1237 | ctx->vpu_header_size[1] - |
1236 | ctx->vpu_header_size[2]; | 1238 | ctx->vpu_header_size[2]; |
1237 | memcpy(vb2_plane_vaddr(dst_buf, 0), | 1239 | memcpy(vb2_plane_vaddr(&dst_buf->vb2_buf, 0), |
1238 | &ctx->vpu_header[0][0], ctx->vpu_header_size[0]); | 1240 | &ctx->vpu_header[0][0], ctx->vpu_header_size[0]); |
1239 | memcpy(vb2_plane_vaddr(dst_buf, 0) + ctx->vpu_header_size[0], | 1241 | memcpy(vb2_plane_vaddr(&dst_buf->vb2_buf, 0) |
1240 | &ctx->vpu_header[1][0], ctx->vpu_header_size[1]); | 1242 | + ctx->vpu_header_size[0], &ctx->vpu_header[1][0], |
1241 | memcpy(vb2_plane_vaddr(dst_buf, 0) + ctx->vpu_header_size[0] + | 1243 | ctx->vpu_header_size[1]); |
1242 | ctx->vpu_header_size[1], &ctx->vpu_header[2][0], | 1244 | memcpy(vb2_plane_vaddr(&dst_buf->vb2_buf, 0) |
1243 | ctx->vpu_header_size[2]); | 1245 | + ctx->vpu_header_size[0] + ctx->vpu_header_size[1], |
1246 | &ctx->vpu_header[2][0], ctx->vpu_header_size[2]); | ||
1244 | } else { | 1247 | } else { |
1245 | pic_stream_buffer_addr = | 1248 | pic_stream_buffer_addr = |
1246 | vb2_dma_contig_plane_dma_addr(dst_buf, 0); | 1249 | vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0); |
1247 | pic_stream_buffer_size = q_data_dst->sizeimage; | 1250 | pic_stream_buffer_size = q_data_dst->sizeimage; |
1248 | } | 1251 | } |
1249 | 1252 | ||
1250 | if (src_buf->v4l2_buf.flags & V4L2_BUF_FLAG_KEYFRAME) { | 1253 | if (src_buf->flags & V4L2_BUF_FLAG_KEYFRAME) { |
1251 | force_ipicture = 1; | 1254 | force_ipicture = 1; |
1252 | switch (dst_fourcc) { | 1255 | switch (dst_fourcc) { |
1253 | case V4L2_PIX_FMT_H264: | 1256 | case V4L2_PIX_FMT_H264: |
@@ -1324,7 +1327,7 @@ static int coda_prepare_encode(struct coda_ctx *ctx) | |||
1324 | 1327 | ||
1325 | static void coda_finish_encode(struct coda_ctx *ctx) | 1328 | static void coda_finish_encode(struct coda_ctx *ctx) |
1326 | { | 1329 | { |
1327 | struct vb2_buffer *src_buf, *dst_buf; | 1330 | struct vb2_v4l2_buffer *src_buf, *dst_buf; |
1328 | struct coda_dev *dev = ctx->dev; | 1331 | struct coda_dev *dev = ctx->dev; |
1329 | u32 wr_ptr, start_ptr; | 1332 | u32 wr_ptr, start_ptr; |
1330 | 1333 | ||
@@ -1338,13 +1341,13 @@ static void coda_finish_encode(struct coda_ctx *ctx) | |||
1338 | wr_ptr = coda_read(dev, CODA_REG_BIT_WR_PTR(ctx->reg_idx)); | 1341 | wr_ptr = coda_read(dev, CODA_REG_BIT_WR_PTR(ctx->reg_idx)); |
1339 | 1342 | ||
1340 | /* Calculate bytesused field */ | 1343 | /* Calculate bytesused field */ |
1341 | if (dst_buf->v4l2_buf.sequence == 0) { | 1344 | if (dst_buf->sequence == 0) { |
1342 | vb2_set_plane_payload(dst_buf, 0, wr_ptr - start_ptr + | 1345 | vb2_set_plane_payload(&dst_buf->vb2_buf, 0, |
1343 | ctx->vpu_header_size[0] + | 1346 | ctx->vpu_header_size[0] + |
1344 | ctx->vpu_header_size[1] + | 1347 | ctx->vpu_header_size[1] + |
1345 | ctx->vpu_header_size[2]); | 1348 | ctx->vpu_header_size[2]); |
1346 | } else { | 1349 | } else { |
1347 | vb2_set_plane_payload(dst_buf, 0, wr_ptr - start_ptr); | 1350 | vb2_set_plane_payload(&dst_buf->vb2_buf, 0, wr_ptr - start_ptr); |
1348 | } | 1351 | } |
1349 | 1352 | ||
1350 | v4l2_dbg(1, coda_debug, &ctx->dev->v4l2_dev, "frame size = %u\n", | 1353 | v4l2_dbg(1, coda_debug, &ctx->dev->v4l2_dev, "frame size = %u\n", |
@@ -1354,18 +1357,18 @@ static void coda_finish_encode(struct coda_ctx *ctx) | |||
1354 | coda_read(dev, CODA_RET_ENC_PIC_FLAG); | 1357 | coda_read(dev, CODA_RET_ENC_PIC_FLAG); |
1355 | 1358 | ||
1356 | if (coda_read(dev, CODA_RET_ENC_PIC_TYPE) == 0) { | 1359 | if (coda_read(dev, CODA_RET_ENC_PIC_TYPE) == 0) { |
1357 | dst_buf->v4l2_buf.flags |= V4L2_BUF_FLAG_KEYFRAME; | 1360 | dst_buf->flags |= V4L2_BUF_FLAG_KEYFRAME; |
1358 | dst_buf->v4l2_buf.flags &= ~V4L2_BUF_FLAG_PFRAME; | 1361 | dst_buf->flags &= ~V4L2_BUF_FLAG_PFRAME; |
1359 | } else { | 1362 | } else { |
1360 | dst_buf->v4l2_buf.flags |= V4L2_BUF_FLAG_PFRAME; | 1363 | dst_buf->flags |= V4L2_BUF_FLAG_PFRAME; |
1361 | dst_buf->v4l2_buf.flags &= ~V4L2_BUF_FLAG_KEYFRAME; | 1364 | dst_buf->flags &= ~V4L2_BUF_FLAG_KEYFRAME; |
1362 | } | 1365 | } |
1363 | 1366 | ||
1364 | dst_buf->v4l2_buf.timestamp = src_buf->v4l2_buf.timestamp; | 1367 | dst_buf->timestamp = src_buf->timestamp; |
1365 | dst_buf->v4l2_buf.flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK; | 1368 | dst_buf->flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK; |
1366 | dst_buf->v4l2_buf.flags |= | 1369 | dst_buf->flags |= |
1367 | src_buf->v4l2_buf.flags & V4L2_BUF_FLAG_TSTAMP_SRC_MASK; | 1370 | src_buf->flags & V4L2_BUF_FLAG_TSTAMP_SRC_MASK; |
1368 | dst_buf->v4l2_buf.timecode = src_buf->v4l2_buf.timecode; | 1371 | dst_buf->timecode = src_buf->timecode; |
1369 | 1372 | ||
1370 | v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE); | 1373 | v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE); |
1371 | 1374 | ||
@@ -1378,8 +1381,8 @@ static void coda_finish_encode(struct coda_ctx *ctx) | |||
1378 | 1381 | ||
1379 | v4l2_dbg(1, coda_debug, &dev->v4l2_dev, | 1382 | v4l2_dbg(1, coda_debug, &dev->v4l2_dev, |
1380 | "job finished: encoding frame (%d) (%s)\n", | 1383 | "job finished: encoding frame (%d) (%s)\n", |
1381 | dst_buf->v4l2_buf.sequence, | 1384 | dst_buf->sequence, |
1382 | (dst_buf->v4l2_buf.flags & V4L2_BUF_FLAG_KEYFRAME) ? | 1385 | (dst_buf->flags & V4L2_BUF_FLAG_KEYFRAME) ? |
1383 | "KEYFRAME" : "PFRAME"); | 1386 | "KEYFRAME" : "PFRAME"); |
1384 | } | 1387 | } |
1385 | 1388 | ||
@@ -1716,7 +1719,7 @@ static int coda_start_decoding(struct coda_ctx *ctx) | |||
1716 | 1719 | ||
1717 | static int coda_prepare_decode(struct coda_ctx *ctx) | 1720 | static int coda_prepare_decode(struct coda_ctx *ctx) |
1718 | { | 1721 | { |
1719 | struct vb2_buffer *dst_buf; | 1722 | struct vb2_v4l2_buffer *dst_buf; |
1720 | struct coda_dev *dev = ctx->dev; | 1723 | struct coda_dev *dev = ctx->dev; |
1721 | struct coda_q_data *q_data_dst; | 1724 | struct coda_q_data *q_data_dst; |
1722 | struct coda_buffer_meta *meta; | 1725 | struct coda_buffer_meta *meta; |
@@ -1763,7 +1766,7 @@ static int coda_prepare_decode(struct coda_ctx *ctx) | |||
1763 | * well as the rotator buffer output. | 1766 | * well as the rotator buffer output. |
1764 | * ROT_INDEX needs to be < 0x40, but > ctx->num_internal_frames. | 1767 | * ROT_INDEX needs to be < 0x40, but > ctx->num_internal_frames. |
1765 | */ | 1768 | */ |
1766 | coda_write(dev, CODA_MAX_FRAMEBUFFERS + dst_buf->v4l2_buf.index, | 1769 | coda_write(dev, CODA_MAX_FRAMEBUFFERS + dst_buf->vb2_buf.index, |
1767 | CODA9_CMD_DEC_PIC_ROT_INDEX); | 1770 | CODA9_CMD_DEC_PIC_ROT_INDEX); |
1768 | 1771 | ||
1769 | reg_addr = CODA9_CMD_DEC_PIC_ROT_ADDR_Y; | 1772 | reg_addr = CODA9_CMD_DEC_PIC_ROT_ADDR_Y; |
@@ -1838,7 +1841,7 @@ static void coda_finish_decode(struct coda_ctx *ctx) | |||
1838 | struct coda_dev *dev = ctx->dev; | 1841 | struct coda_dev *dev = ctx->dev; |
1839 | struct coda_q_data *q_data_src; | 1842 | struct coda_q_data *q_data_src; |
1840 | struct coda_q_data *q_data_dst; | 1843 | struct coda_q_data *q_data_dst; |
1841 | struct vb2_buffer *dst_buf; | 1844 | struct vb2_v4l2_buffer *dst_buf; |
1842 | struct coda_buffer_meta *meta; | 1845 | struct coda_buffer_meta *meta; |
1843 | unsigned long payload; | 1846 | unsigned long payload; |
1844 | unsigned long flags; | 1847 | unsigned long flags; |
@@ -2029,15 +2032,15 @@ static void coda_finish_decode(struct coda_ctx *ctx) | |||
2029 | if (ctx->display_idx >= 0 && | 2032 | if (ctx->display_idx >= 0 && |
2030 | ctx->display_idx < ctx->num_internal_frames) { | 2033 | ctx->display_idx < ctx->num_internal_frames) { |
2031 | dst_buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx); | 2034 | dst_buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx); |
2032 | dst_buf->v4l2_buf.sequence = ctx->osequence++; | 2035 | dst_buf->sequence = ctx->osequence++; |
2033 | 2036 | ||
2034 | dst_buf->v4l2_buf.flags &= ~(V4L2_BUF_FLAG_KEYFRAME | | 2037 | dst_buf->flags &= ~(V4L2_BUF_FLAG_KEYFRAME | |
2035 | V4L2_BUF_FLAG_PFRAME | | 2038 | V4L2_BUF_FLAG_PFRAME | |
2036 | V4L2_BUF_FLAG_BFRAME); | 2039 | V4L2_BUF_FLAG_BFRAME); |
2037 | dst_buf->v4l2_buf.flags |= ctx->frame_types[ctx->display_idx]; | 2040 | dst_buf->flags |= ctx->frame_types[ctx->display_idx]; |
2038 | meta = &ctx->frame_metas[ctx->display_idx]; | 2041 | meta = &ctx->frame_metas[ctx->display_idx]; |
2039 | dst_buf->v4l2_buf.timecode = meta->timecode; | 2042 | dst_buf->timecode = meta->timecode; |
2040 | dst_buf->v4l2_buf.timestamp = meta->timestamp; | 2043 | dst_buf->timestamp = meta->timestamp; |
2041 | 2044 | ||
2042 | trace_coda_dec_rot_done(ctx, dst_buf, meta); | 2045 | trace_coda_dec_rot_done(ctx, dst_buf, meta); |
2043 | 2046 | ||
@@ -2052,15 +2055,15 @@ static void coda_finish_decode(struct coda_ctx *ctx) | |||
2052 | payload = width * height * 2; | 2055 | payload = width * height * 2; |
2053 | break; | 2056 | break; |
2054 | } | 2057 | } |
2055 | vb2_set_plane_payload(dst_buf, 0, payload); | 2058 | vb2_set_plane_payload(&dst_buf->vb2_buf, 0, payload); |
2056 | 2059 | ||
2057 | coda_m2m_buf_done(ctx, dst_buf, ctx->frame_errors[display_idx] ? | 2060 | coda_m2m_buf_done(ctx, dst_buf, ctx->frame_errors[display_idx] ? |
2058 | VB2_BUF_STATE_ERROR : VB2_BUF_STATE_DONE); | 2061 | VB2_BUF_STATE_ERROR : VB2_BUF_STATE_DONE); |
2059 | 2062 | ||
2060 | v4l2_dbg(1, coda_debug, &dev->v4l2_dev, | 2063 | v4l2_dbg(1, coda_debug, &dev->v4l2_dev, |
2061 | "job finished: decoding frame (%d) (%s)\n", | 2064 | "job finished: decoding frame (%d) (%s)\n", |
2062 | dst_buf->v4l2_buf.sequence, | 2065 | dst_buf->sequence, |
2063 | (dst_buf->v4l2_buf.flags & V4L2_BUF_FLAG_KEYFRAME) ? | 2066 | (dst_buf->flags & V4L2_BUF_FLAG_KEYFRAME) ? |
2064 | "KEYFRAME" : "PFRAME"); | 2067 | "KEYFRAME" : "PFRAME"); |
2065 | } else { | 2068 | } else { |
2066 | v4l2_dbg(1, coda_debug, &dev->v4l2_dev, | 2069 | v4l2_dbg(1, coda_debug, &dev->v4l2_dev, |
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index 998fe6614b33..60336eec75af 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c | |||
@@ -84,9 +84,9 @@ unsigned int coda_read(struct coda_dev *dev, u32 reg) | |||
84 | } | 84 | } |
85 | 85 | ||
86 | void coda_write_base(struct coda_ctx *ctx, struct coda_q_data *q_data, | 86 | void coda_write_base(struct coda_ctx *ctx, struct coda_q_data *q_data, |
87 | struct vb2_buffer *buf, unsigned int reg_y) | 87 | struct vb2_v4l2_buffer *buf, unsigned int reg_y) |
88 | { | 88 | { |
89 | u32 base_y = vb2_dma_contig_plane_dma_addr(buf, 0); | 89 | u32 base_y = vb2_dma_contig_plane_dma_addr(&buf->vb2_buf, 0); |
90 | u32 base_cb, base_cr; | 90 | u32 base_cb, base_cr; |
91 | 91 | ||
92 | switch (q_data->fourcc) { | 92 | switch (q_data->fourcc) { |
@@ -684,17 +684,17 @@ static int coda_qbuf(struct file *file, void *priv, | |||
684 | } | 684 | } |
685 | 685 | ||
686 | static bool coda_buf_is_end_of_stream(struct coda_ctx *ctx, | 686 | static bool coda_buf_is_end_of_stream(struct coda_ctx *ctx, |
687 | struct vb2_buffer *buf) | 687 | struct vb2_v4l2_buffer *buf) |
688 | { | 688 | { |
689 | struct vb2_queue *src_vq; | 689 | struct vb2_queue *src_vq; |
690 | 690 | ||
691 | src_vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); | 691 | src_vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); |
692 | 692 | ||
693 | return ((ctx->bit_stream_param & CODA_BIT_STREAM_END_FLAG) && | 693 | return ((ctx->bit_stream_param & CODA_BIT_STREAM_END_FLAG) && |
694 | (buf->v4l2_buf.sequence == (ctx->qsequence - 1))); | 694 | (buf->sequence == (ctx->qsequence - 1))); |
695 | } | 695 | } |
696 | 696 | ||
697 | void coda_m2m_buf_done(struct coda_ctx *ctx, struct vb2_buffer *buf, | 697 | void coda_m2m_buf_done(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf, |
698 | enum vb2_buffer_state state) | 698 | enum vb2_buffer_state state) |
699 | { | 699 | { |
700 | const struct v4l2_event eos_event = { | 700 | const struct v4l2_event eos_event = { |
@@ -702,7 +702,7 @@ void coda_m2m_buf_done(struct coda_ctx *ctx, struct vb2_buffer *buf, | |||
702 | }; | 702 | }; |
703 | 703 | ||
704 | if (coda_buf_is_end_of_stream(ctx, buf)) { | 704 | if (coda_buf_is_end_of_stream(ctx, buf)) { |
705 | buf->v4l2_buf.flags |= V4L2_BUF_FLAG_LAST; | 705 | buf->flags |= V4L2_BUF_FLAG_LAST; |
706 | 706 | ||
707 | v4l2_event_queue_fh(&ctx->fh, &eos_event); | 707 | v4l2_event_queue_fh(&ctx->fh, &eos_event); |
708 | } | 708 | } |
@@ -1175,6 +1175,7 @@ static int coda_buf_prepare(struct vb2_buffer *vb) | |||
1175 | 1175 | ||
1176 | static void coda_buf_queue(struct vb2_buffer *vb) | 1176 | static void coda_buf_queue(struct vb2_buffer *vb) |
1177 | { | 1177 | { |
1178 | struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); | ||
1178 | struct coda_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue); | 1179 | struct coda_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue); |
1179 | struct vb2_queue *vq = vb->vb2_queue; | 1180 | struct vb2_queue *vq = vb->vb2_queue; |
1180 | struct coda_q_data *q_data; | 1181 | struct coda_q_data *q_data; |
@@ -1193,12 +1194,12 @@ static void coda_buf_queue(struct vb2_buffer *vb) | |||
1193 | if (vb2_get_plane_payload(vb, 0) == 0) | 1194 | if (vb2_get_plane_payload(vb, 0) == 0) |
1194 | coda_bit_stream_end_flag(ctx); | 1195 | coda_bit_stream_end_flag(ctx); |
1195 | mutex_lock(&ctx->bitstream_mutex); | 1196 | mutex_lock(&ctx->bitstream_mutex); |
1196 | v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vb); | 1197 | v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf); |
1197 | if (vb2_is_streaming(vb->vb2_queue)) | 1198 | if (vb2_is_streaming(vb->vb2_queue)) |
1198 | coda_fill_bitstream(ctx, true); | 1199 | coda_fill_bitstream(ctx, true); |
1199 | mutex_unlock(&ctx->bitstream_mutex); | 1200 | mutex_unlock(&ctx->bitstream_mutex); |
1200 | } else { | 1201 | } else { |
1201 | v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vb); | 1202 | v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf); |
1202 | } | 1203 | } |
1203 | } | 1204 | } |
1204 | 1205 | ||
@@ -1247,7 +1248,7 @@ static int coda_start_streaming(struct vb2_queue *q, unsigned int count) | |||
1247 | struct coda_ctx *ctx = vb2_get_drv_priv(q); | 1248 | struct coda_ctx *ctx = vb2_get_drv_priv(q); |
1248 | struct v4l2_device *v4l2_dev = &ctx->dev->v4l2_dev; | 1249 | struct v4l2_device *v4l2_dev = &ctx->dev->v4l2_dev; |
1249 | struct coda_q_data *q_data_src, *q_data_dst; | 1250 | struct coda_q_data *q_data_src, *q_data_dst; |
1250 | struct vb2_buffer *buf; | 1251 | struct vb2_v4l2_buffer *buf; |
1251 | int ret = 0; | 1252 | int ret = 0; |
1252 | 1253 | ||
1253 | q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); | 1254 | q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); |
@@ -1338,7 +1339,7 @@ static void coda_stop_streaming(struct vb2_queue *q) | |||
1338 | { | 1339 | { |
1339 | struct coda_ctx *ctx = vb2_get_drv_priv(q); | 1340 | struct coda_ctx *ctx = vb2_get_drv_priv(q); |
1340 | struct coda_dev *dev = ctx->dev; | 1341 | struct coda_dev *dev = ctx->dev; |
1341 | struct vb2_buffer *buf; | 1342 | struct vb2_v4l2_buffer *buf; |
1342 | unsigned long flags; | 1343 | unsigned long flags; |
1343 | bool stop; | 1344 | bool stop; |
1344 | 1345 | ||
diff --git a/drivers/media/platform/coda/coda-jpeg.c b/drivers/media/platform/coda/coda-jpeg.c index 11e734bc2cbd..96cd42a0baaf 100644 --- a/drivers/media/platform/coda/coda-jpeg.c +++ b/drivers/media/platform/coda/coda-jpeg.c | |||
@@ -178,12 +178,12 @@ int coda_jpeg_write_tables(struct coda_ctx *ctx) | |||
178 | return 0; | 178 | return 0; |
179 | } | 179 | } |
180 | 180 | ||
181 | bool coda_jpeg_check_buffer(struct coda_ctx *ctx, struct vb2_buffer *vb) | 181 | bool coda_jpeg_check_buffer(struct coda_ctx *ctx, struct vb2_v4l2_buffer *vb) |
182 | { | 182 | { |
183 | void *vaddr = vb2_plane_vaddr(vb, 0); | 183 | void *vaddr = vb2_plane_vaddr(&vb->vb2_buf, 0); |
184 | u16 soi = be16_to_cpup((__be16 *)vaddr); | 184 | u16 soi = be16_to_cpup((__be16 *)vaddr); |
185 | u16 eoi = be16_to_cpup((__be16 *)(vaddr + | 185 | u16 eoi = be16_to_cpup((__be16 *)(vaddr + |
186 | vb2_get_plane_payload(vb, 0) - 2)); | 186 | vb2_get_plane_payload(&vb->vb2_buf, 0) - 2)); |
187 | 187 | ||
188 | return soi == SOI_MARKER && eoi == EOI_MARKER; | 188 | return soi == SOI_MARKER && eoi == EOI_MARKER; |
189 | } | 189 | } |
diff --git a/drivers/media/platform/coda/coda.h b/drivers/media/platform/coda/coda.h index feb9671a12bd..96532b06bd9e 100644 --- a/drivers/media/platform/coda/coda.h +++ b/drivers/media/platform/coda/coda.h | |||
@@ -243,7 +243,7 @@ extern int coda_debug; | |||
243 | void coda_write(struct coda_dev *dev, u32 data, u32 reg); | 243 | void coda_write(struct coda_dev *dev, u32 data, u32 reg); |
244 | unsigned int coda_read(struct coda_dev *dev, u32 reg); | 244 | unsigned int coda_read(struct coda_dev *dev, u32 reg); |
245 | void coda_write_base(struct coda_ctx *ctx, struct coda_q_data *q_data, | 245 | void coda_write_base(struct coda_ctx *ctx, struct coda_q_data *q_data, |
246 | struct vb2_buffer *buf, unsigned int reg_y); | 246 | struct vb2_v4l2_buffer *buf, unsigned int reg_y); |
247 | 247 | ||
248 | int coda_alloc_aux_buf(struct coda_dev *dev, struct coda_aux_buf *buf, | 248 | int coda_alloc_aux_buf(struct coda_dev *dev, struct coda_aux_buf *buf, |
249 | size_t size, const char *name, struct dentry *parent); | 249 | size_t size, const char *name, struct dentry *parent); |
@@ -284,12 +284,12 @@ static inline unsigned int coda_get_bitstream_payload(struct coda_ctx *ctx) | |||
284 | 284 | ||
285 | void coda_bit_stream_end_flag(struct coda_ctx *ctx); | 285 | void coda_bit_stream_end_flag(struct coda_ctx *ctx); |
286 | 286 | ||
287 | void coda_m2m_buf_done(struct coda_ctx *ctx, struct vb2_buffer *buf, | 287 | void coda_m2m_buf_done(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf, |
288 | enum vb2_buffer_state state); | 288 | enum vb2_buffer_state state); |
289 | 289 | ||
290 | int coda_h264_padding(int size, char *p); | 290 | int coda_h264_padding(int size, char *p); |
291 | 291 | ||
292 | bool coda_jpeg_check_buffer(struct coda_ctx *ctx, struct vb2_buffer *vb); | 292 | bool coda_jpeg_check_buffer(struct coda_ctx *ctx, struct vb2_v4l2_buffer *vb); |
293 | int coda_jpeg_write_tables(struct coda_ctx *ctx); | 293 | int coda_jpeg_write_tables(struct coda_ctx *ctx); |
294 | void coda_set_jpeg_compression_quality(struct coda_ctx *ctx, int quality); | 294 | void coda_set_jpeg_compression_quality(struct coda_ctx *ctx, int quality); |
295 | 295 | ||
diff --git a/drivers/media/platform/coda/trace.h b/drivers/media/platform/coda/trace.h index 9db6a6662913..f20666a4aa89 100644 --- a/drivers/media/platform/coda/trace.h +++ b/drivers/media/platform/coda/trace.h | |||
@@ -49,7 +49,7 @@ TRACE_EVENT(coda_bit_done, | |||
49 | ); | 49 | ); |
50 | 50 | ||
51 | DECLARE_EVENT_CLASS(coda_buf_class, | 51 | DECLARE_EVENT_CLASS(coda_buf_class, |
52 | TP_PROTO(struct coda_ctx *ctx, struct vb2_buffer *buf), | 52 | TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf), |
53 | 53 | ||
54 | TP_ARGS(ctx, buf), | 54 | TP_ARGS(ctx, buf), |
55 | 55 | ||
@@ -61,7 +61,7 @@ DECLARE_EVENT_CLASS(coda_buf_class, | |||
61 | 61 | ||
62 | TP_fast_assign( | 62 | TP_fast_assign( |
63 | __entry->minor = ctx->fh.vdev->minor; | 63 | __entry->minor = ctx->fh.vdev->minor; |
64 | __entry->index = buf->v4l2_buf.index; | 64 | __entry->index = buf->vb2_buf.index; |
65 | __entry->ctx = ctx->idx; | 65 | __entry->ctx = ctx->idx; |
66 | ), | 66 | ), |
67 | 67 | ||
@@ -70,17 +70,17 @@ DECLARE_EVENT_CLASS(coda_buf_class, | |||
70 | ); | 70 | ); |
71 | 71 | ||
72 | DEFINE_EVENT(coda_buf_class, coda_enc_pic_run, | 72 | DEFINE_EVENT(coda_buf_class, coda_enc_pic_run, |
73 | TP_PROTO(struct coda_ctx *ctx, struct vb2_buffer *buf), | 73 | TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf), |
74 | TP_ARGS(ctx, buf) | 74 | TP_ARGS(ctx, buf) |
75 | ); | 75 | ); |
76 | 76 | ||
77 | DEFINE_EVENT(coda_buf_class, coda_enc_pic_done, | 77 | DEFINE_EVENT(coda_buf_class, coda_enc_pic_done, |
78 | TP_PROTO(struct coda_ctx *ctx, struct vb2_buffer *buf), | 78 | TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf), |
79 | TP_ARGS(ctx, buf) | 79 | TP_ARGS(ctx, buf) |
80 | ); | 80 | ); |
81 | 81 | ||
82 | DECLARE_EVENT_CLASS(coda_buf_meta_class, | 82 | DECLARE_EVENT_CLASS(coda_buf_meta_class, |
83 | TP_PROTO(struct coda_ctx *ctx, struct vb2_buffer *buf, | 83 | TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf, |
84 | struct coda_buffer_meta *meta), | 84 | struct coda_buffer_meta *meta), |
85 | 85 | ||
86 | TP_ARGS(ctx, buf, meta), | 86 | TP_ARGS(ctx, buf, meta), |
@@ -95,7 +95,7 @@ DECLARE_EVENT_CLASS(coda_buf_meta_class, | |||
95 | 95 | ||
96 | TP_fast_assign( | 96 | TP_fast_assign( |
97 | __entry->minor = ctx->fh.vdev->minor; | 97 | __entry->minor = ctx->fh.vdev->minor; |
98 | __entry->index = buf->v4l2_buf.index; | 98 | __entry->index = buf->vb2_buf.index; |
99 | __entry->start = meta->start; | 99 | __entry->start = meta->start; |
100 | __entry->end = meta->end; | 100 | __entry->end = meta->end; |
101 | __entry->ctx = ctx->idx; | 101 | __entry->ctx = ctx->idx; |
@@ -107,7 +107,7 @@ DECLARE_EVENT_CLASS(coda_buf_meta_class, | |||
107 | ); | 107 | ); |
108 | 108 | ||
109 | DEFINE_EVENT(coda_buf_meta_class, coda_bit_queue, | 109 | DEFINE_EVENT(coda_buf_meta_class, coda_bit_queue, |
110 | TP_PROTO(struct coda_ctx *ctx, struct vb2_buffer *buf, | 110 | TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf, |
111 | struct coda_buffer_meta *meta), | 111 | struct coda_buffer_meta *meta), |
112 | TP_ARGS(ctx, buf, meta) | 112 | TP_ARGS(ctx, buf, meta) |
113 | ); | 113 | ); |
@@ -146,7 +146,7 @@ DEFINE_EVENT(coda_meta_class, coda_dec_pic_done, | |||
146 | ); | 146 | ); |
147 | 147 | ||
148 | DEFINE_EVENT(coda_buf_meta_class, coda_dec_rot_done, | 148 | DEFINE_EVENT(coda_buf_meta_class, coda_dec_rot_done, |
149 | TP_PROTO(struct coda_ctx *ctx, struct vb2_buffer *buf, | 149 | TP_PROTO(struct coda_ctx *ctx, struct vb2_v4l2_buffer *buf, |
150 | struct coda_buffer_meta *meta), | 150 | struct coda_buffer_meta *meta), |
151 | TP_ARGS(ctx, buf, meta) | 151 | TP_ARGS(ctx, buf, meta) |
152 | ); | 152 | ); |