Commit ecd07f4b authored by Michael Tretter's avatar Michael Tretter Committed by Mauro Carvalho Chehab

media: allegro: rename stream_id to dst_handle

The dst_handle field in the PUT_STREAM_BUFFER and ENCODE_FRAME_RESPONSE
is used to retrieve the V4L2 CAPTURE buffer. Calling it stream_id is
confusing. Call it dst_handle inspired by src_handle for the OUTPUT
buffer.
Signed-off-by: default avatarMichael Tretter <m.tretter@pengutronix.de>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 0e13f6f6
...@@ -1038,7 +1038,7 @@ static int allegro_mcu_send_put_stream_buffer(struct allegro_dev *dev, ...@@ -1038,7 +1038,7 @@ static int allegro_mcu_send_put_stream_buffer(struct allegro_dev *dev,
struct allegro_channel *channel, struct allegro_channel *channel,
dma_addr_t paddr, dma_addr_t paddr,
unsigned long size, unsigned long size,
u64 stream_id) u64 dst_handle)
{ {
struct mcu_msg_put_stream_buffer msg; struct mcu_msg_put_stream_buffer msg;
...@@ -1053,7 +1053,7 @@ static int allegro_mcu_send_put_stream_buffer(struct allegro_dev *dev, ...@@ -1053,7 +1053,7 @@ static int allegro_mcu_send_put_stream_buffer(struct allegro_dev *dev,
msg.size = size; msg.size = size;
msg.offset = ENCODER_STREAM_OFFSET; msg.offset = ENCODER_STREAM_OFFSET;
/* copied to mcu_msg_encode_frame_response */ /* copied to mcu_msg_encode_frame_response */
msg.stream_id = stream_id; msg.dst_handle = dst_handle;
allegro_mbox_send(dev->mbox_command, &msg); allegro_mbox_send(dev->mbox_command, &msg);
...@@ -1437,7 +1437,7 @@ static void allegro_channel_finish_frame(struct allegro_channel *channel, ...@@ -1437,7 +1437,7 @@ static void allegro_channel_finish_frame(struct allegro_channel *channel,
channel->mcu_channel_id); channel->mcu_channel_id);
dst_buf = allegro_get_buffer(channel, &channel->stream_shadow_list, dst_buf = allegro_get_buffer(channel, &channel->stream_shadow_list,
msg->stream_id); msg->dst_handle);
if (!dst_buf) if (!dst_buf)
v4l2_warn(&dev->v4l2_dev, v4l2_warn(&dev->v4l2_dev,
"channel %d: invalid stream buffer\n", "channel %d: invalid stream buffer\n",
......
...@@ -302,8 +302,8 @@ allegro_enc_put_stream_buffer(u32 *dst, ...@@ -302,8 +302,8 @@ allegro_enc_put_stream_buffer(u32 *dst,
dst[i++] = msg->mcu_addr; dst[i++] = msg->mcu_addr;
dst[i++] = msg->size; dst[i++] = msg->size;
dst[i++] = msg->offset; dst[i++] = msg->offset;
dst[i++] = lower_32_bits(msg->stream_id); dst[i++] = lower_32_bits(msg->dst_handle);
dst[i++] = upper_32_bits(msg->stream_id); dst[i++] = upper_32_bits(msg->dst_handle);
return i * sizeof(*dst); return i * sizeof(*dst);
} }
...@@ -406,8 +406,8 @@ allegro_dec_encode_frame(struct mcu_msg_encode_frame_response *msg, u32 *src) ...@@ -406,8 +406,8 @@ allegro_dec_encode_frame(struct mcu_msg_encode_frame_response *msg, u32 *src)
msg->channel_id = src[i++]; msg->channel_id = src[i++];
msg->stream_id = src[i++]; msg->dst_handle = src[i++];
msg->stream_id |= (((u64)src[i++]) << 32); msg->dst_handle |= (((u64)src[i++]) << 32);
msg->user_param = src[i++]; msg->user_param = src[i++];
msg->user_param |= (((u64)src[i++]) << 32); msg->user_param |= (((u64)src[i++]) << 32);
msg->src_handle = src[i++]; msg->src_handle = src[i++];
......
...@@ -191,7 +191,7 @@ struct mcu_msg_put_stream_buffer { ...@@ -191,7 +191,7 @@ struct mcu_msg_put_stream_buffer {
u32 mcu_addr; u32 mcu_addr;
u32 size; u32 size;
u32 offset; u32 offset;
u64 stream_id; u64 dst_handle;
}; };
struct mcu_msg_encode_frame { struct mcu_msg_encode_frame {
...@@ -233,7 +233,7 @@ struct mcu_msg_encode_frame { ...@@ -233,7 +233,7 @@ struct mcu_msg_encode_frame {
struct mcu_msg_encode_frame_response { struct mcu_msg_encode_frame_response {
struct mcu_msg_header header; struct mcu_msg_header header;
u32 channel_id; u32 channel_id;
u64 stream_id; /* see mcu_msg_put_stream_buffer */ u64 dst_handle; /* see mcu_msg_put_stream_buffer */
u64 user_param; /* see mcu_msg_encode_frame */ u64 user_param; /* see mcu_msg_encode_frame */
u64 src_handle; /* see mcu_msg_encode_frame */ u64 src_handle; /* see mcu_msg_encode_frame */
u16 skip; u16 skip;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment