Lines Matching refs:sel

1882 				      struct v4l2_subdev_selection *sel,  in smiapp_set_compose_binner()  argument
1891 crops[SMIAPP_PAD_SINK]->width, sel->r.width, in smiapp_set_compose_binner()
1892 crops[SMIAPP_PAD_SINK]->height, sel->r.height, sel->flags); in smiapp_set_compose_binner()
1899 sel->r.width, in smiapp_set_compose_binner()
1902 sel->r.height, sel->flags); in smiapp_set_compose_binner()
1910 if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE) { in smiapp_set_compose_binner()
1915 sel->r.width = (crops[SMIAPP_PAD_SINK]->width / binh) & ~1; in smiapp_set_compose_binner()
1916 sel->r.height = (crops[SMIAPP_PAD_SINK]->height / binv) & ~1; in smiapp_set_compose_binner()
1930 struct v4l2_subdev_selection *sel, in smiapp_set_compose_scaler() argument
1944 sel->r.width = min_t(unsigned int, sel->r.width, in smiapp_set_compose_scaler()
1946 sel->r.height = min_t(unsigned int, sel->r.height, in smiapp_set_compose_scaler()
1950 * sensor->limits[SMIAPP_LIMIT_SCALER_N_MIN] / sel->r.width; in smiapp_set_compose_scaler()
1952 * sensor->limits[SMIAPP_LIMIT_SCALER_N_MIN] / sel->r.height; in smiapp_set_compose_scaler()
1990 sel->r.width, in smiapp_set_compose_scaler()
1992 sel->r.height, in smiapp_set_compose_scaler()
1993 sel->flags); in smiapp_set_compose_scaler()
2011 sel->r.width, in smiapp_set_compose_scaler()
2015 sel->r.height, in smiapp_set_compose_scaler()
2016 sel->flags); in smiapp_set_compose_scaler()
2025 sel->r.width = in smiapp_set_compose_scaler()
2030 sel->r.height = in smiapp_set_compose_scaler()
2036 sel->r.height = crops[SMIAPP_PAD_SINK]->height; in smiapp_set_compose_scaler()
2038 if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE) { in smiapp_set_compose_scaler()
2046 struct v4l2_subdev_selection *sel) in smiapp_set_compose() argument
2052 smiapp_get_crop_compose(subdev, cfg, crops, &comp, sel->which); in smiapp_set_compose()
2054 sel->r.top = 0; in smiapp_set_compose()
2055 sel->r.left = 0; in smiapp_set_compose()
2058 smiapp_set_compose_binner(subdev, cfg, sel, crops, comp); in smiapp_set_compose()
2060 smiapp_set_compose_scaler(subdev, cfg, sel, crops, comp); in smiapp_set_compose()
2062 *comp = sel->r; in smiapp_set_compose()
2063 smiapp_propagate(subdev, cfg, sel->which, in smiapp_set_compose()
2066 if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE) in smiapp_set_compose()
2073 struct v4l2_subdev_selection *sel) in __smiapp_sel_supported() argument
2079 switch (sel->target) { in __smiapp_sel_supported()
2083 && sel->pad == SMIAPP_PA_PAD_SRC) in __smiapp_sel_supported()
2086 && sel->pad == SMIAPP_PAD_SRC) in __smiapp_sel_supported()
2089 && sel->pad == SMIAPP_PAD_SINK in __smiapp_sel_supported()
2096 && sel->pad == SMIAPP_PA_PAD_SRC) in __smiapp_sel_supported()
2101 if (sel->pad == ssd->source_pad) in __smiapp_sel_supported()
2117 struct v4l2_subdev_selection *sel) in smiapp_set_crop() argument
2124 smiapp_get_crop_compose(subdev, cfg, crops, NULL, sel->which); in smiapp_set_crop()
2126 if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE) { in smiapp_set_crop()
2127 if (sel->pad == ssd->sink_pad) in smiapp_set_crop()
2132 if (sel->pad == ssd->sink_pad) { in smiapp_set_crop()
2135 _r.width = v4l2_subdev_get_try_format(subdev, cfg, sel->pad) in smiapp_set_crop()
2137 _r.height = v4l2_subdev_get_try_format(subdev, cfg, sel->pad) in smiapp_set_crop()
2147 if (ssd == sensor->src && sel->pad == SMIAPP_PAD_SRC) { in smiapp_set_crop()
2148 sel->r.left = 0; in smiapp_set_crop()
2149 sel->r.top = 0; in smiapp_set_crop()
2152 sel->r.width = min(sel->r.width, src_size->width); in smiapp_set_crop()
2153 sel->r.height = min(sel->r.height, src_size->height); in smiapp_set_crop()
2155 sel->r.left = min_t(int, sel->r.left, src_size->width - sel->r.width); in smiapp_set_crop()
2156 sel->r.top = min_t(int, sel->r.top, src_size->height - sel->r.height); in smiapp_set_crop()
2158 *crops[sel->pad] = sel->r; in smiapp_set_crop()
2160 if (ssd != sensor->pixel_array && sel->pad == SMIAPP_PAD_SINK) in smiapp_set_crop()
2161 smiapp_propagate(subdev, cfg, sel->which, in smiapp_set_crop()
2169 struct v4l2_subdev_selection *sel) in __smiapp_get_selection() argument
2177 ret = __smiapp_sel_supported(subdev, sel); in __smiapp_get_selection()
2181 smiapp_get_crop_compose(subdev, cfg, crops, &comp, sel->which); in __smiapp_get_selection()
2183 if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE) { in __smiapp_get_selection()
2195 switch (sel->target) { in __smiapp_get_selection()
2199 sel->r.left = sel->r.top = 0; in __smiapp_get_selection()
2200 sel->r.width = in __smiapp_get_selection()
2202 sel->r.height = in __smiapp_get_selection()
2204 } else if (sel->pad == ssd->sink_pad) { in __smiapp_get_selection()
2205 sel->r = sink_fmt; in __smiapp_get_selection()
2207 sel->r = *comp; in __smiapp_get_selection()
2212 sel->r = *crops[sel->pad]; in __smiapp_get_selection()
2215 sel->r = *comp; in __smiapp_get_selection()
2224 struct v4l2_subdev_selection *sel) in smiapp_get_selection() argument
2230 rval = __smiapp_get_selection(subdev, cfg, sel); in smiapp_get_selection()
2237 struct v4l2_subdev_selection *sel) in smiapp_set_selection() argument
2242 ret = __smiapp_sel_supported(subdev, sel); in smiapp_set_selection()
2248 sel->r.left = max(0, sel->r.left & ~1); in smiapp_set_selection()
2249 sel->r.top = max(0, sel->r.top & ~1); in smiapp_set_selection()
2250 sel->r.width = SMIAPP_ALIGN_DIM(sel->r.width, sel->flags); in smiapp_set_selection()
2251 sel->r.height = SMIAPP_ALIGN_DIM(sel->r.height, sel->flags); in smiapp_set_selection()
2253 sel->r.width = max_t(unsigned int, in smiapp_set_selection()
2255 sel->r.width); in smiapp_set_selection()
2256 sel->r.height = max_t(unsigned int, in smiapp_set_selection()
2258 sel->r.height); in smiapp_set_selection()
2260 switch (sel->target) { in smiapp_set_selection()
2262 ret = smiapp_set_crop(subdev, cfg, sel); in smiapp_set_selection()
2265 ret = smiapp_set_compose(subdev, cfg, sel); in smiapp_set_selection()