mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
media: platform: vicap: fix vicap buf round when hdmi2csi for rk3588 and later
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com> Change-Id: Ifcb644d93d3f3493b1f1df5afac23b9cbfb3b6db
This commit is contained in:
@@ -4704,7 +4704,12 @@ static int rkcif_queue_setup(struct vb2_queue *queue,
|
||||
|
||||
for (i = 0; i < cif_fmt->mplanes; i++) {
|
||||
const struct v4l2_plane_pix_format *plane_fmt;
|
||||
int h = round_up(height, MEMORY_ALIGN_ROUND_UP_HEIGHT);
|
||||
int h;
|
||||
|
||||
if (dev->chip_id >= CHIP_RK3588_CIF && dev->terminal_sensor.hdmi_input_en)
|
||||
h = height;
|
||||
else
|
||||
h = round_up(height, MEMORY_ALIGN_ROUND_UP_HEIGHT);
|
||||
|
||||
plane_fmt = &pixm->plane_fmt[i];
|
||||
sizes[i] = plane_fmt->sizeimage / height * h;
|
||||
@@ -6111,6 +6116,13 @@ int rkcif_update_sensor_info(struct rkcif_stream *stream)
|
||||
} else {
|
||||
terminal_sensor->dsi_mode = 0;
|
||||
}
|
||||
if (v4l2_subdev_call(terminal_sensor->sd, core, ioctl, RKMODULE_GET_HDMI_MODE,
|
||||
&terminal_sensor->hdmi_input_en)) {
|
||||
v4l2_dbg(1, rkcif_debug, &stream->cifdev->v4l2_dev,
|
||||
"%s: get terminal %s hdmiin, default!\n",
|
||||
__func__, terminal_sensor->sd->name);
|
||||
terminal_sensor->hdmi_input_en = 0;
|
||||
}
|
||||
} else {
|
||||
v4l2_err(&stream->cifdev->v4l2_dev,
|
||||
"%s: stream[%d] get remote terminal sensor failed!\n",
|
||||
|
||||
@@ -227,6 +227,7 @@ struct rkcif_sensor_info {
|
||||
struct v4l2_subdev_selection selection;
|
||||
int dsi_input_en;
|
||||
int dsi_mode;
|
||||
int hdmi_input_en;
|
||||
};
|
||||
|
||||
enum cif_fmt_type {
|
||||
|
||||
Reference in New Issue
Block a user