mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
media: rockchip: isp: enum the max frame size to isp input size
Change-Id: I316ac980c54f7720b37c96d3698c259fb8ce7eca Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
@@ -885,6 +885,7 @@ static int rkisp_enum_framesizes(struct file *file, void *prov,
|
||||
struct v4l2_frmsize_discrete *d = &fsize->discrete;
|
||||
struct rkisp_device *dev = stream->ispdev;
|
||||
struct v4l2_rect max_rsz;
|
||||
struct v4l2_rect *input_win = rkisp_get_isp_sd_win(&dev->isp_sdev);
|
||||
|
||||
if (fsize->index != 0)
|
||||
return -EINVAL;
|
||||
@@ -908,8 +909,8 @@ static int rkisp_enum_framesizes(struct file *file, void *prov,
|
||||
fsize->type = V4L2_FRMSIZE_TYPE_STEPWISE;
|
||||
s->min_width = STREAM_MIN_RSZ_OUTPUT_WIDTH;
|
||||
s->min_height = STREAM_MIN_RSZ_OUTPUT_HEIGHT;
|
||||
s->max_width = max_rsz.width;
|
||||
s->max_height = max_rsz.height;
|
||||
s->max_width = min_t(u32, max_rsz.width, input_win->width);
|
||||
s->max_height = input_win->height;
|
||||
s->step_width = STREAM_OUTPUT_STEP_WISE;
|
||||
s->step_height = STREAM_OUTPUT_STEP_WISE;
|
||||
}
|
||||
|
||||
@@ -295,8 +295,8 @@ int rkisp_align_sensor_resolution(struct rkisp_device *dev,
|
||||
if ((code & RKISP_MEDIA_BUS_FMT_MASK) != RKISP_MEDIA_BUS_FMT_BAYER) {
|
||||
crop->left = 0;
|
||||
crop->top = 0;
|
||||
crop->width = min_t(u32, src_w, max_w);
|
||||
crop->height = min_t(u32, src_h, max_h);
|
||||
crop->width = min_t(u32, src_w, CIF_ISP_INPUT_W_MAX);
|
||||
crop->height = min_t(u32, src_h, CIF_ISP_INPUT_H_MAX);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user