]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: v4l2-mem2mem: Rename v4l2_m2m_buf_copy_data to v4l2_m2m_buf_copy_metadata
authorEzequiel Garcia <ezequiel@collabora.com>
Tue, 5 Feb 2019 21:20:33 +0000 (16:20 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 7 Feb 2019 17:36:33 +0000 (12:36 -0500)
The v4l2_m2m_buf_copy_data helper is used to copy the buffer
metadata, such as its timestamp and its flags.

Therefore, the v4l2_m2m_buf_copy_metadata name is more clear
and avoids confusion with a payload data copy.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil-cisco@xs4all.nl: also fix cedrus_dec.c]
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vicodec/vicodec-core.c
drivers/media/platform/vim2m.c
drivers/media/v4l2-core/v4l2-mem2mem.c
drivers/staging/media/sunxi/cedrus/cedrus_dec.c
include/media/v4l2-mem2mem.h

index 212da185e4f2b98f9dcabd96fbe27b9f77870d25..9d739ea5542d5310133c7caed1977c0360014139 100644 (file)
@@ -199,7 +199,7 @@ static int device_process(struct vicodec_ctx *ctx,
 
        dst_vb->sequence = q_dst->sequence++;
        dst_vb->flags &= ~V4L2_BUF_FLAG_LAST;
-       v4l2_m2m_buf_copy_data(src_vb, dst_vb, !ctx->is_enc);
+       v4l2_m2m_buf_copy_metadata(src_vb, dst_vb, !ctx->is_enc);
 
        return 0;
 }
@@ -414,7 +414,7 @@ static void set_last_buffer(struct vb2_v4l2_buffer *dst_buf,
        vb2_set_plane_payload(&dst_buf->vb2_buf, 0, 0);
        dst_buf->sequence = q_dst->sequence++;
 
-       v4l2_m2m_buf_copy_data(src_buf, dst_buf, !ctx->is_enc);
+       v4l2_m2m_buf_copy_metadata(src_buf, dst_buf, !ctx->is_enc);
        dst_buf->flags |= V4L2_BUF_FLAG_LAST;
        v4l2_m2m_buf_done(dst_buf, VB2_BUF_STATE_DONE);
 }
index bd125ad34343cf74461abd66aa50ba27583efd39..98be92a4e0b027c038597a01526ed952e4041fd0 100644 (file)
@@ -432,7 +432,7 @@ static int device_process(struct vim2m_ctx *ctx,
        out_vb->sequence = get_q_data(ctx,
                                      V4L2_BUF_TYPE_VIDEO_CAPTURE)->sequence++;
        in_vb->sequence = q_data_in->sequence++;
-       v4l2_m2m_buf_copy_data(in_vb, out_vb, true);
+       v4l2_m2m_buf_copy_metadata(in_vb, out_vb, true);
 
        if (ctx->mode & MEM2MEM_VFLIP) {
                start = height - 1;
index 631f4e2aa942a6eec5f2765c982d66e0b94124c3..1494d0d5951a2a5b976f559467a76fd7718d9b0c 100644 (file)
@@ -975,9 +975,9 @@ void v4l2_m2m_buf_queue(struct v4l2_m2m_ctx *m2m_ctx,
 }
 EXPORT_SYMBOL_GPL(v4l2_m2m_buf_queue);
 
-void v4l2_m2m_buf_copy_data(const struct vb2_v4l2_buffer *out_vb,
-                           struct vb2_v4l2_buffer *cap_vb,
-                           bool copy_frame_flags)
+void v4l2_m2m_buf_copy_metadata(const struct vb2_v4l2_buffer *out_vb,
+                               struct vb2_v4l2_buffer *cap_vb,
+                               bool copy_frame_flags)
 {
        u32 mask = V4L2_BUF_FLAG_TIMECODE | V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
 
@@ -993,7 +993,7 @@ void v4l2_m2m_buf_copy_data(const struct vb2_v4l2_buffer *out_vb,
        cap_vb->flags &= ~mask;
        cap_vb->flags |= out_vb->flags & mask;
 }
-EXPORT_SYMBOL_GPL(v4l2_m2m_buf_copy_data);
+EXPORT_SYMBOL_GPL(v4l2_m2m_buf_copy_metadata);
 
 void v4l2_m2m_request_queue(struct media_request *req)
 {
index 443fb037e1cf2d65c057ef27ad93364b3f9ca1f1..4d6d602cdde6b6558bc378e66f5892b432512ba2 100644 (file)
@@ -50,7 +50,7 @@ void cedrus_device_run(void *priv)
                break;
        }
 
-       v4l2_m2m_buf_copy_data(run.src, run.dst, true);
+       v4l2_m2m_buf_copy_metadata(run.src, run.dst, true);
 
        dev->dec_ops[ctx->current_codec]->setup(ctx, &run);
 
index 43e447dcf69dd9dd0ee1d454cbe3a20315cdb391..47c6d9aa0bf49dd3ad22d94847c8c99b5a5d60f7 100644 (file)
@@ -623,11 +623,11 @@ v4l2_m2m_dst_buf_remove_by_idx(struct v4l2_m2m_ctx *m2m_ctx, unsigned int idx)
 }
 
 /**
- * v4l2_m2m_buf_copy_data() - copy buffer data from the output buffer to the
- * capture buffer
+ * v4l2_m2m_buf_copy_metadata() - copy buffer metadata from
+ * the output buffer to the capture buffer
  *
- * @out_vb: the output buffer that is the source of the data.
- * @cap_vb: the capture buffer that will receive the data.
+ * @out_vb: the output buffer that is the source of the metadata.
+ * @cap_vb: the capture buffer that will receive the metadata.
  * @copy_frame_flags: copy the KEY/B/PFRAME flags as well.
  *
  * This helper function copies the timestamp, timecode (if the TIMECODE
@@ -638,9 +638,9 @@ v4l2_m2m_dst_buf_remove_by_idx(struct v4l2_m2m_ctx *m2m_ctx, unsigned int idx)
  * flags are not copied. This is typically needed for encoders that
  * set this bits explicitly.
  */
-void v4l2_m2m_buf_copy_data(const struct vb2_v4l2_buffer *out_vb,
-                           struct vb2_v4l2_buffer *cap_vb,
-                           bool copy_frame_flags);
+void v4l2_m2m_buf_copy_metadata(const struct vb2_v4l2_buffer *out_vb,
+                               struct vb2_v4l2_buffer *cap_vb,
+                               bool copy_frame_flags);
 
 /* v4l2 request helper */