Skip to content

Commit 46e513f

Browse files
Zefa Chenrkhuangtao
authored andcommitted
media: rockchip: vicap support get data type form sensor driver
Signed-off-by: Zefa Chen <[email protected]> Change-Id: Ieecd9ed63d5172a1a210a48f1b16848a93e71ed4
1 parent 41a9d53 commit 46e513f

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

drivers/media/platform/rockchip/cif/capture.c

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,13 +1011,10 @@ cif_input_fmt *rkcif_get_input_fmt(struct rkcif_device *dev, struct v4l2_rect *r
10111011
csi_info->vc = ch_info.vc;
10121012
else
10131013
csi_info->vc = pad_id;
1014-
if (ch_info.bus_fmt == MEDIA_BUS_FMT_SPD_2X8 ||
1015-
ch_info.bus_fmt == MEDIA_BUS_FMT_EBD_1X8) {
1016-
if (ch_info.data_type > 0)
1017-
csi_info->data_type = ch_info.data_type;
1018-
if (ch_info.data_bit > 0)
1019-
csi_info->data_bit = ch_info.data_bit;
1020-
}
1014+
if (ch_info.data_type > 0)
1015+
csi_info->data_type = ch_info.data_type;
1016+
if (ch_info.data_bit > 0)
1017+
csi_info->data_bit = ch_info.data_bit;
10211018
if (ch_info.field == 0)
10221019
fmt.format.field = V4L2_FIELD_NONE;
10231020
else
@@ -4059,19 +4056,13 @@ static int rkcif_csi_channel_init(struct rkcif_stream *stream,
40594056
channel->virtual_width *= 2;
40604057
channel->height /= 2;
40614058
}
4062-
if (stream->cif_fmt_in->mbus_code == MEDIA_BUS_FMT_EBD_1X8 ||
4063-
stream->cif_fmt_in->mbus_code == MEDIA_BUS_FMT_SPD_2X8) {
4064-
if (dev->channels[stream->id].data_type)
4065-
channel->data_type = dev->channels[stream->id].data_type;
4066-
else
4067-
channel->data_type = get_data_type(stream->cif_fmt_in->mbus_code,
4068-
channel->cmd_mode_en,
4069-
channel->dsi_input);
4070-
} else {
4059+
if (dev->channels[stream->id].data_type)
4060+
channel->data_type = dev->channels[stream->id].data_type;
4061+
else
40714062
channel->data_type = get_data_type(stream->cif_fmt_in->mbus_code,
40724063
channel->cmd_mode_en,
40734064
channel->dsi_input);
4074-
}
4065+
40754066
channel->csi_fmt_val = get_csi_fmt_val(stream,
40764067
&dev->channels[stream->id]);
40774068

0 commit comments

Comments
 (0)